Skip to navigation

Look up the order a cart produced

Recovery lookup for a client that lost its Idempotency-Key — after a timeout, a crash, or a closed tab — and needs to learn whether the cart it was checking out was charged.

Use the cartId returned when the cart was created and an API key for the retailer where the order was placed. No customer authentication is required. Keep the cart ID on your server.

data holds at most one order — the latest the cart produced for that retailer. If no order is found for that cart and retailer, data is empty, whether the cart never became an order, the cartId is unknown, or the order belongs to another retailer. An empty result does not confirm that no payment occurred under another retailer.

The order’s status says what to do next. PROCESSING means the payment is still settling, so keep polling. FAILED means the payment did not complete. It is final, so stop polling and let the shopper pay again; their next attempt on the same cart becomes the order this lookup returns. Any other status is the order’s outcome, and GET /orders/{orderId}?cartId= returns that order in full.

Authentication

X-TT-API-Keystring
API Key authentication via header

Headers

X-TT-PlatformenumRequired
Identifies the platform the request comes from.
Allowed values:
X-TT-RetailerstringRequired
Your retailer identifier, provided during onboarding. It must be a retailer your API key was issued for.

Query parameters

cartIdstringRequiredformat: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$">=1 character

Cart ID, from POST /carts. Returns only the order this cart produced. It also reads that order, so keep it on your server.

limitintegerOptional1-1000Defaults to 50
Maximum number of results to return.
offsetintegerOptional>=0Defaults to 0
Number of results to skip for pagination.

Response headers

X-RateLimit-Limitinteger
How many requests this API key may make for this retailer in the current window. Sent only when the request was counted against that limit. A response served from cache was not counted and repeats the value it was cached with.
X-RateLimit-Remaininginteger
How many requests this API key has left for this retailer in the current window. Sent only when the request was counted against that limit. A response served from cache was not counted and repeats the value it was cached with.

Response

A page holding the latest order for this cart and retailer, empty when none is found.
datalist of objectsOptional
List of entities in the current page.
paginationobjectOptional
Pagination metadata.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error