Inyo

Foreign Exchange

The Foreign Exchange API returns real-time FX rates for cross-currency payments. Use the rate and fxId in your Push Transaction or Pull and Push request.

Requesting a Rate

Returns an exchange rate tailored to the payment method. Different methods (bank account, wallet, card) may carry different FX spreads.

Endpoint

POST https://{FQDN}/v2/foreign-exchange

Headers:

HeaderValue
AuthorizationBearer {accessToken}
Content-Typeapplication/json

Request

FieldTypeRequiredDescription
sourceCurrencyCodestringYesSource currency (ISO 4217, e.g., "USD")
destinationCurrencyCodestringYesDestination currency (ISO 4217, e.g., "BRL")
paymentMethodstringYesPayment method for rate calculation (see values below)
sourceCurrencyAmountnumberNoAmount in source currency. Accepted as a number or a quoted string (20.00 and "20.00" both work). It does not change the response β€” compute the destination amount yourself as sourceCurrencyAmount Γ— conversionRate
destinationCountryCodestringNoDestination country, ISO 3166-1 alpha-3 (e.g., "KEN", "PHL") β€” narrows the rate to a specific corridor. A two-letter code is rejected with PAY_001

paymentMethod Values

ValueDescription
BANK_ACCOUNTCross-border bank account payout
WALLETDigital wallet payout
CARDCard payout

These three are the accepted values. Any other value is rejected with PAY_005 β€” Payment method not found for description.

A PAY_001 β€” No router found for agent and payment method means the opposite: the method is valid, but your account has no route for that method on that corridor.

Example β€” Rate for Card Payout

curl -X POST https://{FQDN}/v2/foreign-exchange \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
  -H 'Content-Type: application/json' \
  -d '{
    "sourceCurrencyCode": "USD",
    "destinationCurrencyCode": "BRL",
    "paymentMethod": "CARD"
  }'

Example β€” Rate with Amount and Country

curl -X POST https://{FQDN}/v2/foreign-exchange \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
  -H 'Content-Type: application/json' \
  -d '{
    "sourceCurrencyCode": "USD",
    "sourceCurrencyAmount": 100.00,
    "destinationCurrencyCode": "PHP",
    "destinationCountryCode": "PHL",
    "paymentMethod": "WALLET"
  }'

Response (200)

{
  "fxId": "763eea51-4c57-4fbc-9729-6484b06daac2",
  "conversionRate": 59.57535,
  "sourceCurrencyCode": "USD",
  "destinationCurrencyCode": "PHP",
  "quoteIdExpiryDateTime": "2026-08-11T14:49:06.490Z"
}

Response Fields

FieldTypeDescription
fxIdstringFX quote identifier β€” pass this in your payment request to lock in the rate
conversionRatenumberExchange rate applied
sourceCurrencyCodestringSource currency
destinationCurrencyCodestringDestination currency
quoteIdExpiryDateTimestringISO 8601 expiry timestamp β€” the rate is invalid after this time

These five fields are the entire response. It does not echo sourceCurrencyAmount, destinationCurrencyAmount, or paymentMethod β€” the converted amount is never returned. To fill recipientAmount.total on the payment, multiply it yourself:

recipientAmount.total = sourceCurrencyAmount Γ— conversionRate

Usage in Payments

Pass the fxId and conversionRate from the response into your payment request:

  • fxId β†’ payment fxId field
  • conversionRate β†’ payment exchangeRate field

Note: FX quotes have a limited validity period. Check quoteIdExpiryDateTime and request a new quote if expired before submitting the payment.

What's Next