curl --request POST \
--url https://api.paygentic.io/v0/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"merchantId": "<string>",
"customerId": "<string>",
"entitlementData": [
{
"billableMetricId": "<string>",
"quantity": 1,
"price": "<string>"
}
],
"maxUses": 500
}'
{
"id": "<string>",
"object": "entitlement",
"merchantId": "<string>",
"customerId": "<string>",
"billableMetrics": [
{
"billableMetricId": "<string>",
"quantity": 123,
"price": "<string>"
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"region": "<string>",
"maxUses": 2,
"remainingBalance": "<string>",
"usedCount": 1
}
Create an entitlement for a customer. This temporarily reserves funds in the customer’s wallet to guarantee payment for future usage.
curl --request POST \
--url https://api.paygentic.io/v0/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"merchantId": "<string>",
"customerId": "<string>",
"entitlementData": [
{
"billableMetricId": "<string>",
"quantity": 1,
"price": "<string>"
}
],
"maxUses": 500
}'
{
"id": "<string>",
"object": "entitlement",
"merchantId": "<string>",
"customerId": "<string>",
"billableMetrics": [
{
"billableMetricId": "<string>",
"quantity": 123,
"price": "<string>"
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"region": "<string>",
"maxUses": 2,
"remainingBalance": "<string>",
"usedCount": 1
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Entitlement created successfully
The response is of type object
.