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

# FX Exchange Rates for supported payment schemas (Visa, Mastercard)

> This operation is to get the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.



## OpenAPI

````yaml json-files/fx.openapi.json post /v2/{paymentScheme}/fx
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: http://localhost:8080
    description: Generated server url
security: []
tags:
  - name: Get FX exchange rates
    description: the Get FX exchange rates API
  - name: Get ECB supported currencies
    description: the Get ECB supported currencies API
  - name: Get ECB exchange rate
    description: the Get ECB exchange rate API
paths:
  /v2/{paymentScheme}/fx:
    post:
      tags:
        - Get FX exchange rates
      summary: FX Exchange Rates for supported payment schemas (Visa, Mastercard)
      description: >-
        This operation is to get the Visa/Mastercard treasury FX rates for a
        given “from” and “to” currency pair.
      operationId: getSchemeFxRatesV2
      parameters:
        - name: paymentScheme
          in: path
          description: Payment scheme
          required: true
          schema:
            type: string
            enum:
              - VISA
              - MC
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetFxRatesV2Request'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFxRatesV2Response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: VISA API Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetFxRatesV2Request:
      type: object
      properties:
        fromAmount:
          type: number
          description: >-
            The transaction amount in the foreign currency that the end user
            requests to convert
          minimum: 0
        fromCurrency:
          type: string
          description: >-
            The foreign currency that the end user requests to convert. Currency
            is given with a ISO 4217 currency code and needs to be a European
            Central Bank ("ECB") supported currency.
          example: EUR
          pattern: '[A-Z]{3}'
        toCurrency:
          type: string
          description: >-
            The card's settlement currency. Currency is given with a ISO 4217
            currency code and needs to be a ECB supported currency.
          example: EUR
          pattern: '[A-Z]{3}'
        issuerMarkupPercentage:
          type: number
          format: double
          description: >-
            The issuer's mark-up percentage that is applied to foreign currency
            purchases
          example: 10
          maximum: 100
          minimum: 0
      required:
        - fromAmount
        - fromCurrency
        - issuerMarkupPercentage
        - toCurrency
    GetFxRatesV2Response:
      type: object
      properties:
        fromAmount:
          type:
            - number
            - 'null'
          description: >-
            The transaction amount in the foreign currency that the end user
            requests to convert
        fromCurrency:
          type:
            - string
            - 'null'
          description: >-
            The foreign currency that the end user requests to convert. Currency
            is given with a ISO 4217 currency code and needs to be a European
            Central Bank ("ECB") supported currency.
          example: EUR
          pattern: '[A-Z]{3}'
        toCurrency:
          type:
            - string
            - 'null'
          description: >-
            The card's settlement currency. Currency is given with a ISO 4217
            currency code and needs to be a ECB supported currency.
          example: EUR
          pattern: '[A-Z]{3}'
        toAmountWithSchemeRate:
          type:
            - number
            - 'null'
          description: >-
            The transaction amount in the card's settlement currency converted
            with the payment scheme's rate but not considering the issuer
            mark-up. Derived by converting the fromAmount using payment scheme
            rates between from and to currency pairs. Mark-up rate is not
            included in the calculations. Exchange rates used for conversion
            will be the latest rates available. The value is always rounded to
            two (2) decimal places.
        toAmountWithMarkup:
          type:
            - number
            - 'null'
          description: >-
            The transaction amount in the card's settlement currency converted
            with payment scheme's rate considering the issuer mark-up. Derived
            by converting the fromAmount using ECB rates between from and to
            currency pairs. Additional rate is not included in the calculations.
            Exchange rates used for conversion will be the latest rates
            available. The value is always rounded to two (2) decimal places.
        toAmountWithEcbRate:
          type:
            - number
            - 'null'
          description: >-
            The transaction amount in the card's settlement currency converted
            with the ECB's rate but not considering the issuer mark-up. Derived
            by converting the fromAmount using ECB rates between from and to
            currency pairs. Mark-up rate is not included in the calculations.
            Exchange rates used for conversion will be the latest rates
            available. The value is always rounded to two (2) decimal places.
        fxRatePaymentScheme:
          type:
            - number
            - 'null'
          description: >-
            Payment scheme exchange rate for the fromCurrency and toCurrency
            currency pair. This rate will not include any issuer mark-up. The
            value is always rounded to four (4) decimal places. As of 12/2022,
            Visa and Mastercard update their exchange rates on business days at
            1 AM (GMT) and at 6 PM (GMT) respectively. Please note that the
            times at which payment schemes update their rates is subject to
            change without advance notice. However, the exchange rate applied
            and provided by Enfuce is always the latest one at any given time.
        fxRatePaymentSchemeRaw:
          type:
            - number
            - 'null'
          description: >-
            Payment scheme exchange rate for the fromCurrency and toCurrency
            currency pair. This rate will not include any issuer mark-up. The
            value is always rounded to eight (8) decimal places. As of 12/2022,
            Visa and Mastercard update their exchange rates on business days at
            1 AM (GMT) and at 6 PM (GMT) respectively. Please note that the
            times at which payment schemes update their rates is subject to
            change without advance notice. However, the exchange rate applied
            and provided by Enfuce is always the latest one at any given time.
        fxRateWithMarkup:
          type:
            - number
            - 'null'
          description: >-
            Applicable exchange rate for the customer, i.e. payment scheme
            exchange rate between the fromCurrency and toCurrency currency pair
            including issuer mark-up. The value is always rounded to four (4)
            decimal places.
        fxRateWithMarkupRaw:
          type:
            - number
            - 'null'
          description: >-
            Applicable exchange rate for the customer, i.e. payment scheme
            exchange rate between the fromCurrency and toCurrency currency pair
            including issuer mark-up. The value is always rounded to eight (8)
            decimal places.
        fxRateEcb:
          type:
            - number
            - 'null'
          description: >-
            ECB exchange rate between the fromCurrency and toCurrency currency
            pair including issuer mark-up. The value is always rounded to four
            (4) decimal places. As of 12/2022, the ECB updates exchange rates
            once per business day around 2 PM (GMT). Please note that the times
            at which the ECB updates its rates is subject to change without
            advance notice. However, the exchange rate applied and provided by
            Enfuce is always the latest one at any given time.
        fxRateEcbRaw:
          type:
            - number
            - 'null'
          description: >-
            ECB exchange rate between the fromCurrency and toCurrency currency
            pair including issuer mark-up. The value is always rounded to
            decimal (8) decimal places. As of 12/2022, the ECB updates exchange
            rates once per business day around 2 PM (GMT). Please note that the
            times at which the ECB updates its rates is subject to change
            without advance notice. However, the exchange rate applied and
            provided by Enfuce is always the latest one at any given time.
        markupPercentageOverEcb:
          type:
            - number
            - 'null'
          description: >-
            Comparison of the customer applicable rate (payment scheme rate plus
            issuer mark-up) versus the ECB rate expressed as a percentage. A
            positive value represents in percentages how much higher the
            customer applicable rate is compared to the ECB rate.
          maximum: 100
          minimum: 0
    ErrorResponse:
      type: object
      properties:
        code:
          type:
            - string
            - 'null'
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type:
            - string
            - 'null'
          description: Error message in human-readable format
        id:
          type:
            - string
            - 'null'
          format: uuid
          description: Unique error identifier
        errorCode:
          type:
            - string
            - 'null'
          description: Enfuce code for a specific error type
        errorType:
          type:
            - string
            - 'null'
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type:
            - string
            - 'null'
          description: Free-form text explaining the error reason
        timestamp:
          type:
            - string
            - 'null'
          format: date-time
          description: Datetime when error occurred

````