跳转到主要内容
POST
在 Idempotency-Key(或 clientOperationId,同时提供时必须一致)中传入新的 UUID,重试时复用同一个 UUID。使用返回的 checkoutSessionId 轮询 查询结账状态 直至 fulfillmentStatus 为 FULFILLED。
在线调试工具会发送真实请求并立即扣除预付余额。

授权

Authorization
string
header
必填

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

Scopes

rest:orders:write

Access to orders:write REST operations

请求头

Idempotency-Key
string<uuid>

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

请求体

application/json

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

purchase
object
必填
clientOperationId
string<uuid>

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

响应

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

orderId
string
必填

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

checkoutSessionId
string
必填

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

balanceCents
integer
必填

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

必填范围: x >= 0