Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

The credit grant object

Prepaid or promotional credits a customer spends on their usage.

A credit grant is money a customer spends on their usage, applied when each month is billed. Usage past it is billed as usual. Credits pay for a month when they're in effect at its end.

Attributes

NameTypeDescription
idstringUnique identifier, starting cgrt_.
objectstringAlways credit_grant.
livemodebooleantrue in live mode.
customerstringWho it's for.
namestringShown with the credits on the customer's invoices.
categoryenumpaid (prepaid) or promotional.
currencystringusd.
amountintegerWhat it's worth, in cents.
applicabilityobjectscope all (any usage in its currency), or telemetries with telemetry_ids.
priorityintegerWhich credits are spent first.
statusenumpending, granted, depleted, expired or voided.
effective_attimestampWhen it takes effect.
expires_attimestamp or nullWhat's left then expires, once that month is billed.
voided_attimestamp or nullWhen it was voided.
createdtimestampWhen it was granted.

Example

json
{  "id": "cgrt_9f062f83df7727108a0c4e44",  "object": "credit_grant",  "livemode": false,  "customer": "cust_13ed3f69adfcfcb6289a5491",  "name": "Prepaid credits",  "category": "paid",  "currency": "usd",  "amount": 50000,  "applicability": {    "scope": "all"  },  "priority": 50,  "status": "granted",  "effective_at": "2026-11-27T09:00:00Z",  "expires_at": null,  "voided_at": null,  "created": "2026-11-27T09:00:00Z"}

Endpoints

EndpointWhat it does
POST /v1/billing/credit_grantsGive a customer credits for their usage.
GET /v1/billing/credit_grants/{id}Get a credit grant by its ID.
POST /v1/billing/credit_grants/{id}/voidCancel what's left: it pays for no more usage.
GET /v1/billing/credit_grantsList your credit grants.