# 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](/reference/currency-conversion)  in the guides section.

**POST** `/currency-conversion`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Get Conversion Rate

## Authorization

- X-Public-Api-Key (apiKey in header)
- X-Private-Secret-Key (apiKey in header)

## Body

Content type: `application/json`

- `account_id` (string, required)
  The unique identifier of the account. You find this information on the [WHITELABEL dashboard](https://dashboard.whitelabel.com) (UUID; 36 chars).
- `amount` (object, required)
  Amount to be converted
  - `value` (number, required)
    Amount to convert (must be equal or greater than 0).
  - `currency` (string, required)
    The currency used to make the payment ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217); 3 chars).
  - `currency_conversion` (object)
    Information to make the conversion
    - `cardholder_currency` (string, required)
      The currency to make the conversion ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217); 3 chars).
- `provider_data` (object, required)
  Provider information
  - `id` ("CIBC" | "MERCADO_PAGO", required)
    Identification of the provider
- `payment_method` (object)
  Payment method information. Provide either `token`, `vaulted_token`, or `card`.
  - `token` (string)
    Payment method token (UUID; 36 chars).
  - `vaulted_token` (string)
    Vaulted payment method token (UUID; 36 chars).
  - `card` (object)
    Card information required for the currency conversion. Only for PCI compliant merchants.
    - `card_data` (object)
      Card data information
      - `number` (string, required)
        Card number without separators. Available for PCI-certified merchants (MIN 8).
      - `expiration_month` (integer<int32>, required)
        Card expiration month (01-12). Available for PCI-certified merchants (2 chars).
      - `expiration_year` (integer<int32>, required)
        Card expiration year. Available for PCI-certified merchants (4 chars).
      - `holder_name` (string, required)
        Cardholder full name. Available for PCI-certified merchants (MIN 3; MAX 26).

Example:

```json
{
  "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"
      }
    }
  }
}
```

## Responses

### 200

200

- `id` (string)
- `amount` (object)
  - `value` (integer)
  - `currency` (string)
  - `currency_conversion` (object)
    - `cardholder_currency` (string)
    - `cardholder_amount` (number)
    - `rate` (number)
    - `provider_data` (object)
      - `id` (string)
      - `transaction_id` (string)
      - `response_code` (string)
      - `response_message` (string)
      - `raw_response` (object)
        - `fxRateInquiryResponse` (object)
          - `localDate` (integer)
          - `localTime` (integer)
          - `merchantID` (string)
          - `rateEndTime` (integer)
          - `ratePreferenceCode` (string)
          - `rateStartTime` (integer)
          - `rateValidityPeriod` (integer)
          - `rates` (object[])
            - `cardholderAmount` (number)
            - `cardholderCurrency` (string)
            - `merchantAmount` (integer)
            - `merchantCurrency` (string)
            - `rate` (number)
            - `rateInquiryRef` (string)
          - `responseCode` (string)
          - `responseMessage` (string)
          - `sessionId` (string)
          - `terminalID` (string)
          - `traceNumber` (integer)
- `expired_at` (string)

Example:

```json
{
  "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"
}
```

### 400

400

Example:

```json
{}
```