POST
/v1/billing/credit_grants/{id}Update a credit grant
Updates the expiration time or metadata of an existing credit grant. Provide the grant id and send only the properties you want to change; set expires_at to an empty string to make the billing credits never expire. The response contains the updated credit grant.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
idstringrequired
The unique identifier of the credit grant to update.
Optional fields for changing a credit grant's expiration or metadata.
expandarray<string>optional
Specifies which fields in the response should be expanded.
expires_atintegeroptional
The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
metadataobjectoptional
Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
200Returns the updated credit grant with its current amount, applicability configuration, expiration, metadata, priority, identifier, and object status.
amountobjectrequired
applicability_configobjectrequired
categorystringrequired
The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
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.
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 update and must not exceed 5000 characters. expires_at must be a Unix timestamp or an empty string, and metadata values must be strings.