Create a quote

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:

  1. Quote created with source_amount:
  • Payout MUST use: currency = source_currency and amount = source_amount
  • Example: Quote with source_amount=100, source_currency=USD → Payout with currency=USD, amount=100
  1. Quote created with destination_amount:
  • Payout MUST use: currency = destination_currency and amount = destination_amount
  • Example: Quote with destination_amount=392.72, destination_currency=MYR → Payout with currency=MYR, amount=392.72
  1. Quote created with no amount:
  • Payout can use either source_currency or destination_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_amount but send the payout with destination_currency
  • You create a quote with destination_amount but send the payout with source_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
}

 
Body Params
string
required
length ≤ 2
string
length ≤ 3
Defaults to USD
string
required
length ≤ 3
float
≤ 9999999999.99
Defaults to 100
float
≤ 9999999999.99
Responses

Language
Credentials
URL
LoadingLoading…
Response
Choose an example:
application/json