> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fexco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lookup exchange rate

> # Exchange Rate
When implementing MCP with eCommerce, it is typical to update FX rates once per day. Since customers may visit a website several times before making a purchase, it is best to keep the pricing stable by using one rate per day.<br/>
Online auction websites and those that provide cross-border products or services target a customer market that expects exchange rates to vary throughout the day. Therefore, the option to update FX rates several times per day is more suitable.<br/>
Other examples could include financial services and gambling sites where the customer anticipates the price of a product or service may vary throughout the day.

#### Disclaimer
The rates used here are static and are used for the purposes of executing API calls.

**Note:** The return could be one ExchangeRate or a List of ExchangeRate




## OpenAPI

````yaml /openapi/dhs-flex-v3.json get /acquirers/{acquirerId}/merchants/{merchantId}/exchangerates
openapi: 3.0.1
info:
  title: DCC - DHS Rest
  version: 3.0.0
  description: >
    ## Summary


    The DHS REST interface uses HTTPS protocol to obtain rates from DHS. REST is
    an acronym for Representational State

    Transfer. Whether you are implementing MCP, DCC, or both, you can use the
    REST requests interchangeably. Implementing

    DHS REST requires the Fexco merchant ID (MID), ATM ID, and the merchant's
    acquirer ID as part of all REST requests. The

    merchant ID, ATM ID, and acquirer ID will be supplied by your Fexco project
    manager.


    ### About Fexco's Foreign Exchange Rates


    Fexco refreshes its foreign exchange rates six times per day every financial
    trading day. Your website has the option to

    update foreign exchange (FX) rates once per day or several times during the
    day. Whether your business requires exchange

    rates several times per day or only one set of rates per day is a decision
    that entails some consideration.


    #### Disclaimer


    The rates used here are static and are used for the purposes of executing
    API calls.


    ### About Dynamic Currency Conversion (DCC)


    DCC is a payment card service that facilitates the payment of goods and
    services in the currency of the cardholder. The

    key components of a DCC transaction are identifying the currency of the card
    and supplying the equivalent foreign

    currency amount. DCC is typically offered to international cardholders when
    making a purchase at a point of sale (POS)

    or point of interaction (POI) device. Upon entering their credit card on the
    POS device, the cardholder is presented

    with the choice to pay in either the local currency or the currency in which
    the card is issued—referred to as the

    cardholder's home currency. Depending on ATM transaction, merchant's POS, or
    website configuration, DCC enabled services

    will do one of the following:


    * Collect exchange rates from DHS once a day. In this scenario, the rates
    are stored locally and applied at the POS each
      time a valid DCC transaction is carried out.
    * Request a rate directly from DHS on a transaction basis. In this scenario,
    a request message is sent to DHS and if the
      card currency (identified by the BIN and CID) is eligible for DCC, DHS responds with the cardholder's currency amount
      and exchange rate
  contact:
    name: Fexco Drive Development Team
    url: https://www.fexco.com
servers:
  - url: https://api.example.com/dhsv2
    description: Replace with your DHS environment base URL
