v69

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-011221331.4 MB
Credit grants

Create a credit grant

Creates a new credit grant for a customer with specified amount, type, and optional billing configuration.

post/api/v1/credits/grants

Headers

X-ACCOUNT-IDstring

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-IDstring

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Request body

displayNamestring required

The display name for the credit grant

amountnumber required

The credit amount to grant

grantType'PAID' | 'PROMOTIONAL' required

The type of credit grant (PAID, PROMOTIONAL)

priorityinteger

The priority of the credit grant (lower number = higher priority)

effectiveAtstring date-time

The date when the credit grant becomes effective

expireAtstring date-time

The date when the credit grant expires

metadataobject

Additional metadata for the credit grant

commentstring

An optional comment on the credit grant

customerIdstring required

The customer ID to grant credits to (required)

resourceIdstring

The resource ID to scope the grant to

currencyIdstring required

The credit currency ID (required)

paymentCollectionMethod'CHARGE' | 'INVOICE' | 'NONE'

The payment collection method (CHARGE, INVOICE, NONE)

awaitPaymentConfirmationboolean

Whether to wait for payment confirmation before returning (default: true)

Response

The newly created credit grant object.