FX invoicing and conversion
fx_invoicingCompare the local currency that lands from a USD invoice across the payment providers you name, using each provider's fees as you supply them, against a published reference exchange rate (European Central Bank reference rates, USD base).
Behavior: Deterministic, idempotent calculation with zero external side effects. For each rail you give (fixed fee in USD, percentage fee, exchange-rate markup) it computes the net USD after fees, the landed local amount, the total cost and its share of the invoice, ranks the rails, and reports the saving of the best over the worst. TrueCalci does not preset or verify any provider's pricing: providers price per currency route and account, so the fees are yours.
Usage Guidelines: Use when a freelancer or vendor invoicing in USD wants to compare payout providers whose fees they know. Do not use for domestic US employee vs contractor parity; use contractor_parity instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rails | Yes | The payment providers to compare, with the fees YOUR account is charged for this route. | |
| as_of_date | Yes | Civil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date. | |
| invoiceUsd | Yes | Gross billed invoice amount in USD ($). Must be a positive number greater than 0. | |
| targetCurrency | No | Payout destination currency code: 'EUR' (Euro), 'GBP' (British Pound), 'CAD' (Canadian Dollar), 'AUD' (Australian Dollar), 'INR' (Indian Rupee), 'SGD' (Singapore Dollar), 'BRL' (Brazilian Real), 'MXN' (Mexican Peso), or 'PHP' (Philippine Peso). | EUR |
| customMidMarketRate | No | Optional: your own USD-to-target exchange rate, used instead of the published reference rate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rails | No | ||
| currency | No | ||
| disclaimer | No | ||
| worst_rail | No | ||
| invoice_usd | No | ||
| minor_units | No | ||
| rate_pack_id | No | ||
| as_of_timestamp | No | ||
| target_currency | No | ||
| lowest_cost_rail | No | ||
| annual_savings_usd | No | ||
| statutory_authority | No | ||
| theoretical_max_local | No | ||
| single_invoice_savings_usd | No |