TabaPay FXRate API

This resource represents an FX Rate.

OpenAPI Specification

tabapay-fxrate-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: TabaPay APIs 3D Secure FXRate API
  description: TabaPay Resource and Service Operations
  version: 1.0.0
  license:
    name: All rights reserved
servers:
- url: https://{FQDN}:{PORT}
  description: TabaPay APIs
  variables:
    FQDN:
      default: FQDN
      description: Contact [TabaPay Support](https://tabapay.zendesk.com/hc/en-us/requests/new) for the Fully Qualified Domain Name you should be using.
    PORT:
      default: PORT
      description: Ensure you have the capability to access the PORT TabaPay specifies in your credentials file.
security:
- bearerAuth: []
tags:
- name: FXRate
  description: This resource represents an FX Rate.
paths:
  /v4/clients/{ClientID}/fxrate:
    post:
      tags:
      - FXRate
      summary: Query FX
      description: '***Currently in sandbox only***


        Returns the real-time FX-Rate and the amount in the beneficiary currency.'
      operationId: queryfx
      parameters:
      - $ref: '#/components/parameters/ClientID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/queryFXRequest'
        required: true
      responses:
        '200':
          description: The FX Rate has been queried and the process is complete.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/queryFXResponse'
              example:
                SC: 200
                EC: '0'
                convertedAmount: '11.00'
                conversionRate: '1.345234'
        '207':
          description: One or more failures occurred while processing the Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseSCECEM'
              example:
                SC: 207
                EC: InternalErrorCode
components:
  schemas:
    EM:
      type: string
      description: Short description of the error if an error occurred.
    apiResponseSCECEM:
      type: object
      properties:
        SC:
          $ref: '#/components/schemas/SC'
        EC:
          $ref: '#/components/schemas/EC'
        EM:
          $ref: '#/components/schemas/EM'
    EC:
      type: string
      description: Internal Error Code. This is used to help TabaPay team members trace an error.
    queryFXResponse:
      type: object
      properties:
        SC:
          type: integer
          description: HTTP Status Code
        EC:
          type: string
          description: 'Internal Error Code.


            Present if `SC` is `200`.'
        convertedAmount:
          type: string
          description: "This is the converted amount without markup applied. \nTabaPay will return the payment network rates. Formatting of amounts in the FX API response will be per the payment network rules."
        conversionRate:
          type: string
          description: A Decimal Conversion Rate without markup applied.
    queryFXRequest:
      type: object
      required:
      - fromCurrency
      - toCurrency
      - amount
      - network
      properties:
        fromCurrency:
          type: string
          description: "ISO 4217 Currency Number. \n\nThe currency of the amount you would like to convert from. \n\nExample: If you are converting from (USD) 840 to (CAD) 124, this would be 840."
        toCurrency:
          type: string
          description: "ISO 4217 Currency Number. \n\nThe currency of the amount you would like to convert to. \n\nExample: If you are converting from (USD) 840 to (CAD) 124, this would be 124."
        amount:
          type: string
          description: 'Transaction Amount.


            See how to [properly format an amount](/reference/data#how-to-specify-an-amount-value).'
          pattern: ^[0-9]*.?[0-9]{0,4}$
        network:
          type: string
          description: 'Either:

            - `visa`

            - `mastercard`

            - `bank`'
    SC:
      type: integer
      description: '[HTTP Status Code](https://developers.tabapay.com/reference/http-status-codes#/)'
  parameters:
    ClientID:
      name: ClientID
      in: path
      description: 22-character <<glossary:ClientID>>. Ask [TabaPay Support](https://tabapay.zendesk.com/hc/en-us/requests/new) if you need to specify a <<glossary:SubClientID>>.
      required: true
      style: simple
      explode: false
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    custom-header:
      type: apiKey
      name: Authorization
      in: header