Convert an amount
Converts an amount from one currency to another at today's rate, with the same rules your shop uses for prices (your markup and rounding in Settings, Pricing). Pass a cart_id or invoice_id to use the rate saved on that cart or invoice instead of today's.
Secret and trusted tokens may call this. No permission is needed. Limited tokens are refused (403): use GET /fx/product in the browser.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
amount*numberThe amount to convert, in from_currency. Must be more than 0.
0 < valuefrom_currency*stringThe ISO 4217 code of the currency of amount.
to_currency*stringThe ISO 4217 code of the currency to convert to.
cart_id?stringUse the exchange rate saved on this cart.
invoice_id?stringUse the exchange rate saved on this invoice.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseshow?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
The converted amount.
application/json- response
An amount converted to another currency.
amount?numberThe converted amount, in currency.
currency?stringThe ISO 4217 code of the currency the amount was converted to.
formatted?Only present when you send formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/fx/amount?amount=20&from_currency=USD&to_currency=EUR'{ "amount": 18.4, "currency": "EUR"}Overview
Previous Page
Get a product price in a currency GET
Gets a product's price in one currency. When you set a price in that currency, you get it. Otherwise your default price is converted at today's rate with your markup and rounding. Pass a `cart_id` or `invoice_id` to use the rate saved on that cart or invoice. Any token may call this, including a limited token. No permission is needed.