Skip to main content
POST
Buy extra credits for a partner

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

A key of your own for this purchase, so that a retry cannot make a second invoice

Required string length: 8 - 50
Pattern: ^[A-Za-z0-9_-]+$

Path Parameters

partnerId
string<uuid>
required

Partner ID

Body

application/json
usd
number
required

The dollars to spend on credits, to the cent: at least 10, at most 100000 in one request. The invoice is for the most whole credits that money buys at the list price of a credit, so it is never for more than this (12.34 buys 123 credits and the invoice says 12.30).

Required range: 10 <= x <= 100000
Example:

250

Response

The invoice was issued

success
boolean
required

Always true on a success.

Example:

true

data
object
required

The invoice for extra credits that was issued, and what paying it adds.

Example:
meta
object

Extra information about the answer: where a page sits in a list, the cursor of the next page, or warnings about a call that succeeded with a caveat.