_in_base. To report revenue across countries and currencies, add up amount_in_base. Every order’s amount_in_base is in US dollars, so the sum is too.
The two sets of amounts
The base currency is Fluid’s, not the company’s. A company that sells only in euros still gets its
_in_base amounts in US dollars.
How an order is converted
When an order is created, Fluid records the exchange rate between US dollars and the order’s currency inbase_to_currency_rate: how many units of the order’s currency make one US dollar. Each base amount is the order amount divided by that rate, rounded to the cent.
For example, a German shopper pays €92.00 when the euro rate is 0.92:
amount_in_base stays the same as exchange rates move, and last quarter’s revenue reads the same today as it did then.
Report revenue across currencies
- Sum
amount_in_base, notamount. Addingamountacross orders mixes currencies, so €92 and ¥15,000 add up to a meaningless 15,092. - Don’t convert with today’s rate. Use the base amounts the order already has. They were converted at the rate in effect when each order was placed.
- To show a total in another currency, convert the US dollar sum once, at the end. Fluid’s own analytics work this way. They add up the orders’
amount_in_base, then convert. - Orders in the same currency can be added directly. When every order you’re adding has the same
currency_code, theiramountvalues add up correctly in that currency.
Edited orders
The base amounts describe the order as it was placed. An order edited after checkout keeps its originalamount_in_base. Its new total is current_amount, in the order’s own currency, and has no US dollar field.
To report an edited order’s new total in US dollars, divide current_amount by the order’s base_to_currency_rate, the same rate its base amounts used. Don’t use a current exchange rate.
Where you’ll find these fields
The order responses in the API reference carrycurrency_code, amount_in_base, and, on most of them, base_to_currency_rate:
- List the company’s orders returns
currency_codeandamount_in_basefor each order. - Show order returns the order’s amounts, its base amounts, and its
base_to_currency_rate. - Edit an order returns the edited order with its
current_amount.
Some generated reference pages describe
amount_in_base as being in “the company’s base currency”. It’s in Fluid’s base currency, US dollars, for every company.Related
- Checkout: how an order is created.
- API overview: base URLs, authentication, and pagination.