Switch a cart's currency

Changes the currency a cart is priced and settled in, and returns the cart with every amount converted to it. The cart keeps this currency on later reads and the order settles in it, so no header is needed after this call. Send the event's base currency to go back to base-currency prices. Amounts are always worked out from the current exchange rate, so a quote can move while the cart is open. Read the cart again just before checkout to get the amount that will be charged.

Authentication

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

Path parameters

cartIdstringRequired

Cart ID (UUID)

Headers

X-TT-CurrencystringOptional

Optional. May only repeat the currency in the body; a different currency returns 400. The body is what switches the cart.

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

Request

This endpoint expects an object.
currencystringRequiredformat: "^[A-Z]{3}$">=1 character

ISO 4217 currency to price and settle this cart in. Send the event’s base currency to go back to base-currency prices.

Response

Cart priced in its new currency.
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). 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: VoucherLine, ProtectionLine.

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.