Foreign Exchange Rates

Download Foreign Exchange Rates API Reference

Foreign Exchange Rates API

The Foreign Exchange Rates API provides an easy access to the Visa’s currency conversion rate for a given currency pair.


Foreign Exchange Rates

This API returns Visa's conversion rates for a given currency pair.

  • A request with rateProductCode = "A" returns indicative daily rates that apply to transactions with card as the payment instrument. This is an indicative rate and may be different from the actual rate for settlement of transaction.
  • A request with rateProductCode = "B" returns indicative daily rates that apply to transactions with bank-account as the payment instrument. This is an indicative rate and may be different from the actual rate for settlement of transaction.
  • A request with rateProductCode = "BANK" returns real-time rates that apply to transactions with bank-account as the payment instrument. This option is only available to clients integrating with “Visa Direct Account and Wallet Send API” bundle.
  • A request with rateProductCode = "WALLET" returns real-time rates that apply to transactions with wallet as the payment instrument. This option is only available to clients integrating with “Visa Direct Account and Wallet Send API” bundle.
The following 3 use cases are supported on the new BANK and WALLET flows:
  1. Provide a currency pair and set quoteIdRequired=true in the FX Request; the response returns a quote ID that can be used on all payout transactions for the same currency pair, until the quote expires.
  2. Provide a currency pair and an amount value in source currency in the FX Request; the response returns a rate and destination amount. This rate and destination amount is only indicative, and not guaranteed to be the same at the time of the payout transaction.
  3. Provide a currency pair and an amount value in destination currency in the FX Request; the response returns a rate and source amount. This rate and source amount is only indicative, and not guaranteed to be the same at the time of the payout transaction.

Please note that the API specifications have been upgraded from swagger 2.0 to OpenAPI 3.0, and clients who have already been accessing this page for Foreign Exchange Rates V2 API documentation may now see a difference in the documentation rendering. However, the API functionality for “A” & “B” rateProductCodes has not changed.

Request
Request Body schema: application/json
One of:
One of:
destinationCurrencyCode
required
stringiso-4217

Destination amount currency code in ISO 4217 Numeric code

Example: "826"
rateProductCode
required
string

indicates which rate source to be used like card based vs account based rates.

  • A - Card based rates
  • B - Account based rates
