curl --request POST \
--url https://api.example.com/api/v1/credits/grants/{id}/void \
--header 'X-API-KEY: <api-key>'{
"data": {
"id": "cred-grant-abc123",
"displayName": "Monthly credits",
"amount": 1000,
"consumedAmount": 250,
"grantType": "PROMOTIONAL",
"sourceType": null,
"priority": 1,
"effectiveAt": "2024-01-01T00:00:00.000Z",
"expireAt": "2024-12-31T23:59:59.000Z",
"voidedAt": null,
"metadata": {},
"cost": {
"amount": 0,
"currency": "usd"
},
"comment": null,
"customerId": "customer-123",
"resourceId": null,
"currencyId": "credits",
"invoiceId": null,
"latestInvoice": null,
"paymentCollection": "NOT_REQUIRED",
"status": "ACTIVE",
"createdAt": "2027-01-13T05:56:18.153Z",
"updatedAt": "2027-01-13T05:56:18.154Z"
}
}Voids an existing credit grant, preventing further consumption of the remaining credits.
curl --request POST \
--url https://api.example.com/api/v1/credits/grants/{id}/void \
--header 'X-API-KEY: <api-key>'{
"data": {
"id": "cred-grant-abc123",
"displayName": "Monthly credits",
"amount": 1000,
"consumedAmount": 250,
"grantType": "PROMOTIONAL",
"sourceType": null,
"priority": 1,
"effectiveAt": "2024-01-01T00:00:00.000Z",
"expireAt": "2024-12-31T23:59:59.000Z",
"voidedAt": null,
"metadata": {},
"cost": {
"amount": 0,
"currency": "usd"
},
"comment": null,
"customerId": "customer-123",
"resourceId": null,
"currencyId": "credits",
"invoiceId": null,
"latestInvoice": null,
"paymentCollection": "NOT_REQUIRED",
"status": "ACTIVE",
"createdAt": "2027-01-13T05:56:18.153Z",
"updatedAt": "2027-01-13T05:56:18.154Z"
}
}Server API Key
The unique identifier of the entity
1 - 255The voided credit grant object.
Response object
Credit grant object representing allocated credits for a customer
Show child attributes