How it works
POST /wallet/create.
Step 1: Initiate Swap
Preview the exchange rate and resulting converted amount before committing.Requires
Idempotency-Key header.string
required
The source wallet currency code (ISO 4217), e.g.
"USD", "EUR".string
required
The target wallet currency code (ISO 4217), e.g.
"BRL", "MXN", "CLP".number
required
Amount in the source currency to convert.
Step 2: Process Swap
Execute the conversion. Funds are debited from thefrom_currency wallet and credited to the to_currency wallet at the live rate.
Requires
Idempotency-Key header. Use a new, unique key for the process step — reusing the init key will be rejected.string
required
The source wallet currency code.
string
required
The target wallet currency code.
number
required
Amount in the source currency to convert.
string
Optional description for this swap, recorded on the transaction record.
Full example
Node.js — complete swap flow
Notes
- Both wallets must exist before swapping. Create them with
POST /wallet/createif needed. - The live rate is fetched at execution time — rates are not locked between
/initand/process. Use/initto show the customer a preview, then execute/processpromptly. - Swaps are recorded as
currency_swaptransactions and appear in your transaction history. - Check available wallet balances with
GET /wallet/balancebefore initiating.