Enum: "A" "B"
sourceAmount
required
string [ 1 .. 13 ] characters \d{1,8}(\.\d{1,4})?|\d{1,9}(\.\d{1,3})?|\d{1,...

This field is required for source-to-destination lookup, and assumes that the “sourceAmount” in the request includes any applicable originator markup (Note: When submitting the OCT payload transaction, the payload must exclude any markup). Minor currency units after the decimal point, must be less than or equal to the defined currency exponent. This field cannot be 0 or null.
Examples- 99.85, 99.00, etc indicate 2 digits after the decimal point for a 2-exponent currency, 989.333, 989.340, 989.000, etc indicate 3 digits after the decimal point for a 3-exponent currency, & 95, 100 etc indicate no decimal point or minor units for a 0-exponent currency.

Example: "100.55"
sourceCurrencyCode
required
stringiso-4217

Source amount currency code in ISO 4217 Numeric code

Example: "840"
object
bin
number <double> [ 6 .. 11 ] characters

The clients of Funds Transfer APIs can choose to provide acquiringBin for reporting purpose. This is the Bank Identification Number (BIN) under which your Funds Transfer is registered. This must match the information provided during onboarding process. This BIN value is conditionally required in the API request to apply default markup rate to the transaction. The markupRate provided in the API request takes precedence over the configured defaults.

Example: 408999
object
currencyCode
stringiso-4217

Source Settlement currency code in ISO 4217 Numeric code

Example: "840"
markupRate
string [ 0 .. 6 ] characters \d{1,2}(\.\d{1,3})?

The percentage FX mark up rate (<100) to be applied to the transaction. (Note: The markup is used to estimate how much to collect from a sender and when submitting the OCT payload transaction, the payload must exclude any markup). Example- A value of 0.07 will assume a 0.07% markup applies to the FX transaction. The default markup rates can also be optionally configured as part of onboarding process. If the markup value is not supplied in the FX inquiry API, and the Acquiring BIN is provided, the markup configured during onboarding will be picked up and applied to the transaction. To override any markup defaults set up on the account, always send a markup value of 0.00 to indicate 0% markup.

Example: "0.07"
transactionType
string

Indicate that the fx rate is for a push (OCT) or pull(AFT) transaction. If the field is not passed, it defaults to push (OCT). This field is only applicable when rateProductCode is A.

Enum: "PUSH" "PULL"
Responses
200

FX response body

Response Schema: application/json
One of:
One of:
conversionRate
required
string <= 14 characters \d{1,7}(\.\d{1,12})?

This is the Conversion Rate. Note: The ConversionRate field excludes any markup.

Example: "0.07"
rateProductCode
required
string

indicates which rate source to be used like card based vs account based rates.

  • A - Card based rates
  • B - Account based rates
Enum: "A" "B"
object
object
amount
string [ 1 .. 13 ] characters \d{1,8}(\.\d{1,4})?|\d{1,9}(\.\d{1,3})?|\d{1,...

The transaction amount in settlement currency.

Example: "100.55"
conversionRate
string <= 14 characters \d{1,7}(\.\d{1,12})?

ConversionRate

Example: "0.07"
currencyCode
stringiso-4217

settlement amount currency code in ISO 4217 Numeric code

Example: "840"
destinationAmount
string [ 1 .. 13 ] characters \d{1,8}(\.\d{1,4})?|\d{1,9}(\.\d{1,3})?|\d{1,...

Conditional.
This field is required for source-to-destination lookup.

The transaction amount in destination currency.

Example: "75.85"
markupRateApplied
string [ 0 .. 6 ] characters \d{1,2}(\.\d{1,3})?

The percentage FX mark up rate (<100) to be applied to the transaction. Example- A value of 0.07 will assume a 0.07% markup applies to the FX transaction. The default markup rates can also be optionally configured as part of onboarding process. If the markup value is not supplied in the FX inquiry API, and the Acquiring BIN is provided, the markup configured during onboarding will be picked up and applied to the transaction.

Example: "0.07"
sourceAmountWithoutMarkup
string [ 1 .. 13 ] characters \\d{1,8}(.\\d{1,4})?|\\d{1,9}(.\\d{1,3})?|\\d...

Source Transaction Amount excluding markup in source currency. This field will be returned in a source-to-destination inquiry response when markup is applicable.

Example: "75.85"
400

Bad Request

Response Schema: application/json
required
object
message
required
string

Free form text message describing the error condition.

Example: "Missing or Invalid Request Parameters"
reason
required
string

Drives the error handling business logic for API Consumer. can provide custom/business error codes

Example: "3001"
status
required
string

HTTP Status Code

Example: "400"
Array of objects
Array
location
string

reference to a field which failed validation

Example: "destinationCurrencyCode"
message
string

field specific error message

Example: "Missing or Invalid content"
403

Forbidden

Response Schema: application/json
required
object
message
required
string

Free form text message describing the error condition.

Example: "Product code value B indicating pay-to-account rates is not supported with current subscription."
reason
required
string

Drives the error handling business logic for API Consumer. can provide custom/business error codes

Example: "4001"
status
required
string

HTTP Status Code

Example: "403"
500

Service Unavailable

Response Schema: application/json
required
object
message
required
string

Free form text message describing the error condition.

Example: "An error occurred while processing the request. Please contact your Visa Representative"
reason
required
string

Drives the error handling business logic for API Consumer. can provide custom/business error codes

Example: "3004"
status
required
string

HTTP Status Code

Example: "500"

© Copyright Visa. All Rights Reserved.

NOTICE: The software and accompanying information and documentation (together, the “Software”) remain the property of and are proprietary to Visa and its suppliers and affiliates. The Software remains protected by intellectual property rights and may be covered by U.S. and foreign patents or patent applications. The Software is licensed and not sold.

By accessing the Software you are agreeing to Visa's terms of use (developer.visa.com/terms) and privacy policy (usa.visa.com/legal/global-privacy-notice.html). In addition, all permissible uses of the Software must be in support of Visa products, programs and services provided through the Visa Developer Program (VDP) platform only (developer.visa.com). THE SOFTWARE AND ANY ASSOCIATED INFORMATION OR DOCUMENTATION IS PROVIDED ON AN “AS IS,” “AS AVAILABLE,” “WITH ALL FAULTS” BASIS WITHOUT WARRANTY OR CONDITION OF ANY KIND. YOUR USE IS AT YOUR OWN RISK.

post/forexrates/v2/foreignexchangerates

Sandbox server

https://sandbox.api.visa.com/forexrates/v2/foreignexchangerates
Request samples
application/json
{
  • "initiatingPartyId": 1002,
  • "rateProductCode": "BANK",
  • "destinationCurrencyCode": "USD",
  • "sourceCurrencyCode": "EUR",
  • "quoteIdRequired": true
}
Response samples
application/json
{
  • "rateProductCode": "string",
  • "destinationCurrencyCode": "string",
  • "quoteIdExpiryDateTime": "string",
  • "sourceCurrencyCode": "string",
  • "conversionRate": "string",
  • "quoteId": "string"
}