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
| Field | Type | Description |
|---|
code | CurrencyCode | The currency code enum, e.g. USD, GBP, EUR |
symbol | String | The currency symbol, e.g. $, £, € |
thousandsSeparator | String | The thousand separator |
decimalSeparator | String | The decimal separator |
decimalDigits | Int | The number of decimal places |
Money Object
| Field | Type | Description |
|---|
amount | Int | The raw amount in cents/pence |
currency | Currency! | The currency of the money amount |
formatted | String! | The formatted amount, e.g. $10.00 |