Checkout
Confirm the buyer's choice
POST/checkout/selections
Browser · publishable key
Browser only, called by the widget when the buyer confirms. Returns a signed selection token (compact JWS, EdDSA) for one offer of this session. The widget hands it to your page; send it to your server and on to POST /shipments as checkoutSelection.
Request
Body CheckoutSelectionRequest
| Field | Type | Description |
|---|---|---|
quoteIdRequired | string | Quote IDPattern ^(?:QD-QT-[A-F0-9]{24}|QDQT[A-Z0-9]{3,32})$ |
destinationOptional | object | |
textOptional | string or null | |
latitudeOptional | number or null | |
longitudeOptional | number or null |
Response
| Status | Meaning |
|---|---|
201 | Signed selection |
The body is { "status": "success", "data": … }. Fields of data (CheckoutSelectionIssued):
| Field | Type | Description |
|---|---|---|
tokenRequired | string | Compact JWS (EdDSA). Send it to your server; never trust the decoded body without verifying. |
selectionIdRequired | string | |
expiresAtRequired | string (date-time) | |
selectionRequired | CheckoutSelection | What the buyer chose. Point and price come from Qoene, never from the browser. |
Errors
Errors use the error envelope { "status": "error", "message", "code"?, "details"? }.
| Status | When |
|---|---|
400 | The request is not valid. A field is missing or invalid, or the Idempotency-Key header is missing or malformed. |
401 | Missing, invalid, expired or revoked API key. The API key is missing, invalid, expired or revoked. |
403 | The key lacks the scope, or the operation needs a LIVE key. The key lacks the scope, or this call needs a LIVE key (LIVE_KEY_REQUIRED), or the Business owner is not verified (SENDER_VERIFICATION_REQUIRED). |
404 | Not found for this Business and environment. IDs from another Business or environment are always 404. Not found for this Business and environment. IDs from another Business or the other environment are always 404. |
409 | Idempotency key reused with another body, or the resource changed state. The idempotency key was used with a different body, a reference is already taken, or the resource changed state. |
410 | The checkout session or price has expired. |
429 | Too many requests. See the RateLimit headers. Too many requests. Wait for Retry-After, then retry with the same idempotency key. |