Skip to main content
Grants require Standard Billing (billingVersion: 1) and an active metered entitlement. See Metered Entitlements for how entitlements are provisioned automatically via subscription, and Billing Versions for details on the two billing models.
Grants let you add credits to a customer’s metered entitlement outside the normal subscription cycle. Use them for mid-cycle top-ups, promotional credits, support adjustments, or self-serve credit purchases. There are two ways to create a grant:

Prerequisites

Before creating or purchasing a grant, you need:
  • A customer with an active v1 subscription
  • A metered entitlement on that subscription (the entitlementId)
You can retrieve the entitlement ID from GET /v1/entitlements or from the subscription’s entitlement list.

Creating a grant (direct)

Use direct creation when you want to credit a customer’s balance without requiring payment — promotional credits, support adjustments, or backend automation.
Response:

Request fields

The idempotencyKey is scoped to the entitlement. Retrying a request with the same key returns the existing grant without creating a duplicate. If you retry with the same key but different parameters (for example, a different amount), the API returns a 409 Conflict.

Purchasing a grant

Use grant purchases when a customer should pay for additional credits — self-serve top-up flows, credit packs, or on-demand capacity. The purchase endpoint creates an ad-hoc invoice with a payment session. Redirect the customer to the returned payment URL — once they complete payment, the grant is created automatically. To react to payment completion programmatically, subscribe to the invoice.paid.v0 webhook. The payload includes the original invoiceId along with the created grantId, so you can correlate the purchase response with downstream fulfilment without an extra fetch.
Response:

Request fields

The currency is always the merchant’s default currency. The amount in the payment session is in the currency’s minor unit (e.g., cents for USD), so a price of "5.00" appears as 500.

What happens if payment expires

If the customer does not complete payment before the session expires, Paygentic automatically cancels the invoice. No grant is created and no charge is made.

Managing grants

List grants

Retrieve all grants for an entitlement. Active grants are returned by default.
Pass includeVoided=true to include voided grants in the response:
Response:

Get a grant

Response:

Void a grant

Voiding removes the grant’s credits from the customer’s balance. This operation is idempotent — voiding an already-voided grant returns the grant without error.
Response:

Grant object

Next steps

  • Metered Entitlements — Grant lifecycle, reset behavior, rollover rules, and balance checking
  • Features — Feature types and how entitlements are provisioned automatically
  • Usage Events — Send consumption data that depletes grant balances