Get cart

Returns the current state of a cart, including all line items and hold expiration times. Prices come back in the currency the cart was created in. Send the `currency` query parameter to re-quote this response in another currency; a currency this event is not sold in returns `400`, and one it is sold in but that cannot be priced right now returns `503`. Send the `country` query parameter to include payment methods that depend on where the shopper is buying from, such as Klarna — without it those methods are never listed. Neither parameter changes the cart.

Authentication

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

Path parameters

cartIdstringRequiredformat: "(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

Headers

X-TT-PlatformenumRequired
Identifies the platform the request comes from.
Allowed values:

Query parameters

currencystringOptionalformat: "^[A-Z]{3}$"

ISO 4217 currency to re-quote this response in, without changing the cart. Omit to price in the currency the cart carries. A currency this event is not sold in returns 400; one it is sold in but that cannot be priced right now returns 503.

countrystringOptionalformat: "^[A-Z]{2}$"
ISO 3166-1 alpha-2 country the shopper is buying from. Send it to include payment methods that depend on the shopper's country, such as Klarna, in `options.paymentMethods` — without it those methods are never listed. Re-request the cart with `country` once you know where the shopper is. Does not change the cart.

Response

Cart details.
idstring
Cart ID
expiresAtstring
UTC timestamp when the cart hold expires and inventory is released. Clients should display a countdown timer and warn users before expiration.
itemslist of objects

Items currently in the cart (held inventory). Each item’s priceOption carries the itemized fees[] disclosure. Protection and credits are NOT items — see receiptLines.

receiptLineslist of objects

Server-ordered display lines for receipt rendering. Iterate in sequence. Always includes SubtotalLine. Conditionally: VoucherLine, ProtectionLine, CreditLine. Fees are never a receipt line — they are disclosed per item on priceOption.fees.

totalobject

Monetary amount in minor units (cents for USD). Never uses floating point to avoid precision errors.

protectionobjectOptional
Protection covering all items. Null if not added.
optionsobjectOptional
Options that can be applied to this cart. Each key is present only when that option is available.
voucherobjectOptional
A promo code applied to a cart.
totalTaxesobjectOptional

Monetary amount in minor units (cents for USD). Never uses floating point to avoid precision errors.