Skip to main content
GET
Get a credit purchase

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier for a credit purchase attempt.

Response

The credit purchase attempt.

id
string
required

Unique identifier for this credit purchase attempt.

status
enum<string>
required

Current state of the purchase. Poll GET until it reaches a terminal state (succeeded or failed).

An asynchronous webhook records succeeded and actionRequired, and a periodic sweep backstops a lost webhook. A purchase can therefore stay pending until the next sweep runs, after the charge itself settles.

Available options:
pending,
actionRequired,
succeeded,
failed
amountCents
integer<int64>
required

Amount purchased, in cents.

currency
string
required

ISO 4217 currency code, lowercase.

createdAt
string<date-time>
required

When the purchase attempt was started.

expiresAt
string<date-time>
required

When the purchased credits stop being usable.

failureCode
string | null

Machine-readable decline reason. Set when status is failed, and also set to ambiguous_upstream while status is pending if a prior attempt's outcome could not be determined.

failureMessage
string | null

Human-readable decline detail, set only when status is failed.