Grants credits to a customer’s account.
Mutation
Mutation
Variables
Response
mutation CreateCreditGrant ( $input : CreditGrantInput ! ) {
createCreditGrant ( input : $input ) {
id
amount
status
cadence
expiryDate
effectiveAt
description
createdAt
}
}
Parameters
Input for creating a credit grant ONE_TIME, MONTHLY, or YEARLY
When credits become available
Description/reason for grant
Cadence Options
Cadence Description ONE_TIMESingle grant MONTHLYRecurring monthly YEARLYRecurring yearly
Examples
One-Time Grant
{
"input" : {
"customerId" : "customer-123" ,
"amount" : 1000 ,
"cadence" : "ONE_TIME" ,
"description" : "Welcome bonus"
}
}
Recurring Monthly
{
"input" : {
"customerId" : "customer-123" ,
"amount" : 500 ,
"cadence" : "MONTHLY" ,
"description" : "Monthly credit allowance"
}
}
Future-Dated Grant
{
"input" : {
"customerId" : "customer-123" ,
"amount" : 2000 ,
"effectiveAt" : "2024-02-01T00:00:00Z" ,
"expiryDate" : "2024-12-31T23:59:59Z"
}
}
The OVERDRAFT grant type is system-generated only. Attempting to create a credit grant with grantType: OVERDRAFT via the API will return a validation error. Overdraft grants are created automatically when a customer’s credit consumption exceeds their available balance.