Last Updated: 22 July 2024 | Change Log

Get FX rates

Retrieve an FX rate pairing.


Get Started

Start using our FX API by setting your headers.

Authorization: {your_credentials}
Content-Type: application/vnd.worldpay.foreignexchange-v1+json

Request

GET https://try.access.worldpay.com/foreignExchange/rates/

Example query string

GET https://try.access.worldpay.com/foreignExchange/rates/foreignExchange/rates?intent=PAYOUT&sourceCurrency=EUR&targetCurrency=GBP&entity=PO431501733

Optional string parameters

Field NameDescriptionData Type/FormatMin-Max LengthValidation Criteria
intentPayment method for which rates should be retrieved.
Available values:
  • PAYOUT - FX rate for single account payout request
  • FX DEAL - FX rate for internal transfer requests between two consumer accounts
String1-50
entityleave empty
sourceCurrencyThe transaction currency code. If not supplied, the response contains rates for all source currencies against the target currency.ISO 4217

Valid currency codes.
0-3Must be upper case.
targetCurrencyYour funding (settlement) currency code. If not supplied, the response contains rates for all target currencies against the source currency.ISO 4217

Valid currency codes.
0-3Must be upper case.

Response

Successful response example

{
    "rates": [
        {
            "rateId": "R138151125",
            "intent": "MULTI-CURRENCY PRICING",
            "sourceCurrency": "USD",
            "targetCurrency": "EUR",
            "bidRate": 0.93010410,
            "askRate": 0.91169340,
            "entity": "PO4043058348",
            "issuedDate": "2024-05-17T04:00:00.000Z",
            "validFrom": "2024-05-20T04:00:00.000Z",
            "validTo": "2024-05-21T03:59:59.000Z"
        }

    ]
}

Successful response fields

Field NameDescriptionData Type/Format
rateIdId of the rate request.AN (Length: ≤50)
intentPayment method for which rates are retrieved. If an intent was not provided in the request and the retrieved rates are applicable for both PAYOUT and FX DEAL, then the value of the intent field in the response is PAYOUT/FX DEAL.AN (Length: ≤50)
sourceCurrencyThe debit currency.ISO 4217

Valid currency codes.
targetCurrencyThe credit currency.ISO 4217

Valid currency codes.
bidRateThe bid rate for the currency pairing. This rate is applied when you are selling funds in the source currency by submitting PAYOUT or FX DEAL.N
askRateWhilst returned, is not used for Payout/ Payin processing.N
issuedDateDate when the rates were issued.datetime (UTC)
validFromStart date the rates become applicable.datetime (UTC)
validToInclusive end date of the rate.datetime (UTC)

Error response example

{
  "errorName": "urlContainsInvalidValue",
  "message": "The URL contains a value or values that are invalid",
  "validationErrors": [
    {
      "errorName": "fieldHasInvalidValue",
      "message": "Invalid SourceCurrency value",
      "queryParameter": "SourceCurrency"
    }
  ]
}

Error response codes

ErrorMessageQueryScenario
unauthorizedRequestThe request is unauthorizedUnauthorized request
forbiddenForbidden
urlContainsInvalidValueThe URL contains a value or values that are invalidQuery string parameters are invalid
stringIsTooLongThe length must be 50 characters or fewerIntentLength of intent query string parameter is more than 50 characters
fieldHasInvalidValueInvalid SourceCurrency valueSourceCurrencysourceCurrency is invalid
fieldHasInvalidValueInvalid TargetCurrency valueTargetCurrencytargetCurrency is invalid
fieldHasInvalidValueIntent is not valid for the current ConsumerIntentInvalid value of intent
notFoundNo rates foundRates not found
internalErrorOccurredSomething went wrongInternal error

Next steps


Create FX quote
Get FX quote