Sample - Stripe API
GET/v1/billing/credit_grants/{id}

Get a credit grant

Retrieves a specific credit grant allocated to a customer or customer account. Provide the grant id and optionally request expanded response fields with expand. The response includes the grant's allocation, applicability configuration, timing, priority, and metadata.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
idstringrequired
The unique identifier of the credit grant.
expandarray<string>optional
Specifies which response fields to expand.

2 status codes
200Returns the credit grant with its amount, applicability configuration, category, customer, effective and expiration times, identifier, metadata, priority, livemode, and object type.
amountobjectrequired
applicability_configobjectrequired
categorystringrequired
The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
Allowed:paidpromotional
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
customerstringrequired
ID of the customer receiving the billing credits.
customer_accountstringoptional
ID of the account representing the customer receiving the billing credits
effective_atintegeroptional
The time when the billing credits become effective-when they're eligible for use.
expires_atintegeroptional
The time when the billing credits expire. If not present, the billing credits don't expire.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectrequired
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
namestringoptional
A descriptive name shown in dashboard.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:billing.credit_grant
priorityintegeroptional
The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.
test_clockstringoptional
ID of the test clock this credit grant belongs to.
updatedintegerrequired
Time at which the object was last updated. Measured in seconds since the Unix epoch.
voided_atintegeroptional
The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
defaultError response.
errorobjectrequired

Error handling

id must identify the credit grant to retrieve and must not exceed 5000 characters. Each value in expand must be a string of no more than 5000 characters.