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

# VISA FX Exchange Rates

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



## OpenAPI

````yaml exchange-rate post /v1/visa/fx
openapi: 3.0.3
info:
  description: >
    Endpoint for querying FX rates of payment scheme (including benchmark to ECB
    FX rates).

    API enables the issuer to comply with regulation (EU) 2019/518) and provide
    the cardholder with a better user experience by providing real-time
    visibility to scheme FX rates that are used for card transactions.
  version: '1'
  title: Exchange Rates API
  contact:
    name: Enfuce Financial Services
    url: https://enfuce.com
    email: info@enfuce.com
  x-logo:
    url: https://developer.enfuce.com/images/enfuce.svg
    altText: Enfuce logo
servers:
  - url: >-
      https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/exchange-rate
  - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/exchange-rate
    description: Live environment
security: []
tags:
  - name: Get FX exchange rates
  - name: Get ECB supported currencies
  - name: Get ECB exchange rate
paths:
  /v1/visa/fx:
    post:
      tags:
        - Get FX exchange rates
      summary: VISA FX Exchange Rates
      description: >-
        This operation is to get the VISA treasury FX rates for a given “from”
        and “to” currency pair.
      operationId: getVisaFxRatesV1
      parameters:
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/getVisaFxRatesV1RequestBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getVisaFxRatesV1Response'
        '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'
      deprecated: true
components:
  requestBodies:
    getVisaFxRatesV1RequestBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getVisaFxRatesV1Request'
      description: ''
      required: true
  schemas:
    getVisaFxRatesV1Response:
      type: object
      properties:
        fromAmount:
          type: number
          description: >-
            From Amount also known as transaction amount that will be converted
            from the "fromCurrency" to the "toCurrency".
        fromCurrency:
          $ref: '#/components/schemas/currency'
        toCurrency:
          $ref: '#/components/schemas/currency'
        toAmountWithVisaRate:
          type: number
          description: >-
            To Amount also referred to as Cardholder Billing amount without
            additionalRate. Derived by converting the fromAmount using Visa
            Treasury Rates between from and to currency pairs. Additional rate
            is not included in the calculations. Visa treasury rates used for
            conversion will be as of the last rates available.
        toAmountWithAdditionalFee:
          type: number
          description: >-
            Also referred to as Cardholder Billing amount with additional rate.
            Derived by converting the fromAmount using Visa Treasury Rates
            between fromCurrency and toCurrency currency pairs. additionalRate
            is included in the calculations. Visa treasury rates used for
            conversion will be as of the last rates available.
        fxRateVisa:
          type: number
          description: >-
            Visa Treasury Exchange Rate for the fromCurrency and toCurrency
            currency pair. This rate will not include any additionalRate
        fxRateWithAdditionalFee:
          type: number
          description: >-
            Applicable Exchange Rate between the fromCurrency and toCurrency
            currency pair including additionalRate.
        visaRateLastUpdatedTimestamp:
          type: string
          format: date-time
          description: >-
            ISO-8601 date when the Visa Treasury rates were last updated for
            calculations.
        benchmarks:
          type: array
          items:
            type: object
            description: >-
              Will return all the benchmark properties that apply to the
              fromCurrency and toCurrency pair in the Visa system. The API is
              built to support several benchmarks but ECB is the only available
              benchmark for now.
            properties:
              benchmarkSystem:
                type: string
                description: >-
                  The benchmark system used for getting the benchmark
                  properties. For example will be ECB for ECB benchmark rate
                  system. All benchmark rates and any markups are calculated
                  based on the last available benchmark rates (from the standard
                  rate system - in this case ECB) and Visa treasury rates
              toAmountWithBenchmarkRate:
                type: number
                description: >-
                  Derived by converting the fromAmount using Benchmark Rates
                  between fromCurrency and toCurrency currency pairs.
                  additionalRate is not included in the calculations. Benchmark
                  rates used for conversion will be as of the last rates
                  available on the benchmark system for example ECB.
              markupWithAdditionalFee:
                type: number
                description: >-
                  Markup calculated between the toAmountWithAdditionalFee and
                  toAmountWithBenchmarkRate. Calculated as
                  (toAmountWithAdditionalFee -
                  toAmountWithBenchmarkRate)/toAmountWithBenchmarkRate.
              benchmarkFxRate:
                type: number
                description: >-
                  Exchange rate between the "from" and "to" currency pair using
                  the benchmark rates
              benchmarkRateLastUpdatedTimestamp:
                type: string
                format: date-time
                description: >-
                  ISO-8601 date when the benchmark rates were last updated for
                  calculations.
      title: getVisaFxRatesV1Response
    errorResponse:
      type: object
      properties:
        code:
          type: string
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type: string
          description: Error message in human-readable format
        id:
          type: string
          format: uuid
          description: Unique error identifier
        errorCode:
          type: string
          description: Enfuce code for a specific error type
        errorType:
          type: string
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
          description: Free-form text explaining the error reason
        timestamp:
          type: string
          format: date-time
          description: Datetime when error occurred
    getVisaFxRatesV1Request:
      type: object
      required:
        - fromAmount
        - fromCurrency
        - toCurrency
      properties:
        fromAmount:
          type: number
          minimum: 0
          exclusiveMinimum: true
          description: >-
            From Amount also known as transaction amount that will be converted
            from the "fromCurrency" and to the "toCurrency"
        fromCurrency:
          $ref: '#/components/schemas/currency'
        toCurrency:
          $ref: '#/components/schemas/currency'
      title: getVisaFxRatesV1Request
    currency:
      type: string
      description: Any ECB supported currency with valid ISO 4217 currency code
      pattern: '[A-Z]{3}'
      example: EUR

````