POST
/
entitlements
Create an entitlement
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
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

201
application/json

Entitlement created successfully

The response is of type object.