Skip to main content
POST
Start a credit purchase

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to buy prepaid translation credit.

amount_cents
integer
required
Example:

2500

success_url
string<uri> | null

Absolute URL the browser is returned to after a completed payment. Defaults to the deployment's configured success page. A session_id query parameter identifying the checkout is appended to it.

Required string length: 1 - 2083
Example:

"https://app.example.com/billing/success"

cancel_url
string<uri> | null

Absolute URL the browser is returned to if the customer abandons checkout. Defaults to the deployment's configured cancel page. Abandoning checkout changes no balance.

Required string length: 1 - 2083
Example:

"https://app.example.com/billing/cancel"

Response

Successful Response

Where to send the browser to complete the purchase.

No quantity of credit is quoted: credit is money, so a settled payment of amount_cents adds exactly amount_cents to the balance.

checkout_id
string
required
checkout_url
string
required