Skip to main content
POST

Authorizations

Authorization
string
header
required

ProxyLayer API key. See the API Overview for key modes and scopes.

Scopes

rest:orders:write

Access to orders:write REST operations

Headers

Idempotency-Key
string<uuid>

Optional when clientOperationId is sent in the body; both values must match if supplied. UUID for this purchase.

Body

application/json

Purchase payload and optional clientOperationId (required if Idempotency-Key header is omitted).

purchase
object
required
clientOperationId
string<uuid>

Body alternative to the Idempotency-Key header. One of the two is required; if both are sent, they must match.

Response

Paid order ID, checkout session ID, and updated prepaid balance.

orderId
string
required

Paid order ID. Look it up in GET /api/v1/orders to track delivery.

checkoutSessionId
string
required

Checkout session ID. Poll GET /api/v1/checkouts/{id} to track delivery.

balanceCents
integer
required

Remaining prepaid balance in USD cents (on idempotent replays, reflects balance at replay time).

Required range: x >= 0