Get a product price in a currency
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.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
product_id*stringThe product to price.
currency*stringThe ISO 4217 code of the currency to price it in.
quantity?numberThe quantity, so a volume price applies. The default is 1.
1cart_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 product's price in the currency.
application/json- response
A product's price in one currency.
price?numberThe price of one unit, in currency, at the quantity asked for (so a volume price applies). It is the price you set in that currency, or your default price converted at today's rate.
currency?stringThe ISO 4217 code of the currency.
formatted?Only present when you send formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/fx/product?product_id=widget¤cy=EUR'{ "price": 45.95, "currency": "EUR"}Convert an amount GET
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.
Overview
Next Page