Requesting an exchange rate

Perform a quick exchange rate calculation between two currencies.

Before you start

Before you proceed with Requesting an exchange rate, make sure that you have completed the following steps:

How to retrieve an exchange rate

Retrieve a fast exchange rate calculation between two specified currencies using the FX Deal Calculation method. This allows you to estimate how much the recipient will receive in a different currency after applying the conversion rate.

Follow these steps to perform an exchange rate calculation:

  1. Set up your Authorization header:
    Include your Bearer token in the Authorization header:\

     Authorization: Bearer YOUR_ACCESS_TOKEN
  2. Prepare your request:

    • Endpoint:\
      GET https://secure.sandbox.paymentsgate.io/fx/calculation
    • Query parameters:
      • currency_from (required): ID or Symbol of the currency being exchanged (e.g., USD).
      • currency_to (required): ID or Symbol of the target currency (e.g., EUR).
      • amount (required): The amount in currency_from to be exchanged (e.g., 1000).
  3. Make the API call:

    Example request:\

    curl --request GET \
      --url 'https://secure.sandbox.paymentsgate.io/fx/calculation?currency_from=USD&currency_to=EUR&amount=1000' \
      --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

    Example response: A successful response will return a JSON object containing the exchange calculation details.\

    {
      "currency_from": {
        "_id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "USD",
        "symbol": "$",
        "label": "US Dollar"
      },
      "currency_to": {
        "_id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "EUR",
        "symbol": "€",
        "label": "Euro"
      },
      "rate1": 0.84,
      "net_amount": 840
    }

For more detail, please see the FX Deal Calculation API method description.