When creating invoices in a foreign currency, always specify the CurrencyRef (ISO 4217 code) and ExchangeRate fields in the invoice payload; the exchange rate is expressed as units of home currency per one foreign currency unit.
Store both the foreign currency amount and the home currency equivalent at the time of invoice creation; most accounting APIs return both in the response.
At period end, retrieve the current exchange rates (from your accounting system or a rate service) and calculate the revalued home currency amount for each open foreign currency balance.
Compute the FX gain or loss as the difference between the original home currency amount and the revalued amount; post a journal entry debiting or crediting the unrealized FX gain/loss account and offsetting the AR or AP account.
When the invoice is paid, record the actual FX gain or loss (realized) by comparing the settlement exchange rate to the invoiced rate; post a corresponding realized FX journal entry.
Reverse unrealized FX revaluation journal entries at the start of the next period to avoid double-counting when the invoice is eventually settled.
Known gotchas
Exchange rate direction conventions differ between platforms; some APIs define the rate as home-per-foreign while others use foreign-per-home—verify the convention in the specific API documentation before populating the rate field.
Revaluation entries should use a dedicated unrealized FX gain/loss account, not the same account as realized gains/losses, to support accurate period-end financial reporting.
Some accounting APIs auto-calculate FX gain/loss on payment matching; posting manual FX journal entries in addition can create duplicates—check whether the platform handles realized FX automatically.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp