Create a credit grant policy

View as Markdown
Adds an automated credit grant policy to a plan. Subscriptions on the plan receive the grant on the configured cadence, denominated in a currency or a custom pricing unit, optionally expiring after an interval.

Authentication

AuthorizationBearer
API key obtained from the Grant dashboard

Path parameters

idstringRequiredformat: "cuid"

Request

This endpoint expects an object.
account_typeenumRequired
Whether credits are granted in a custom pricing unit or in currency
amountintegerRequired

Grant amount per cadence: minor currency units (e.g. cents) for currency grants, whole units for pricing_unit grants

cadenceenumRequired

How often the grant recurs; one_off_subscription_start grants once when a subscription starts

pricing_unit_idstringOptional

Pricing unit to grant (required when account_type is pricing_unit)

currency_codeenumOptional

Currency to grant (required when account_type is currency)

expiration_interval_countinteger or nullOptional

How many expiration_interval_units granted credits live before expiring. Omit both fields for non-expiring credits.

expiration_interval_unitenumOptional

Unit for expiration_interval_count

effective_fromdatetime or nullOptional
ISO 8601 timestamp the policy becomes effective
effective_todatetime or nullOptional
ISO 8601 timestamp the policy stops being effective

Response

Credit grant policy created
successboolean
credit_grant_policyobject
request_idstring

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error