security: []
paths:
  /acquirers/{acquirerId}/merchants/{merchantId}/exchangerates:
    get:
      tags:
        - V2 - Merchant - Exchange Rate
      summary: Lookup exchange rate
      description: >
        # Exchange Rate

        When implementing MCP with eCommerce, it is typical to update FX rates
        once per day. Since customers may visit a website several times before
        making a purchase, it is best to keep the pricing stable by using one
        rate per day.<br/>

        Online auction websites and those that provide cross-border products or
        services target a customer market that expects exchange rates to vary
        throughout the day. Therefore, the option to update FX rates several
        times per day is more suitable.<br/>

        Other examples could include financial services and gambling sites where
        the customer anticipates the price of a product or service may vary
        throughout the day.


        #### Disclaimer

        The rates used here are static and are used for the purposes of
        executing API calls.


        **Note:** The return could be one ExchangeRate or a List of ExchangeRate
      operationId: getExchangeRate
      parameters:
        - name: acquirerId
          in: path
          description: >-
            Acquiring bank identification code defined by Fexco to identify the
            merchant's acquiring bank or ATM
          required: true
          schema:
            type: string
            maxLength: 3
            minLength: 3
          example: TST
        - name: merchantId
          in: path
          description: >-
            The merchant ID is assigned by Fexco. This merchant ID corresponds
            to Mercury's Merchant Originator Tag.

            An alphanumeric value that identifies the merchant
          required: true
          schema:
            type: string
            maxLength: 16
            minLength: 1
          example: '11111111'
        - name: currency
          in: query
          description: >-
            List of foreign ISO4217 currency codes. You can specify any 
            combination of alphabetic and numeric currency codes.


            **Note:** Please do not add spaces before or after the commas that
            separate the currency codes


            If you want to override the Card foreigner's currency with a custom
            currency you can pass the foreign currency in this parameter with
            the bin information


            **Note:** The base currency is GBP. Please do not use GBP in the
            currency field


            **Note:** The currency field is only  for an MCP Rate Call
          required: false
          schema:
            type: string
          example: USD,JPY
        - name: bin
          in: query
          description: >-
            This value includes the bank identification number (BIN) which is
            represented by leading digits of the payment card number
          required: false
          schema:
            type: string
            maxLength: 12
            minLength: 6
          example: '411111'
        - name: cid
          in: query
          description: >-
            This value is an extension of bin allowing for the next 6 digits of
            the card number.

            This value is the Card Currency Identifier (or Currency ID) which is
            used in conjunction with the BIN specified and provides the next 6
            digits of the card number, whereby:

            * **bin**: specifies only digits 1 to 6 of the BIN

            * **cid**: specifies digits 7 to 12 of the card number

            A maximum of 6 digits is accepted while 4 is the recommended length.

            Note: Only 4 digits of the CID are stored
          required: false
          schema:
            type: string
            maxLength: 6
          example: '6789'
        - name: x-dcc-dhs-version
          in: header
          description: >-
            Optional DHS response version. Use 3.1 to include exchangeRateType;
            3.0 is the default.
          required: false
          schema:
            type: string
            enum:
              - '3.0'
              - '3.1'
            default: '3.0'
            example: '3.1'
      responses:
        '200':
          description: >-
            Exchange Rate. <br/>The service can return an Entity or a List of
            Entities. <br />
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ExchangeRateResponse'
                  - type: array
                    items:
                      $ref: '#/components/schemas/ExchangeRateResponse'
              examples:
                merchantRates:
                  summary: Exchange rate for a merchant
                  value:
                    uuid: 83ec7885-c72b-4f70-99a5-afe1e1f787c5
                    baseCurrency:
                      numericCode: 978
                      alphaCode: EUR
                      minorUnits: 2
                    rate: '1.0922'
                    foreignCurrency:
                      numericCode: 840
                      alphaCode: USD
                      minorUnits: 2
                    marginPercentage: '3'
                    commissionPercentage: '0.010000'
                    source: REUTERS WHOLESALE INTERBANK
                    sourceTimestamp: '2026-09-15T08:00:00Z'
                    expiry: '2026-09-16T08:00:00Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseError'
              examples:
                invalidCurrency:
                  summary: Unsupported currency filter
                  value:
                    timestamp: '2026-09-15T10:30:30Z'
                    url: >-
                      /dhsv2/acquirers/TST/merchants/11111111/exchangerates?currency=XXX
                    error: BAD_REQUEST
                    status: 400
                    message: Unsupported currency code
        '404':
          description: Exchange Rate not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseError'
              examples:
                merchantNotFound:
                  summary: Merchant is not configured for the acquirer
                  value:
                    timestamp: '2026-09-15T10:30:30Z'
                    url: /dhsv2/acquirers/TST/merchants/99999999/exchangerates
                    error: NOT_FOUND
                    status: 404
                    message: No such Merchant
        '500':
          description: General Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseError'
              examples:
                serviceError:
                  summary: DHS could not return exchange rates
                  value:
                    timestamp: '2026-09-15T10:30:30Z'
                    url: /dhsv2/acquirers/TST/merchants/11111111/exchangerates
                    error: INTERNAL_SERVER_ERROR
                    status: 500
                    message: An unexpected error occurred
components:
  schemas:
    ExchangeRateResponse:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          example: 83ec7885-c72b-4f70-99a5-afe1e1f787c5
        baseCurrency:
          $ref: '#/components/schemas/Currency'
        rate:
          type: string
          example: '1.0922'
        foreignCurrency:
          $ref: '#/components/schemas/Currency'
        marginPercentage:
          type: string
          example: '3'
        commissionPercentage:
          type: string
          example: '0.010000'
        source:
          type: string
          example: REUTERS WHOLESALE INTERBANK
        sourceTimestamp:
          type: string
          format: date-time
          example: 2026-03-19T08:00:00.000+0000
        expiry:
          type: string
          format: date-time
          example: 2026-03-20T08:00:00.000+0000
        exchangeRateType:
          type: string
          description: Included when x-dcc-dhs-version is set to 3.1.
          example: CARD
    ResponseError:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: >-
            The timestamp format is expressed according to ISO8601 with the
            combined date and time in coordinated universal time (UTC).
            YYYYMMDDTHH:MM:SS.000+0000 
          example: 20141023T11:43:45.000+0000
        url:
          type: string
          description: Requested URL
          example: /dhsv2/acquirers/TST/merchants/11111111/dccoffers
        error:
          type: string
          description: Error title
          example: NOT_FOUND
        status:
          type: number
          description: Status code
          example: 404
        message:
          type: string
          description: Error message
          example: No such Merchant
    Currency:
      type: object
      properties:
        numericCode:
          type: integer
          format: int32
          example: 978
        alphaCode:
          type: string
          example: EUR
        minorUnits:
          type: integer
          format: int32
          example: 2

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.