Currency

CartQL will automatically format cart and item totals based on the set currency. You can set the currency when creating a cart, or by updating it later.

Currency Object

FieldTypeDescription
codeCurrencyCodeThe currency code enum, e.g. USD, GBP, EUR
symbolStringThe currency symbol, e.g. $, £,
thousandsSeparatorStringThe thousand separator
decimalSeparatorStringThe decimal separator
decimalDigitsIntThe number of decimal places

Money Object

FieldTypeDescription
amountIntThe raw amount in cents/pence
currencyCurrency!The currency of the money amount
formattedString!The formatted amount, e.g. $10.00