v52

latestOpenAPI 3.0.1AGPL-3.0raw.githubusercontent.com2026-08-01255473862.7 KB
Credit Grants

Create credit grant

Use when giving a customer or plan credits (e.g. prepaid balance or promotional credits). Scope can be plan or subscription; supports start/end dates.

post/creditgrants

Request body

addon_idstring
cadence'ONETIME' | 'RECURRING' required
conversion_ratestring

amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits

creditsstring required
end_datestring date-time
expiration_durationinteger
expiration_duration_unit'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
expiration_type'NEVER' | 'DURATION' | 'BILLING_CYCLE'
metadataTypesMetadata
namestring required
period'DAILY' | 'WEEKLY' | 'MONTHLY' | 'ANNUAL' | 'QUARTERLY' | 'HALF_YEARLY'
period_countinteger
plan_idstring
priorityinteger
scope'PLAN' | 'SUBSCRIPTION' | 'ADDON' required
start_datestring date-time
subscription_idstring
topup_conversion_ratestring

topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

Response

Created

addon_idstring
cadence'ONETIME' | 'RECURRING'
conversion_ratestring

amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits

created_atstring date-time
created_bystring
credit_grant_anchorstring date-time
creditsstring
end_datestring date-time
environment_idstring
expiration_durationinteger
expiration_duration_unit'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
expiration_type'NEVER' | 'DURATION' | 'BILLING_CYCLE'
idstring
metadataTypesMetadata
namestring
period'DAILY' | 'WEEKLY' | 'MONTHLY' | 'ANNUAL' | 'QUARTERLY' | 'HALF_YEARLY'
period_countinteger
plan_idstring
priorityinteger
scope'PLAN' | 'SUBSCRIPTION' | 'ADDON'
start_datestring date-time
status'published' | 'deleted' | 'archived'
subscription_idstring
tenant_idstring
topup_conversion_ratestring

topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

updated_atstring date-time
updated_bystring