Skip to navigation

Retrieve a credit grant

Draft scaffold — not implemented or available in the API.

Returns one credit grant with what has been used and what is still available. {creditGrant} takes the grant’s cgr_ ID.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

creditGrantstringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.

Headers

Paid-BetaenumRequired

This endpoint is in the credits=v1 beta. Send this header to use it.

Allowed values:

Response

200
idstring
The CreditGrant ID.
objectenum

The type of object. Always creditGrant.

Allowed values:
createdAtdatetime
When the object was created.
amountstring or nullformat: "^\d+(\.\d{1,15})?$"

An exact non-negative credit amount, up to 15 fractional places.

availablestringformat: "^\d+(\.\d{1,15})?$"

An exact non-negative credit amount, up to 15 fractional places.

creditCurrencystring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
expiresAtdatetime or null
When the grant expires.
livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

nextRefillAtdatetime or null
Next refill boundary.
reasonstring or null
Why credits were granted.
refillobject
CreditRefill.
refilledAtdatetime or null
Start of the current refill window.
rolloverobject
CreditRollover.
rolloverEndsAtdatetime or null
When rolled credits expire.
scopeobject
Scope or null.
seatstring or null1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
sourceobject
The origin of a grant.
startsAtdatetime
When the grant starts.
statusenum
Grant lifecycle status.
Allowed values:
usedstringformat: "^\d+(\.\d{1,15})?$"

An exact non-negative credit amount, up to 15 fractional places.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error