Get cart

Returns the current state of a cart, including all line items and hold expiration times.

Authentication

X-TT-API-Keystring
API key for authentication. Pass as X-TT-API-Key header. Key prefixes: - Production: sk_live_* - Test: sk_test_* Example: X-TT-API-Key: sk_live_abc123

Path parameters

cartIdstringRequired
Unique identifier of the cart.

Headers

X-Client-PlatformenumRequired
Client platform identifier. Required for all requests. - `ios` - iOS native app - `android` - Android native app - `web` - Web application (browser) - `server` - Server-to-server (internal services, API testing)
Allowed values:
X-Client-VersionstringOptionalformat: "^\d+\.\d+\.\d+$"

Client app version. Required for ios, android, and web platforms. Optional for server platform. Format: Semantic version (e.g., “3.1.0”, “2.5.1”)

Accept-LanguagestringOptional

Preferred language for error messages (defaults to en-US if not provided). Supported languages: en-US, en-GB, es-ES, fr-FR, de-DE, ja-JP. Format: RFC 9110 language tags with quality values.

X-Request-IDstringOptionalformat: "^req_[a-zA-Z0-9]+$"

Client-generated request identifier for distributed tracing. Server echoes this value in response headers. Format: req_ prefix + random string.

Response

Cart details.
idstring
Cart ID
itemslist of objects

Items currently in the cart (held inventory). Does NOT include fees, protection, or credits - see receiptLines for those.

receiptLineslist of objects

Server-ordered display lines for receipt rendering. Iterate in sequence. Always includes SubtotalLine. Conditionally: FeeLine, VoucherLine, ProtectionLine.

totalobject

Total amount to be charged at checkout (locked at cart creation). This value is used for expectedTotal validation in POST /orders.

expiresAtdatetime
UTC timestamp when the cart hold expires and inventory is released. Clients should display a countdown timer and warn users before expiration.
protectionobject or null
Protection covering all items. Null if not added.
totalTaxesobject or null

DISCLOSURE ONLY - taxes already included in total. Omitted when not disclosed (e.g., UK market).

Errors