This endpoint generates an FX rate for a particular currency pair.
When this service is called, it returns a quote_id, which uniquely identifies the quoted foreign exchange (FX) rate, including any applicable fees and taxes. This quote_id can be used in subsequent requests to create Payouts, as long as it remains within the quote's validity period.
There are three possible ways to create a quote ID configuration:
- Request with no amount specified
- Request specifying the source amount
- Request specifying the destination amount
Configuration required: to use the Quote API, please contact your Technical Account Manager or email us at [email protected] to request setup.
⚠️ IMPORTANT: Quote-to-Payout Currency Contract
The amount type you specify when creating the quote determines which currency and amount you MUST use in the subsequent payout request.
Rules:
- Quote created with
source_amount:
- Payout MUST use:
currency = source_currencyandamount = source_amount - Example: Quote with
source_amount=100, source_currency=USD→ Payout withcurrency=USD, amount=100
- Quote created with
destination_amount:
- Payout MUST use:
currency = destination_currencyandamount = destination_amount - Example: Quote with
destination_amount=392.72, destination_currency=MYR→ Payout withcurrency=MYR, amount=392.72
- Quote created with no amount:
- Payout can use either
source_currencyordestination_currency - The exchange rate will be applied accordingly
Common Error:
❌ Error Code 109: QUOTE_ID_AND_PAYOUT_TARGET_CURRENCY_MISMATCH
This error occurs when:
- You create a quote with
source_amountbut send the payout withdestination_currency - You create a quote with
destination_amountbut send the payout withsource_currency
Example of incorrect usage:
// Step 1: Create quote with source_amount
POST /payouts/v3/quote
{
"country": "MY",
"source_currency": "USD",
"destination_currency": "MYR",
"source_amount": 100
}// Response
{
"id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"details": {
"source_amount": 100,
"source_currency": "USD",
"destination_amount": 392.72,
"destination_currency": "MYR"
}
}// Step 2: Create payout (INCORRECT - will fail with error 109)
POST /payouts/v3
{
"quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"currency": "MYR", // ❌ WRONG - should be USD
"amount": 392.72 // ❌ WRONG - should be 100
}Correct usage:
// Step 2: Create payout (CORRECT)
POST /payouts/v3
{
"quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"currency": "USD", // ✅ Matches source_currency
"amount": 100 // ✅ Matches source_amount
}
