Get Conversion Rate

This page will help you get started with Currency conversions.

For more information on how to use the currency conversion service, please refer to the Currency conversion page in the guides section.

POST/currency-conversion

Body application/json

account_idstringrequired

The unique identifier of the account. You find this information on the WHITELABEL dashboard (UUID; 36 chars).

amountobjectrequired

Amount to be converted

Show amount properties
valuenumberrequired

Amount to convert (must be equal or greater than 0).

currencystringrequired

The currency used to make the payment (ISO 4217; 3 chars).

currency_conversionobject

Information to make the conversion

Show currency_conversion properties
cardholder_currencystringrequired

The currency to make the conversion (ISO 4217; 3 chars).

provider_dataobjectrequired

Provider information

Show provider_data properties
id"CIBC" | "MERCADO_PAGO"required

Identification of the provider

payment_methodobject

Payment method information. Provide either token, vaulted_token, or card.

Show payment_method properties
tokenstring

Payment method token (UUID; 36 chars).

vaulted_tokenstring

Vaulted payment method token (UUID; 36 chars).

cardobject

Card information required for the currency conversion. Only for PCI compliant merchants.

Show card properties
card_dataobject

Card data information

Show card_data properties
numberstringrequired

Card number without separators. Available for PCI-certified merchants (MIN 8).

expiration_monthinteger<int32>required

Card expiration month (01-12). Available for PCI-certified merchants (2 chars).

expiration_yearinteger<int32>required

Card expiration year. Available for PCI-certified merchants (4 chars).

holder_namestringrequired

Cardholder full name. Available for PCI-certified merchants (MIN 3; MAX 26).

Response

200

idstring
amountobject
Show amount properties
valueinteger
currencystring
currency_conversionobject
Show currency_conversion properties
cardholder_currencystring
cardholder_amountnumber
ratenumber
provider_dataobject
Show provider_data properties
idstring
transaction_idstring
response_codestring
response_messagestring
raw_responseobject
Show raw_response properties
fxRateInquiryResponseobject
Show fxRateInquiryResponse properties
localDateinteger
localTimeinteger
merchantIDstring
rateEndTimeinteger
ratePreferenceCodestring
rateStartTimeinteger
rateValidityPeriodinteger
ratesobject[]
Show rates properties
cardholderAmountnumber
cardholderCurrencystring
merchantAmountinteger
merchantCurrencystring
ratenumber
rateInquiryRefstring
responseCodestring
responseMessagestring
sessionIdstring
terminalIDstring
traceNumberinteger
expired_atstring

400

Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/currency-conversion" \
  -H "Content-Type: application/json" \
  -H "X-Public-Api-Key: <X-Public-Api-Key>" \
  -H "X-Private-Secret-Key: <X-Private-Secret-Key>" \
  -d '{
  "account_id": "string",
  "amount": {
    "value": 0,
    "currency": "string",
    "currency_conversion": {
      "cardholder_currency": "string"
    }
  },
  "provider_data": {
    "id": "CIBC"
  },
  "payment_method": {
    "token": "string",
    "vaulted_token": "string",
    "card": {
      "card_data": {
        "number": "string",
        "expiration_month": 0,
        "expiration_year": 0,
        "holder_name": "string"
      }
    }
  }
}'
Response
{
  "id": "599cc714-9bb6-4a3c-8465-c360cd47e04e",
  "amount": {
    "value": 10000,
    "currency": "COP",
    "currency_conversion": {
      "cardholder_currency": "USD",
      "cardholder_amount": 2.58,
      "rate": 3879.812207,
      "provider_data": {
        "id": "CIBC",
        "transaction_id": "274c4fc9a1e3c27625fc4d925e0331783c3c5c94358280158d3980e97ac66795a80970d48c176078f394106345c05215431bbc6260a6980db3a2e0b753db1a3f32d0c8adfc02c18794dc07ac1c13a14e581a3d78ba4b9c5afdae537f38cc495628239b7470a997cc8d5b51ae787603b64de3b19cea09f825f6fd13896656b75092bd7fe19a0560df29b94",
        "response_code": "2000",
        "response_message": "Successful",
        "raw_response": {
          "fxRateInquiryResponse": {
            "localDate": 210,
            "localTime": 180927,
            "merchantID": "18695684",
            "rateEndTime": 1739212767659,
            "ratePreferenceCode": "R1",
            "rateStartTime": 1739210967659,
            "rateValidityPeriod": 30,
            "rates": [
              null
            ],
            "responseCode": "2000",
            "responseMessage": "Successful",
            "sessionId": "2a587fa2-e7da-11ef-8b88-7e36493c761f",
            "terminalID": "CT000001",
            "traceNumber": 3594
          }
        }
      }
    }
  },
  "expired_at": "2025-02-10T18:39:27Z"
}