openapi: 3.0.3
info:
  title: 'PayPipes API docs'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://secure.staging.paypipes.net'
paths:
  /oauth/token:
    post:
      summary: Authentication
      operationId: authentication
      description: '<p>We use OAuth 2.0 for authentication. To obtain an access token, send a POST request over HTTPS to the /oauth/token endpoint. Upon a successful request, you will receive an access token, valid for 72 hours. It is recommended to request a new token before each transaction to ensure validity.</p> <p>All requests must be authenticated using your API credentials. Authentication data should be sent as POST parameters to verify against a specific entity.</p>'
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  token_type: Bearer
                  expires_in: 259200
                  access_token: 'eyJ0eXAiOiJKL1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5N2VhNjdiYS03ZWNkLTRkODYtYjRlNC1hYjI2YzY2NGMyNTYiLC JqdGkiOiJjMTM1NjU5OWRlNjE0Y2ViNWU3ZDJkNmI5MTE3MTcxMWE2ZjY5OTlkMDM4MjIyNmY2ZmIwOGI4MWJiOGM1MjgxNGY4ODQxZWJlMjZkZmRmNyI sImlhdCI6MTcxNzc1NjUzOC45MTIwNjEsIm5iZiI6MTcxNzc1NjUzOC45MTIwNjIsImV4cCI6MTcxODAxNTczOC45MTAxNDgsInN1YiI6IiIsInNjb3Blc yI6W119.BctTyyN20SkMH200hJaP3NGqQ69Xu7RT2aAmymprq2TRDBH02F3jUlzkufSkR3Zp6pW1_1c7ridFoqjjHCJKrpxQND9TzcrGE9QjUDiFpswzbE 9ljDQ1HRUYfIvFCqGVS8PQ69J3-i-FPl4uwcTNJ1mq3eoI0A-X5d2J0INPRou-HgbQYYv3vTtm_OCVriuSHm8QCMVdej5Xq41bDzuxIsgh_OPgARUBs51y q8JjPtBAS5z_OArus1YSCfx0gyYbvy2VJuOGgPILCzUpboseaWNO2OHdIjUD1h8foMXhDlCScn0wfJFwOsEUl6Nn22DZIzToCTOwibd-lwzmir4-OAJCs ManyyfRdkU2aqb5OnVFjauzIMnznswGq9d3IzkV6cimWsDs7ZwD6RwGv5I0yF6NGsTfCah_DO9Ch9z-iNVjJe27aO0EhgdpHELIkmnTprfVYPcD2LTKJ5 6ap8g5JTmtsykFKY1sK8WoAK12YqjZRdfRkiiqltJc1x2569hGFT102VCnH5ECpDmh2EAyOLx0d_E7juS_dxgQrVIZAOzcTyLZN6ckM03PBp4n3bhLCoi U1kptvFQ2vgpxavt6xF7ESPAmgEUj0zo0mIxnVqRegPJm1hRxlIplb1nfR-mDpG3FSn8Ms_RxtAksghFmLXysqLpipiRbiF540v8DXTz'
                properties:
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                    example: 259200
                  access_token:
                    type: string
                    example: 'eyJ0eXAiOiJKL1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5N2VhNjdiYS03ZWNkLTRkODYtYjRlNC1hYjI2YzY2NGMyNTYiLC JqdGkiOiJjMTM1NjU5OWRlNjE0Y2ViNWU3ZDJkNmI5MTE3MTcxMWE2ZjY5OTlkMDM4MjIyNmY2ZmIwOGI4MWJiOGM1MjgxNGY4ODQxZWJlMjZkZmRmNyI sImlhdCI6MTcxNzc1NjUzOC45MTIwNjEsIm5iZiI6MTcxNzc1NjUzOC45MTIwNjIsImV4cCI6MTcxODAxNTczOC45MTAxNDgsInN1YiI6IiIsInNjb3Blc yI6W119.BctTyyN20SkMH200hJaP3NGqQ69Xu7RT2aAmymprq2TRDBH02F3jUlzkufSkR3Zp6pW1_1c7ridFoqjjHCJKrpxQND9TzcrGE9QjUDiFpswzbE 9ljDQ1HRUYfIvFCqGVS8PQ69J3-i-FPl4uwcTNJ1mq3eoI0A-X5d2J0INPRou-HgbQYYv3vTtm_OCVriuSHm8QCMVdej5Xq41bDzuxIsgh_OPgARUBs51y q8JjPtBAS5z_OArus1YSCfx0gyYbvy2VJuOGgPILCzUpboseaWNO2OHdIjUD1h8foMXhDlCScn0wfJFwOsEUl6Nn22DZIzToCTOwibd-lwzmir4-OAJCs ManyyfRdkU2aqb5OnVFjauzIMnznswGq9d3IzkV6cimWsDs7ZwD6RwGv5I0yF6NGsTfCah_DO9Ch9z-iNVjJe27aO0EhgdpHELIkmnTprfVYPcD2LTKJ5 6ap8g5JTmtsykFKY1sK8WoAK12YqjZRdfRkiiqltJc1x2569hGFT102VCnH5ECpDmh2EAyOLx0d_E7juS_dxgQrVIZAOzcTyLZN6ckM03PBp4n3bhLCoi U1kptvFQ2vgpxavt6xF7ESPAmgEUj0zo0mIxnVqRegPJm1hRxlIplb1nfR-mDpG3FSn8Ms_RxtAksghFmLXysqLpipiRbiF540v8DXTz'
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: invalid_request
                  error_description: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.'
                  hint: 'Check the `client_id` parameter'
                  message: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.'
                properties:
                  error:
                    type: string
                    example: invalid_request
                  error_description:
                    type: string
                    example: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.'
                  hint:
                    type: string
                    example: 'Check the `client_id` parameter'
                  message:
                    type: string
                    example: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.'
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: "Merchant's client_id related to terminal."
                  example: PUT_YOUR_CLIENT_ID_HERE
                  nullable: false
                client_secret:
                  type: string
                  description: "Merchant's client_secret related to terminal."
                  example: PUT_YOUR_CLIENT_SECRET_HERE
                  nullable: false
                grant_type:
                  type: string
                  description: 'Merchant''s API access type - "client_credentials".'
                  example: client_credentials
                  nullable: false
              required:
                - client_id
                - client_secret
                - grant_type
      security: []
  /api/v2/purchase:
    post:
      summary: Purchase
      operationId: purchase
      description: "The purchase endpoint creates a transaction using the customer token by sending a POST\n     request over HTTPS to the **/purchase** endpoint. This triggers the creation of a new transaction"
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  redirect_url: 'https://secure.paypipes.com/v2/redirect/f10f8c7b-a18b-46a2-978a-dadb5ce80987'
                  expires_at: '2024-05-03 14:14:34'
                  purchase_request_id: 79e03b19c411f001981ca4a6d30aa407300c23b1
                properties:
                  redirect_url:
                    type: string
                    example: 'https://secure.paypipes.com/v2/redirect/f10f8c7b-a18b-46a2-978a-dadb5ce80987'
                  expires_at:
                    type: string
                    example: '2024-05-03 14:14:34'
                  purchase_request_id:
                    type: string
                    example: 79e03b19c411f001981ca4a6d30aa407300c23b1
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must be at least 1 character. Must not be greater than 40 characters."
                  example: ORD1234567890
                  nullable: false
                amount:
                  type: string
                  description: "The value representing the actual amount for the transaction.\n                The decimal points must match the currency's decimal point length. For example, for USD currency,\n                 valid amounts include \"5.99\", \"6.00\", or \"6\". An amount like \"5.995\" would throw a validation error\n                  due to an invalid amount specified. Must not be greater than 10 characters."
                  example: '100.00'
                  nullable: false
                currency:
                  type: string
                  description: "The currency code for the transaction, which must comply with the ISO 4217\n                 standard and be represented by a three-letter code. The <code>cy_code</code> of an existing record in the currencies table."
                  example: USD
                  nullable: false
                description:
                  type: string
                  description: 'A description of the transaction. Must not be greater than 255 characters. Must be at least 5 characters.'
                  example: 'Payment for order ORD1234567890'
                  nullable: false
                return_url:
                  type: string
                  description: 'The URL to which the user is redirected upon the completion of the transaction. Must be a valid URL. Must not be greater than 2048 characters.'
                  example: 'https://example.com/result'
                  nullable: false
                callback_url:
                  type: string
                  description: 'URL used to receive callback/webhook notification with information about the transaction. Must be a valid URL. Must not be greater than 2048 characters.'
                  example: 'https://example.com/callback'
                  nullable: true
                cancel_url:
                  type: string
                  description: 'The URL to which the user is redirected if the transaction is canceled. Must be a valid URL. Must not be greater than 2048 characters.'
                  example: 'https://example.com/cancel'
                  nullable: true
                origin:
                  type: string
                  description: 'Indicates the source from which the request originates.'
                  example: web
                  nullable: true
                  enum:
                    - web
                    - ios
                    - android
                customer_token:
                  type: string
                  description: 'A token identifying the customer. This field is required when <code>card_token</code> is not present.'
                  example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  nullable: false
                card_token:
                  type: string
                  description: 'A token identifying the card of the customer used for the transaction. This field is required when <code>customer_token</code> is not present.'
                  example: E75C608271E3852BA81A87540085
                  nullable: false
                gateway:
                  type: string
                  description: "The payment gateway used to process the transaction. Available gateways can be found here:\n                <a href=\"#gateways\">Gateways</a>."
                  example: unlimit
                  nullable: true
                type:
                  type: string
                  description: "<p>Refers to type of the gateway. Gateways and their types can be found here: <a href=\"#gateways\">Gateways</a>.\n    <p>Must be one of:</p>\n    <ul>\n        <li><code>card</code></li>\n        <li><code>wire</code></li>\n    </ul>"
                  example: card
                  nullable: false
                language:
                  type: string
                  description: "The language code for the transaction, which must adhere to the ISO 639-1\n                 standard and be represented by a two-letter code."
                  example: en
                  nullable: true
                simulator:
                  type: boolean
                  description: 'Enable the simulator for the transaction. Accepted inputs are true, false, 1, 0, "1", and "0".'
                  example: true
                  nullable: true
                save_card_for_future_use:
                  type: boolean
                  description: 'This parameter determines whether the user’s card details should be securely stored for future transactions. Accepted inputs are true, false, 1, 0, "1", and "0".'
                  example: true
                  nullable: true
                billing_address:
                  type: boolean
                  description: 'This parameter specifies whether the merchant wishes to display the customer billing address section on the payment page. Accepted inputs are true, false, 1, 0, "1", and "0".'
                  example: true
                  nullable: true
              required:
                - order_id
                - amount
                - currency
                - description
                - return_url
  /api/v2/card/process:
    post:
      summary: 'Card process'
      operationId: cardProcess
      description: "The card process endpoint is used for direct server-to-server card transaction processing using raw card details\n    by sending a POST request over HTTPS to the **/card/process** endpoint."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: ORD1234567890
                  trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType: Purchase
                  amount: '15.00'
                  currency: EUR
                  status: Waiting
                  paymentStatus: null
                  statusCode: '200'
                  statusDescription: ''
                  declineCode: null
                  created: '2024-06-04T10:50:38.000000Z'
                  cardToken: E75C608271E3852BA81A87540085
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'Charge transaction with ID #ORD1234567890'
                  gateway: ecommpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode: null
                  card:
                    holder: 'John Doe'
                    bin: '401200'
                    digit: '0085'
                    brand: visa
                    cardLevel: CLASSIC
                    expired: 12/2025
                    maskNumber: '4012 00XX XXXX 0085'
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                  threeds:
                    redirectUrl: 'https://secure.paypipes.com/api/v2/card/threeds'
                    redirectParams:
                      purchase_request_id: 4b99850b6a24fede48c38a5a41d59d20d53c3102
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: ORD1234567890
                  trxID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType:
                    type: string
                    example: Purchase
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Waiting
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '200'
                  statusDescription:
                    type: string
                    example: ''
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T10:50:38.000000Z'
                  cardToken:
                    type: string
                    example: E75C608271E3852BA81A87540085
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'Charge transaction with ID #ORD1234567890'
                  gateway:
                    type: string
                    example: ecommpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: object
                    properties:
                      holder:
                        type: string
                        example: 'John Doe'
                      bin:
                        type: string
                        example: '401200'
                      digit:
                        type: string
                        example: '0085'
                      brand:
                        type: string
                        example: visa
                      cardLevel:
                        type: string
                        example: CLASSIC
                      expired:
                        type: string
                        example: 12/2025
                      maskNumber:
                        type: string
                        example: '4012 00XX XXXX 0085'
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
                  threeds:
                    type: object
                    properties:
                      redirectUrl:
                        type: string
                        example: 'https://secure.paypipes.com/api/v2/card/threeds'
                      redirectParams:
                        type: object
                        properties:
                          purchase_request_id:
                            type: string
                            example: 4b99850b6a24fede48c38a5a41d59d20d53c3102
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                jwe:
                  type: string
                  description: "A JWE (JSON Web Encryption) token containing the following encrypted JSON payload. The payload is encrypted using\n <strong>RSA-OAEP</strong> for key encryption and <strong>AES-256-GCM</strong> for content encryption.\n  The public key used for encryption is obtained via a <strong>GET</strong> request to <strong>api/v2/public-jwk</strong>\n     <br><br>\n     {<br>\n     &nbsp;&nbsp;\n     \"<strong>purchase_request_id</strong>\": <i>string</i>, Unique ID received by creating a request to purchase endpoint. Must be 40 characters. Example: b2685b95ec0de53d6871f836e3c90dca05fa1b44<br>\n     &nbsp;&nbsp;\"<strong>pan</strong>\": <i>string</i>, Primary Account Number (card number) used for the transaction. Example: 4111111111111111<br>\n     &nbsp;&nbsp;\"<strong>exp</strong>\": <i>string</i>, Card expiry date in MM/YY format. Example: 12/29<br>\n     &nbsp;&nbsp;\"<strong>cvv</strong>\": <i>string</i>, Card Verification Value – a 3- or 4-digit code printed on the card. Must be between 3 and 4 digits. Example: 123<br>\n     &nbsp;&nbsp;\"<strong>holder</strong>\": <i>string</i>, Name of the cardholder as printed on the card. Must be at least 2 characters. Must not be greater than 100 characters. Example: John Doe<br>\n     &nbsp;&nbsp;\"<strong>timezone_offset</strong>\": <i>string</i>, <i>optional</i>, Client device's timezone offset from UTC in minutes. Example: 540<br>\n     &nbsp;&nbsp;\"<strong>screen_height</strong>\": <i>string</i>, <i>optional</i>, Height of the user's screen in pixels. Example: 1080<br>\n     &nbsp;&nbsp;\"<strong>screen_width</strong>\": <i>string</i>, <i>optional</i>, Width of the user's screen in pixels. Example: 1920<br>\n     &nbsp;&nbsp;\"<strong>screen_color_depth</strong>\": <i>string</i>, <i>optional</i>, Color depth of the user's screen in bits. Example: 24<br>\n     }<br><br>"
                  example: eyJhbGciOiJ...
                  nullable: false
              required:
                - jwe
  /api/v2/card/threeds:
    post:
      summary: 'Card threeds'
      operationId: cardThreeds
      description: "The card threeds endpoint is used for direct server-to-server 3DS processing\n    by sending a POST request over HTTPS to the **/card/threeds** endpoint."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n    <title>Redirecting ...</title>\n    <script type=\"module\" nonce=\"\">\n        document.addEventListener('DOMContentLoaded', function () {\n            window.location.href = \"https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_l3qxbdli5mmevhz3tb4gzyysfi\"\n        });\n    </script>\n</head>\n\n</html>"
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                purchase_request_id:
                  type: string
                  description: 'Unique ID received by creating a request to purchase endpoint. Must be 40 characters.'
                  example: b2685b95ec0de53d6871f836e3c90dca05fa1b44
                  nullable: false
              required:
                - purchase_request_id
  /api/v2/charge:
    post:
      summary: Charge
      operationId: charge
      description: "The charge endpoint creates a transaction using the previous transaction ID by sending a POST\n     request over HTTPS to the **/charge** endpoint. This triggers the creation of a new charge transaction."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: ORD1234567890
                  trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType: Purchase
                  amount: '15.00'
                  currency: EUR
                  status: Waiting
                  paymentStatus: null
                  statusCode: '200'
                  statusDescription: ''
                  declineCode: null
                  created: '2024-06-04T10:50:38.000000Z'
                  cardToken: E75C608271E3852BA81A87540085
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'Charge transaction with ID #ORD1234567890'
                  gateway: ecommpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode: null
                  card:
                    holder: 'John Doe'
                    bin: '401200'
                    digit: '0085'
                    brand: visa
                    cardLevel: CLASSIC
                    expired: 12/2025
                    maskNumber: '4012 00XX XXXX 0085'
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: ORD1234567890
                  trxID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType:
                    type: string
                    example: Purchase
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Waiting
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '200'
                  statusDescription:
                    type: string
                    example: ''
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T10:50:38.000000Z'
                  cardToken:
                    type: string
                    example: E75C608271E3852BA81A87540085
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'Charge transaction with ID #ORD1234567890'
                  gateway:
                    type: string
                    example: ecommpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: object
                    properties:
                      holder:
                        type: string
                        example: 'John Doe'
                      bin:
                        type: string
                        example: '401200'
                      digit:
                        type: string
                        example: '0085'
                      brand:
                        type: string
                        example: visa
                      cardLevel:
                        type: string
                        example: CLASSIC
                      expired:
                        type: string
                        example: 12/2025
                      maskNumber:
                        type: string
                        example: '4012 00XX XXXX 0085'
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must be at least 1 character. Must not be greater than 40 characters."
                  example: ORD1234567890
                  nullable: false
                transaction_id:
                  type: string
                  description: 'ID referencing the purchase transaction. The <code>transaction_id</code> of an existing record in the transactions table. Must be 36 characters.'
                  example: 123e4567-e89b-12d3-a456-426614174000
                  nullable: false
                amount:
                  type: string
                  description: "The value representing the actual amount for the transaction.\n                    The decimal points must match the currency's decimal point length. For example, for USD currency,\n                     valid amounts include \"5.99\", \"6.00\", or \"6\". An amount like \"5.995\" would throw a validation error\n                      due to an invalid amount specified. Must not be greater than 10 characters."
                  example: '100.00'
                  nullable: false
                currency:
                  type: string
                  description: "The currency code for the transaction, which must comply with the ISO 4217\n                     standard and be represented by a three-letter code. The <code>cy_code</code> of an existing record in the currencies table."
                  example: USD
                  nullable: false
                description:
                  type: string
                  description: 'A description of the transaction. Must not be greater than 255 characters. Must be at least 5 characters.'
                  example: 'Payment for order ORD1234567890'
                  nullable: false
              required:
                - order_id
                - transaction_id
                - amount
                - currency
                - description
  /api/v2/charge/cancel:
    post:
      summary: 'Charge cancel'
      operationId: chargeCancel
      description: "The charge cancel endpoint creates a transaction using the previous transaction ID by sending a POST\n     request over HTTPS to the **/charge** endpoint. This action cancels the ability to reuse the transaction ID for future charge transactions."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: ORD1234567890
                  trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType: Cancel
                  amount: '15.00'
                  currency: EUR
                  status: Waiting
                  paymentStatus: null
                  statusCode: '200'
                  statusDescription: ''
                  declineCode: null
                  created: '2024-06-04T10:50:38.000000Z'
                  cardToken: E75C608271E3852BA81A87540085
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'Charge cancel transaction with ID #ORD1234567890'
                  gateway: ecommpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode: null
                  card:
                    holder: 'John Doe'
                    bin: '401200'
                    digit: '0085'
                    brand: visa
                    cardLevel: CLASSIC
                    expired: 12/2025
                    maskNumber: '4012 00XX XXXX 0085'
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: ORD1234567890
                  trxID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType:
                    type: string
                    example: Cancel
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Waiting
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '200'
                  statusDescription:
                    type: string
                    example: ''
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T10:50:38.000000Z'
                  cardToken:
                    type: string
                    example: E75C608271E3852BA81A87540085
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'Charge cancel transaction with ID #ORD1234567890'
                  gateway:
                    type: string
                    example: ecommpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: object
                    properties:
                      holder:
                        type: string
                        example: 'John Doe'
                      bin:
                        type: string
                        example: '401200'
                      digit:
                        type: string
                        example: '0085'
                      brand:
                        type: string
                        example: visa
                      cardLevel:
                        type: string
                        example: CLASSIC
                      expired:
                        type: string
                        example: 12/2025
                      maskNumber:
                        type: string
                        example: '4012 00XX XXXX 0085'
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must be at least 1 character. Must not be greater than 40 characters."
                  example: ORD1234567890
                  nullable: false
                transaction_id:
                  type: string
                  description: 'ID referencing the purchase transaction. The <code>transaction_id</code> of an existing record in the transactions table. Must be 36 characters.'
                  example: 123e4567-e89b-12d3-a456-426614174000
                  nullable: false
              required:
                - order_id
                - transaction_id
  /api/v2/reverse:
    post:
      summary: Reverse
      operationId: reverse
      description: "Some payment gateways support a reverse endpoint that works like a payment cancellation,\n     offering potential fee benefits. Unlike a refund, you can only reverse the entire transaction."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: ORD1234567890
                  trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType: Reverse
                  amount: '15.00'
                  currency: EUR
                  status: Approved
                  paymentStatus: null
                  statusCode: '200'
                  statusDescription: 'Transaction has been reversed'
                  declineCode: null
                  created: '2024-06-04T10:50:38.000000Z'
                  cardToken: E75C608271E3852BA81A87540085
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'Reverse transaction with ID #ORD1234567890'
                  gateway: trustpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode: null
                  card:
                    holder: 'John Doe'
                    bin: '401200'
                    digit: '0085'
                    brand: visa
                    cardLevel: CLASSIC
                    expired: 12/2025
                    maskNumber: '4012 00XX XXXX 0085'
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: ORD1234567890
                  trxID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType:
                    type: string
                    example: Reverse
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Approved
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '200'
                  statusDescription:
                    type: string
                    example: 'Transaction has been reversed'
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T10:50:38.000000Z'
                  cardToken:
                    type: string
                    example: E75C608271E3852BA81A87540085
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'Reverse transaction with ID #ORD1234567890'
                  gateway:
                    type: string
                    example: trustpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: object
                    properties:
                      holder:
                        type: string
                        example: 'John Doe'
                      bin:
                        type: string
                        example: '401200'
                      digit:
                        type: string
                        example: '0085'
                      brand:
                        type: string
                        example: visa
                      cardLevel:
                        type: string
                        example: CLASSIC
                      expired:
                        type: string
                        example: 12/2025
                      maskNumber:
                        type: string
                        example: '4012 00XX XXXX 0085'
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                transaction_id:
                  type: string
                  description: 'ID referencing the purchase transaction to be refunded. The <code>transaction_id</code> of an existing record in the transactions table. Must be 36 characters.'
                  example: 123e4567-e89b-12d3-a456-426614174000
                  nullable: false
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must not be greater than 40 characters. Must be at least 1 character."
                  example: ORD1234567890
                  nullable: true
                description:
                  type: string
                  description: 'Description of the transaction. Must not be greater than 255 characters. Must be at least 5 characters.'
                  example: 'Reverse transaction with ID #ORD1234567890'
                  nullable: false
                callback_url:
                  type: string
                  description: 'URL used to receive callback notification with information about the transaction. Must be a valid URL. Must not be greater than 2048 characters.'
                  example: 'https://example.com/callback'
                  nullable: true
                execution_date:
                  type: string
                  description: "Date and time indicating when the transaction should be executed. Must be in the future.\n                If this value is not present, transaction will be executed immediately. Must be a valid date. Must be a valid date in the format <code>Y-m-d\\TH:i:s\\Z</code>."
                  example: '2024-07-01T14:30:00Z'
                  nullable: true
              required:
                - transaction_id
                - description
  /api/v2/refund:
    post:
      summary: Refund
      operationId: refund
      description: "Refunds are available for card processing gateways. You can trigger a full or partial\n     refund through the API or our back office."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: ORD1234567890
                  trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType: Refund
                  amount: '15.00'
                  currency: EUR
                  status: Approved
                  paymentStatus: null
                  statusCode: '200'
                  statusDescription: 'Transaction has been refunded'
                  declineCode: null
                  created: '2024-06-04T10:50:38.000000Z'
                  cardToken: E75C608271E3852BA81A87540085
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'Refund transaction with ID #ORD1234567890'
                  gateway: trustpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode: null
                  card:
                    holder: 'John Doe'
                    bin: '401200'
                    digit: '0085'
                    brand: visa
                    cardLevel: CLASSIC
                    expired: 12/2025
                    maskNumber: '4012 00XX XXXX 0085'
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: ORD1234567890
                  trxID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                  trxType:
                    type: string
                    example: Refund
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Approved
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '200'
                  statusDescription:
                    type: string
                    example: 'Transaction has been refunded'
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T10:50:38.000000Z'
                  cardToken:
                    type: string
                    example: E75C608271E3852BA81A87540085
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'Refund transaction with ID #ORD1234567890'
                  gateway:
                    type: string
                    example: trustpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: object
                    properties:
                      holder:
                        type: string
                        example: 'John Doe'
                      bin:
                        type: string
                        example: '401200'
                      digit:
                        type: string
                        example: '0085'
                      brand:
                        type: string
                        example: visa
                      cardLevel:
                        type: string
                        example: CLASSIC
                      expired:
                        type: string
                        example: 12/2025
                      maskNumber:
                        type: string
                        example: '4012 00XX XXXX 0085'
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                transaction_id:
                  type: string
                  description: 'ID referencing the purchase transaction to be refunded. The <code>transaction_id</code> of an existing record in the transactions table. Must be 36 characters.'
                  example: 123e4567-e89b-12d3-a456-426614174000
                  nullable: false
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must not be greater than 40 characters. Must be at least 1 character."
                  example: ORD1234567890
                  nullable: true
                description:
                  type: string
                  description: 'Description of the transaction. Must not be greater than 255 characters. Must be at least 5 characters.'
                  example: 'Refund transaction with ID #ORD1234567890'
                  nullable: false
                amount:
                  type: string
                  description: "The amount to be refunded should be equal to or less than the amount\n                 of the original purchase transaction. The decimal points must match the currency's decimal point length.\n                  For example, for USD currency valid amounts include \"5.99\", \"6.00\", or \"6\". An amount like \"5.995\"\n                   would throw a validation errordue to an invalid amount specified. Must not be greater than 10 characters."
                  example: '25.00'
                  nullable: false
                callback_url:
                  type: string
                  description: 'URL used to receive callback notification with information about the transaction. Must be a valid URL. Must not be greater than 2048 characters.'
                  example: 'https://example.com/callback'
                  nullable: true
                execution_date:
                  type: string
                  description: "Date and time indicating when the transaction should be executed. Must be in the future.\n                If this value is not present, transaction will be executed immediately. Must be a valid date. Must be a valid date in the format <code>Y-m-d\\TH:i:s\\Z</code>."
                  example: '2024-07-01T14:30:00Z'
                  nullable: true
              required:
                - transaction_id
                - description
                - amount
  /api/v2/transaction:
    post:
      summary: 'Status of transactions'
      operationId: statusOfTransactions
      description: "To get information about the current status of transactions, call the status endpoint with the transaction_id,\n     order_id or purchase_request_id. This endpoint returns an array of transactions."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    version: 2
                    orderID: ORD1234567890
                    trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                    trxType: Purchase
                    amount: '15.00'
                    currency: EUR
                    status: Waiting
                    paymentStatus: null
                    statusCode: '200'
                    statusDescription: ''
                    declineCode: null
                    created: '2024-06-04T10:50:38.000000Z'
                    cardToken: E75C608271E3852BA81A87540085
                    customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                    description: 'Charge transaction with ID #ORD1234567890'
                    gateway: ecommpay
                    applePay: false
                    googlePay: false
                    refNo: null
                    requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                    authCode: null
                    card:
                      holder: 'John Doe'
                      bin: '401200'
                      digit: '0085'
                      brand: visa
                      cardLevel: CLASSIC
                      expired: 12/2025
                      maskNumber: '4012 00XX XXXX 0085'
                    bank: null
                    customerBank: null
                    fees: null
                    meta: null
                  -
                    version: 2
                    orderID: ORD1234567890
                    trxID: 6c37e2d5-92cc-4241-a9f8-9813720aec64
                    trxType: Purchase
                    amount: '15.00'
                    currency: EUR
                    status: Waiting
                    paymentStatus: null
                    statusCode: '200'
                    statusDescription: ''
                    declineCode: null
                    created: '2024-06-04T10:50:38.000000Z'
                    cardToken: E75C608271E3852BA81A87540085
                    customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                    description: 'Charge transaction with ID #ORD1234567890'
                    gateway: ecommpay
                    applePay: false
                    googlePay: false
                    refNo: null
                    requestID: 6c37e2d5-92cc-4241-a9f8-9813720aec6
                    authCode: null
                    card:
                      holder: 'John Doe'
                      bin: '401200'
                      digit: '0085'
                      brand: visa
                      cardLevel: CLASSIC
                      expired: 12/2025
                      maskNumber: '4012 00XX XXXX 0085'
                    bank: null
                    customerBank: null
                    fees: null
                    meta: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has invalid status: Pending'
                  code: 200013
                properties:
                  error:
                    type: string
                    example: 'Transaction has invalid status: Pending'
                  code:
                    type: integer
                    example: 200013
      tags:
        - Resources
      requestBody:
        required: false
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                transaction_id:
                  type: string
                  description: 'This field is required when none of <code>order_id</code> and <code>purchase_request_id</code> are present.'
                  example: null
                  nullable: true
                order_id:
                  type: string
                  description: 'This field is required when none of <code>transaction_id</code> and <code>purchase_request_id</code> are present.'
                  example: null
                  nullable: true
                purchase_request_id:
                  type: string
                  description: 'This field is required when none of <code>transaction_id</code> and <code>order_id</code> are present.'
                  example: null
                  nullable: true
  /api/v2/inpay/withdraw:
    post:
      summary: 'Withdraw - Inpay'
      operationId: withdrawInpay
      description: "The withdraw endpoint creates a transaction using the customer token by sending a POST\n     request over HTTPS to the **/inpay/withdraw** endpoint. This triggers the creation of a new transaction"
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: order123
                  trxID: 54adcf49-b19f-4f84-a8a4-c7969cb50cb6
                  trxType: Withdraw
                  amount: '1.00'
                  currency: EUR
                  status: Waiting
                  paymentStatus: null
                  statusCode: '0'
                  statusDescription: received
                  declineCode: null
                  created: '2024-10-08T10:46:16.000000Z'
                  cardToken: null
                  customerToken: 5712cd65-78bb-43f8-9b9a-a8fa4ac43c18
                  description: 'Test withdrawal'
                  gateway: inpay
                  applePay: false
                  googlePay: false
                  refNo: 4CRK4Q9
                  requestID: 54adcf49-b19f-4f84-a8a4-c7969cb50cb6
                  authCode: null
                  card: null
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: order123
                  trxID:
                    type: string
                    example: 54adcf49-b19f-4f84-a8a4-c7969cb50cb6
                  trxType:
                    type: string
                    example: Withdraw
                  amount:
                    type: string
                    example: '1.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Waiting
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: '0'
                  statusDescription:
                    type: string
                    example: received
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-10-08T10:46:16.000000Z'
                  cardToken:
                    type: string
                    example: null
                  customerToken:
                    type: string
                    example: 5712cd65-78bb-43f8-9b9a-a8fa4ac43c18
                  description:
                    type: string
                    example: 'Test withdrawal'
                  gateway:
                    type: string
                    example: inpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: 4CRK4Q9
                  requestID:
                    type: string
                    example: 54adcf49-b19f-4f84-a8a4-c7969cb50cb6
                  authCode:
                    type: string
                    example: null
                  card:
                    type: string
                    example: null
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                customer_token:
                  type: string
                  description: 'A token identifying the customer. This field is required when card_token is not present.'
                  example: 99cc649a-cdab-4b26-b9ec-781920174ca6
                  nullable: false
                bank_token:
                  type: string
                  description: 'A token identifying the bank of the customer used for the transaction. The <code>bank_token</code> of an existing record in the customer_banks table.'
                  example: 0402763a-1a10-47ae-b00a-95d773177aa3
                  nullable: false
                order_id:
                  type: string
                  description: "Merchant's internal unique ID for the transaction. Must not be greater than 40 characters. Must be at least 1 character."
                  example: ORD1234567890
                  nullable: true
                description:
                  type: string
                  description: 'Description of the transaction. Must not be greater than 255 characters. Must be at least 5 characters.'
                  example: 'Withdraw transaction with ID #ORD1234567890'
                  nullable: false
                amount:
                  type: string
                  description: "The value representing the actual amount for the transaction.\n                The decimal points must match the currency's decimal point length. For example, for USD currency,\n                 valid amounts include \"5.99\", \"6.00\", or \"6\". An amount like \"5.995\" would throw a validation error\n                  due to an invalid amount specified. Must not be greater than 10 characters."
                  example: '1000.00'
                  nullable: false
                currency:
                  type: string
                  description: "The currency code for the transaction, which must comply with the ISO 4217\n                 standard and be represented by a three-letter code. The <code>cy_code</code> of an existing record in the currencies table."
                  example: JPY
                  nullable: false
                callback_url:
                  type: string
                  description: 'URL used to receive callback notification with information about the transaction. Must be a valid URL. Must not be greater than 255 characters.'
                  example: 'https://example.com/callback'
                  nullable: true
                creditor:
                  type: object
                  description: 'Creditor details including name, address, and identification.'
                  example: []
                  nullable: false
                  properties:
                    name:
                      type: string
                      description: 'The name of the creditor.'
                      example: 'Jane Doe'
                      nullable: false
                    address_lines:
                      type: string
                      description: 'The address lines of the creditor.'
                      example: 'Schillerstrasse 78'
                      nullable: false
                    postcode:
                      type: string
                      description: 'The postcode of the creditor.'
                      example: 120-0015
                      nullable: false
                    city:
                      type: string
                      description: 'The city of the creditor.'
                      example: Scherstetten
                      nullable: false
                    state:
                      type: string
                      description: 'The state of the creditor.'
                      example: Adachi
                      nullable: false
                    country_code:
                      type: string
                      description: 'The ISO country code of the creditor. Must be 2 characters.'
                      example: JP
                      nullable: false
                    birthdate:
                      type: string
                      description: 'The birthdate of the creditor in YYYY-MM-DD format. Must be a valid date.'
                      example: '1959-09-01'
                      nullable: false
                  required:
                    - name
                    - address_lines
                    - postcode
                    - city
                    - state
                    - country_code
                    - birthdate
                creditor_account:
                  type: object
                  description: 'Creditor account details.'
                  example: []
                  nullable: false
                  properties:
                    account_number:
                      type: string
                      description: 'The account number/iban of the creditor.'
                      example: '00012345'
                      nullable: false
                    country_code:
                      type: string
                      description: "The ISO country code of the creditor's bank. Must be 2 characters."
                      example: JP
                      nullable: false
                    bank_name:
                      type: string
                      description: "The name of the creditor's bank.**This field is only required for JPY transactions.**"
                      example: 'Test Bank'
                      nullable: false
                  required:
                    - account_number
                    - country_code
                    - bank_name
              required:
                - customer_token
                - bank_token
                - description
                - amount
                - currency
                - creditor
                - creditor_account
  '/api/v2/transaction/{transaction_id}':
    get:
      summary: Status
      operationId: status
      description: 'To get information about the current status of a transaction, call the status endpoint with the transaction_id.'
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 2
                  orderID: 2381cfcc-e15d-4342-a5ef-5f758265f010
                  trxID: b748bab7-e930-42f4-b673-fe29e30acadc
                  trxType: Purchase
                  amount: '15.00'
                  currency: EUR
                  status: Pending
                  paymentStatus: null
                  statusCode: ''
                  statusDescription: null
                  declineCode: null
                  created: '2024-06-04T13:59:55.000000Z'
                  cardToken: null
                  customerToken: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description: 'EUR test'
                  gateway: trustpay
                  applePay: false
                  googlePay: false
                  refNo: null
                  requestID: null
                  authCode: null
                  card: null
                  bank: null
                  customerBank: null
                  fees: null
                  meta: null
                properties:
                  version:
                    type: integer
                    example: 2
                  orderID:
                    type: string
                    example: 2381cfcc-e15d-4342-a5ef-5f758265f010
                  trxID:
                    type: string
                    example: b748bab7-e930-42f4-b673-fe29e30acadc
                  trxType:
                    type: string
                    example: Purchase
                  amount:
                    type: string
                    example: '15.00'
                  currency:
                    type: string
                    example: EUR
                  status:
                    type: string
                    example: Pending
                  paymentStatus:
                    type: string
                    example: null
                  statusCode:
                    type: string
                    example: ''
                  statusDescription:
                    type: string
                    example: null
                  declineCode:
                    type: string
                    example: null
                  created:
                    type: string
                    example: '2024-06-04T13:59:55.000000Z'
                  cardToken:
                    type: string
                    example: null
                  customerToken:
                    type: string
                    example: 11cc649a-cdab-4b26-b9ec-781920174ca6
                  description:
                    type: string
                    example: 'EUR test'
                  gateway:
                    type: string
                    example: trustpay
                  applePay:
                    type: boolean
                    example: false
                  googlePay:
                    type: boolean
                    example: false
                  refNo:
                    type: string
                    example: null
                  requestID:
                    type: string
                    example: null
                  authCode:
                    type: string
                    example: null
                  card:
                    type: string
                    example: null
                  bank:
                    type: string
                    example: null
                  customerBank:
                    type: string
                    example: null
                  fees:
                    type: string
                    example: null
                  meta:
                    type: string
                    example: null
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
    parameters:
      -
        in: path
        name: transaction_id
        description: 'ID of the transaction.'
        example: b748bab7-e930-42f4-b673-fe29e30acad3
        required: true
        schema:
          type: string
  /api/v2/tokenize/customers:
    post:
      summary: Create
      operationId: create
      description: "A tokenize customer request transforms user data into a token and must be performed\n     before a purchase. This request is sent by making a POST request over HTTPS to the **/tokenize/customers** endpoint."
      parameters: []
      responses:
        201:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name: John
                  last_name: Doe
                  jp_fullname: '山田 太郎'
                  street: '123 Maple Street'
                  city: London
                  state: null
                  post_code: '94107'
                  country: GB
                  phone_code: '+44'
                  phone: '5551234567'
                  email: john.doe@example.com
                  reference_id: ABC123XYZ
                  date_of_birth: '2021-10-20'
                  legal_entity: PRIVATE
                  status: Active
                  created: '2024-06-04T10:06:57.000000Z'
                  updated: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    -
                      id: '123456'
                      gateway: trustpay
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                    -
                      id: '456789'
                      gateway: unlimit
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                  banks:
                    -
                      bank_token: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                      customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                      title: 'Test bank account'
                      currency: JPY
                      beneficiary_name: 'John Doe'
                      beneficiary_address: '123 Maple Street, London'
                      bank_name: 'Metro Bank'
                      branch_name: MetroBank
                      bank_address: '123 Maple Street, London'
                      bank_code: '0100'
                      account_number: '1234567890'
                      iban: GB23MBTC60161331926819
                      bic: MBTCPHMMXXX
                      account_type: checking
                      bank_clearing_system_code: SGIBG
                      bank_clearing_system_id: '1234567'
                properties:
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  jp_fullname:
                    type: string
                    example: '山田 太郎'
                  street:
                    type: string
                    example: '123 Maple Street'
                  city:
                    type: string
                    example: London
                  state:
                    type: string
                    example: null
                  post_code:
                    type: string
                    example: '94107'
                  country:
                    type: string
                    example: GB
                  phone_code:
                    type: string
                    example: '+44'
                  phone:
                    type: string
                    example: '5551234567'
                  email:
                    type: string
                    example: john.doe@example.com
                  reference_id:
                    type: string
                    example: ABC123XYZ
                  date_of_birth:
                    type: string
                    example: '2021-10-20'
                  legal_entity:
                    type: string
                    example: PRIVATE
                  status:
                    type: string
                    example: Active
                  created:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  updated:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    type: array
                    example:
                      -
                        id: '123456'
                        gateway: trustpay
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                      -
                        id: '456789'
                        gateway: unlimit
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: '123456'
                        gateway:
                          type: string
                          example: trustpay
                        created:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                        updated:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                  banks:
                    type: array
                    example:
                      -
                        bank_token: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                        customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title: 'Test bank account'
                        currency: JPY
                        beneficiary_name: 'John Doe'
                        beneficiary_address: '123 Maple Street, London'
                        bank_name: 'Metro Bank'
                        branch_name: MetroBank
                        bank_address: '123 Maple Street, London'
                        bank_code: '0100'
                        account_number: '1234567890'
                        iban: GB23MBTC60161331926819
                        bic: MBTCPHMMXXX
                        account_type: checking
                        bank_clearing_system_code: SGIBG
                        bank_clearing_system_id: '1234567'
                    items:
                      type: object
                      properties:
                        bank_token:
                          type: string
                          example: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                        customer_token:
                          type: string
                          example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title:
                          type: string
                          example: 'Test bank account'
                        currency:
                          type: string
                          example: JPY
                        beneficiary_name:
                          type: string
                          example: 'John Doe'
                        beneficiary_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_name:
                          type: string
                          example: 'Metro Bank'
                        branch_name:
                          type: string
                          example: MetroBank
                        bank_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_code:
                          type: string
                          example: '0100'
                        account_number:
                          type: string
                          example: '1234567890'
                        iban:
                          type: string
                          example: GB23MBTC60161331926819
                        bic:
                          type: string
                          example: MBTCPHMMXXX
                        account_type:
                          type: string
                          example: checking
                        bank_clearing_system_code:
                          type: string
                          example: SGIBG
                        bank_clearing_system_id:
                          type: string
                          example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: 'The first name of the customer. Must not be greater than 60 characters.'
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: 'The last name of the customer. Must not be greater than 60 characters.'
                  example: Doe
                  nullable: false
                jp_fullname:
                  type: string
                  description: 'The full name in Japanese. Must not be greater than 120 characters.'
                  example: '山田 太郎'
                  nullable: false
                street:
                  type: string
                  description: 'The street address. Must not be greater than 100 characters.'
                  example: '123 Maple Street'
                  nullable: false
                city:
                  type: string
                  description: 'The city of the address. Must be at least 2 characters. Must not be greater than 40 characters.'
                  example: London
                  nullable: false
                state:
                  type: string
                  description: 'The state of the address. Must be at least 2 characters. Must not be greater than 40 characters.'
                  example: CA
                  nullable: false
                post_code:
                  type: string
                  description: 'The postal code of the address. Must be at least 2 characters. Must not be greater than 20 characters.'
                  example: '94107'
                  nullable: false
                country:
                  type: string
                  description: 'The country code of the address. Must be a valid ISO 3166-1 alpha-2 country code. The <code>country_code</code> of an existing record in the countries table. Must be 2 characters.'
                  example: GB
                  nullable: false
                email:
                  type: string
                  description: 'The email address of the customer. Must be a valid email address. Must not be greater than 100 characters.'
                  example: john.doe@example.com
                  nullable: false
                phone_code:
                  type: string
                  description: 'The international phone code. Must match the regex /^\+?\d{1,4}$/.'
                  example: '+44'
                  nullable: true
                phone:
                  type: string
                  description: 'The phone number. Must match the regex /^\+?\d[\d\-]*$/. Must be at least 5 characters. Must not be greater than 20 characters.'
                  example: '5551234567'
                  nullable: true
                reference_id:
                  type: string
                  description: "A customer's unique identifier. Must be at least 1 character. Must not be greater than 64 characters."
                  example: ABC123XYZ
                  nullable: false
                date_of_birth:
                  type: string
                  description: 'The date of birth. Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2021-10-20'
                  nullable: true
                legal_entity:
                  type: string
                  description: 'The legal status of the customer (PRIVATE/BUSINESS).'
                  example: PRIVATE
                  nullable: true
                  enum:
                    - PRIVATE
                    - BUSINESS
                identifiers:
                  type: array
                  description: "An array of customer's unique identifiers belonging to specific gateways.\n     Each object in the array must contain a numeric ***id***, which represents the unique identifier, and\n     a string ***gateway***, which represents the name of the gateway."
                  example:
                    -
                      id: '123456'
                      gateway: trustpay
                    -
                      id: '456789'
                      gateway: unlimit
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'The unique identifier.'
                        example: '123456'
                        nullable: false
                      gateway:
                        type: string
                        description: 'The name of the gateway.'
                        example: trustpay
                        nullable: false
              required:
                - first_name
                - last_name
                - email
  '/api/v2/tokenize/customers/{customer_token}':
    patch:
      summary: Update
      operationId: update
      description: "You can update a tokenized customer with personal data by sending a PATCH request\n     over HTTPS to the **/tokenize/customers/{customer_token}** endpoint."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name: John
                  last_name: Doe
                  jp_fullname: '山田 太郎'
                  street: '123 Maple Street'
                  city: London
                  state: null
                  post_code: '94107'
                  country: GB
                  phone_code: '+44'
                  phone: '5551234567'
                  email: john.doe@example.com
                  reference_id: ABC123XYZ
                  date_of_birth: '2021-10-20'
                  legal_entity: PRIVATE
                  status: Active
                  created: '2024-06-04T10:06:57.000000Z'
                  updated: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    -
                      id: '123456'
                      gateway: trustpay
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                    -
                      id: '456789'
                      gateway: unlimit
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                  banks:
                    -
                      bank_token: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                      customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                      title: 'Test bank account'
                      currency: JPY
                      beneficiary_name: 'John Doe'
                      beneficiary_address: '123 Maple Street, London'
                      bank_name: 'Metro Bank'
                      branch_name: MetroBank
                      bank_address: '123 Maple Street, London'
                      bank_code: '0100'
                      account_number: '1234567890'
                      iban: GB23MBTC60161331926819
                      bic: MBTCPHMMXXX
                      account_type: checking
                      bank_clearing_system_code: SGIBG
                      bank_clearing_system_id: '1234567'
                properties:
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  jp_fullname:
                    type: string
                    example: '山田 太郎'
                  street:
                    type: string
                    example: '123 Maple Street'
                  city:
                    type: string
                    example: London
                  state:
                    type: string
                    example: null
                  post_code:
                    type: string
                    example: '94107'
                  country:
                    type: string
                    example: GB
                  phone_code:
                    type: string
                    example: '+44'
                  phone:
                    type: string
                    example: '5551234567'
                  email:
                    type: string
                    example: john.doe@example.com
                  reference_id:
                    type: string
                    example: ABC123XYZ
                  date_of_birth:
                    type: string
                    example: '2021-10-20'
                  legal_entity:
                    type: string
                    example: PRIVATE
                  status:
                    type: string
                    example: Active
                  created:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  updated:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    type: array
                    example:
                      -
                        id: '123456'
                        gateway: trustpay
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                      -
                        id: '456789'
                        gateway: unlimit
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: '123456'
                        gateway:
                          type: string
                          example: trustpay
                        created:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                        updated:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                  banks:
                    type: array
                    example:
                      -
                        bank_token: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                        customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title: 'Test bank account'
                        currency: JPY
                        beneficiary_name: 'John Doe'
                        beneficiary_address: '123 Maple Street, London'
                        bank_name: 'Metro Bank'
                        branch_name: MetroBank
                        bank_address: '123 Maple Street, London'
                        bank_code: '0100'
                        account_number: '1234567890'
                        iban: GB23MBTC60161331926819
                        bic: MBTCPHMMXXX
                        account_type: checking
                        bank_clearing_system_code: SGIBG
                        bank_clearing_system_id: '1234567'
                    items:
                      type: object
                      properties:
                        bank_token:
                          type: string
                          example: c9c97d4a-d1c3-4aa4-abd2-a32436800437
                        customer_token:
                          type: string
                          example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title:
                          type: string
                          example: 'Test bank account'
                        currency:
                          type: string
                          example: JPY
                        beneficiary_name:
                          type: string
                          example: 'John Doe'
                        beneficiary_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_name:
                          type: string
                          example: 'Metro Bank'
                        branch_name:
                          type: string
                          example: MetroBank
                        bank_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_code:
                          type: string
                          example: '0100'
                        account_number:
                          type: string
                          example: '1234567890'
                        iban:
                          type: string
                          example: GB23MBTC60161331926819
                        bic:
                          type: string
                          example: MBTCPHMMXXX
                        account_type:
                          type: string
                          example: checking
                        bank_clearing_system_code:
                          type: string
                          example: SGIBG
                        bank_clearing_system_id:
                          type: string
                          example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: false
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: 'The first name of the customer. Must not be greater than 60 characters.'
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: 'The last name of the customer. Must not be greater than 60 characters.'
                  example: Doe
                  nullable: false
                jp_fullname:
                  type: string
                  description: 'The full name in Japanese. Must be at least 1 character. Must not be greater than 120 characters.'
                  example: '山田 太郎'
                  nullable: false
                street:
                  type: string
                  description: 'The street address. Must not be greater than 100 characters.'
                  example: '123 Maple Street'
                  nullable: false
                city:
                  type: string
                  description: 'The city of the address. Must be at least 2 characters. Must not be greater than 40 characters.'
                  example: London
                  nullable: false
                state:
                  type: string
                  description: 'The state of the address. Must be at least 2 characters. Must not be greater than 40 characters.'
                  example: CA
                  nullable: false
                post_code:
                  type: string
                  description: 'The postal code of the address. Must be at least 2 characters. Must not be greater than 20 characters.'
                  example: '94107'
                  nullable: false
                country:
                  type: string
                  description: 'The country code of the address. Must be a valid ISO 3166-1 alpha-2 country code. The <code>country_code</code> of an existing record in the countries table. Must be 2 characters.'
                  example: GB
                  nullable: false
                email:
                  type: string
                  description: 'The email address of the customer. Must be a valid email address. Must not be greater than 100 characters.'
                  example: john.doe@example.com
                  nullable: false
                phone_code:
                  type: string
                  description: 'The international phone code. Must match the regex /^\+?\d{1,4}$/.'
                  example: '+44'
                  nullable: true
                phone:
                  type: string
                  description: 'The phone number. Must match the regex /^\+?\d[\d\-]*$/. Must be at least 5 characters. Must not be greater than 20 characters.'
                  example: '5551234567'
                  nullable: false
                reference_id:
                  type: string
                  description: "A customer's unique identifier. Must be at least 1 character. Must not be greater than 64 characters."
                  example: ABC123XYZ
                  nullable: false
                date_of_birth:
                  type: string
                  description: 'The date of birth. Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2021-10-20'
                  nullable: true
                legal_entity:
                  type: string
                  description: 'The legal status of the customer (PRIVATE/BUSINESS).'
                  example: PRIVATE
                  nullable: true
                  enum:
                    - PRIVATE
                    - BUSINESS
                identifiers:
                  type: array
                  description: "An array of customer's unique identifiers belonging to specific gateways.\n     Each object in the array must contain a numeric ***id***, which represents the unique identifier, and\n     a string ***gateway***, which represents the name of the gateway."
                  example:
                    -
                      id: '123456'
                      gateway: trustpay
                    -
                      id: '456789'
                      gateway: unlimit
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'The unique identifier.'
                        example: '123456'
                        nullable: false
                      gateway:
                        type: string
                        description: 'The name of the gateway.'
                        example: trustpay
                        nullable: false
    parameters:
      -
        in: path
        name: customer_token
        description: 'Customer token of the existing customer.'
        example: 31e80148-746c-11e8-ad82-000d3a2b9844
        required: true
        schema:
          type: string
  '/api/v2/customer/{customer_token}':
    get:
      summary: Status
      operationId: status
      description: 'To get information about the current status of a customer, call the status endpoint with the customer_token.'
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name: John
                  last_name: Doe
                  jp_fullname: '山田 太郎'
                  street: '123 Maple Street'
                  city: London
                  state: null
                  post_code: '94107'
                  country: GB
                  phone_code: '+44'
                  phone: '5551234567'
                  email: john.doe@example.com
                  reference_id: ABC123XYZ
                  date_of_birth: '2021-10-20'
                  legal_entity: PRIVATE
                  status: Active
                  created: '2024-06-04T10:06:57.000000Z'
                  updated: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    -
                      id: '123456'
                      gateway: trustpay
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                    -
                      id: '456789'
                      gateway: unlimit
                      created: '2024-06-04T10:06:57.000000Z'
                      updated: '2024-06-04T10:06:57.000000Z'
                  banks:
                    -
                      bank_token: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                      customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                      title: 'Bank Account'
                      currency: USD
                      beneficiary_name: 'John Doe'
                      beneficiary_address: '123 Maple Street, London'
                      bank_name: 'Metro Bank'
                      branch_name: MetroBank
                      bank_address: '123 Maple Street, London'
                      bank_code: '0100'
                      account_number: '789456123'
                      iban: GB23MBTC60161331926819
                      bic: MBTCPHMMXXX
                      account_type: current
                      bank_clearing_system_code: SGIBG
                      bank_clearing_system_id: '1234567'
                properties:
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  jp_fullname:
                    type: string
                    example: '山田 太郎'
                  street:
                    type: string
                    example: '123 Maple Street'
                  city:
                    type: string
                    example: London
                  state:
                    type: string
                    example: null
                  post_code:
                    type: string
                    example: '94107'
                  country:
                    type: string
                    example: GB
                  phone_code:
                    type: string
                    example: '+44'
                  phone:
                    type: string
                    example: '5551234567'
                  email:
                    type: string
                    example: john.doe@example.com
                  reference_id:
                    type: string
                    example: ABC123XYZ
                  date_of_birth:
                    type: string
                    example: '2021-10-20'
                  legal_entity:
                    type: string
                    example: PRIVATE
                  status:
                    type: string
                    example: Active
                  created:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  updated:
                    type: string
                    example: '2024-06-04T10:06:57.000000Z'
                  identifiers:
                    type: array
                    example:
                      -
                        id: '123456'
                        gateway: trustpay
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                      -
                        id: '456789'
                        gateway: unlimit
                        created: '2024-06-04T10:06:57.000000Z'
                        updated: '2024-06-04T10:06:57.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: '123456'
                        gateway:
                          type: string
                          example: trustpay
                        created:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                        updated:
                          type: string
                          example: '2024-06-04T10:06:57.000000Z'
                  banks:
                    type: array
                    example:
                      -
                        bank_token: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                        customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title: 'Bank Account'
                        currency: USD
                        beneficiary_name: 'John Doe'
                        beneficiary_address: '123 Maple Street, London'
                        bank_name: 'Metro Bank'
                        branch_name: MetroBank
                        bank_address: '123 Maple Street, London'
                        bank_code: '0100'
                        account_number: '789456123'
                        iban: GB23MBTC60161331926819
                        bic: MBTCPHMMXXX
                        account_type: current
                        bank_clearing_system_code: SGIBG
                        bank_clearing_system_id: '1234567'
                    items:
                      type: object
                      properties:
                        bank_token:
                          type: string
                          example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                        customer_token:
                          type: string
                          example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                        title:
                          type: string
                          example: 'Bank Account'
                        currency:
                          type: string
                          example: USD
                        beneficiary_name:
                          type: string
                          example: 'John Doe'
                        beneficiary_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_name:
                          type: string
                          example: 'Metro Bank'
                        branch_name:
                          type: string
                          example: MetroBank
                        bank_address:
                          type: string
                          example: '123 Maple Street, London'
                        bank_code:
                          type: string
                          example: '0100'
                        account_number:
                          type: string
                          example: '789456123'
                        iban:
                          type: string
                          example: GB23MBTC60161331926819
                        bic:
                          type: string
                          example: MBTCPHMMXXX
                        account_type:
                          type: string
                          example: current
                        bank_clearing_system_code:
                          type: string
                          example: SGIBG
                        bank_clearing_system_id:
                          type: string
                          example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
    parameters:
      -
        in: path
        name: customer_token
        description: 'Customer token of the existing customer.'
        example: 31e80148-746c-11e8-ad82-000d3a2b9844
        required: true
        schema:
          type: string
  /api/v2/tokenize/banks:
    post:
      summary: Create
      operationId: create
      description: "A tokenize bank request transforms bank data into a token. This request is sent by making a POST\n     request over HTTPS to the **/tokenize/banks** endpoint."
      parameters: []
      responses:
        201:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  bank_token: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title: 'Bank Account'
                  currency: USD
                  beneficiary_name: 'John Doe'
                  beneficiary_address: '123 Maple Street, London'
                  bank_name: 'Metro Bank'
                  branch_name: MetroBank
                  bank_address: '123 Maple Street, London'
                  bank_code: '0100'
                  bank_country: CZ
                  account_number: '789456123'
                  iban: GB23MBTC60161331926819
                  bic: MBTCPHMMXXX
                  account_type: current
                  bank_clearing_system_code: SGIBG
                  bank_clearing_system_id: '1234567'
                properties:
                  bank_token:
                    type: string
                    example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title:
                    type: string
                    example: 'Bank Account'
                  currency:
                    type: string
                    example: USD
                  beneficiary_name:
                    type: string
                    example: 'John Doe'
                  beneficiary_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_name:
                    type: string
                    example: 'Metro Bank'
                  branch_name:
                    type: string
                    example: MetroBank
                  bank_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_code:
                    type: string
                    example: '0100'
                  bank_country:
                    type: string
                    example: CZ
                  account_number:
                    type: string
                    example: '789456123'
                  iban:
                    type: string
                    example: GB23MBTC60161331926819
                  bic:
                    type: string
                    example: MBTCPHMMXXX
                  account_type:
                    type: string
                    example: current
                  bank_clearing_system_code:
                    type: string
                    example: SGIBG
                  bank_clearing_system_id:
                    type: string
                    example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: true
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                customer_token:
                  type: string
                  description: 'A token identifying the customer who owns the bank account. This field is required.'
                  example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  nullable: false
                title:
                  type: string
                  description: 'The name of the bank account. This field is required. Must not be greater than 100 characters.'
                  example: 'Bank Account'
                  nullable: false
                currency:
                  type: string
                  description: 'The currency code representing the currency in which the bank account is denominated. The <code>cy_code</code> of an existing record in the currencies table.'
                  example: USD
                  nullable: false
                beneficiary_name:
                  type: string
                  description: 'The name of the account holder or the customer who owns the bank account. Must not be greater than 255 characters.'
                  example: 'John Doe'
                  nullable: false
                beneficiary_address:
                  type: string
                  description: 'The address of the account holder. This field is required when <code>iban</code> is present. Must not be greater than 255 characters.'
                  example: '123 Maple Street, London'
                  nullable: true
                bank_name:
                  type: string
                  description: "The name of the bank where the customer's account is held. Must not be greater than 255 characters."
                  example: 'Metro Bank'
                  nullable: false
                branch_name:
                  type: string
                  description: "The name of the specific branch of the bank where the customer's account is maintained. This field is required when <code>account_number</code> is present. Must not be greater than 255 characters."
                  example: MetroBank
                  nullable: true
                bank_address:
                  type: string
                  description: "The address of the bank where the customer's account is held. This field is required when <code>iban</code> is present. Must not be greater than 255 characters."
                  example: '123 Maple Street, London'
                  nullable: true
                bank_code:
                  type: string
                  description: 'The code that uniquely identifies the bank. This field is required when <code>account_number</code> is present. Must not be greater than 20 characters.'
                  example: '0100'
                  nullable: true
                bank_country:
                  type: string
                  description: 'The country code of the bank. The <code>country_code</code> of an existing record in the countries table. Must not be greater than 2 characters.'
                  example: CZ
                  nullable: true
                account_number:
                  type: number
                  description: "The bank account number that uniquely identifies the customer's bank account. This field is required when <code>iban</code> is not present."
                  example: 789456123.0
                  nullable: true
                iban:
                  type: string
                  description: "An international standard account number (IBAN) used to uniquely identify the customer's bank account for cross-border transactions. This field is required when <code>account_number</code> is not present. Must not be greater than 50 characters."
                  example: GB23MBTC60161331926819
                  nullable: true
                bic:
                  type: string
                  description: "An international standard code (BIC/SWIFT) used to identify the customer's bank for cross-border transactions. Must not be greater than 20 characters."
                  example: MBTCPHMMXXX
                  nullable: true
                account_type:
                  type: string
                  description: 'The type of the bank account.'
                  example: current
                  nullable: true
                  enum:
                    - current
                    - savings
                    - checking
                bank_clearing_system_code:
                  type: string
                  description: 'The bank clearing code (ISO 20022).'
                  example: SGIBG
                  nullable: true
                  enum:
                    - ATBLZ
                    - AUBSB
                    - CACPA
                    - CHBCC
                    - CHSIC
                    - CNAPS
                    - DEBLZ
                    - ESNCC
                    - GBDSC
                    - GRBIC
                    - HKNCC
                    - IENCC
                    - INFSC
                    - ITNCC
                    - JPZGN
                    - NZNCC
                    - PLKNR
                    - PTNCC
                    - RUCBC
                    - SESBA
                    - SGIBG
                    - TWNCC
                    - USABA
                    - USPID
                    - ZANCC
                bank_clearing_system_id:
                  type: string
                  description: 'The bank clearing identifier (ISO 20022).<table><tr><th>clearing code</th><th>clearing ID validation mask</th></tr><tr><td>ATBLZ</td><td>[0-9]{5,5}</td></tr><tr><td>AUBSB</td><td>[0-9]{6,6}</td></tr><tr><td>CACPA</td><td>[0-9]{9,9}</td></tr><tr><td>CHBCC</td><td>[0-9]{3,5}</td></tr><tr><td>CHSIC</td><td>[0-9]{6,6}</td></tr><tr><td>CNAPS</td><td>[0-9]{12,12}</td></tr><tr><td>DEBLZ</td><td>[0-9]{8,8}</td></tr><tr><td>ESNCC</td><td>[0-9]{8,9}</td></tr><tr><td>GBDSC</td><td>[0-9]{6,6}</td></tr><tr><td>GRBIC</td><td>[0-9]{7,7}</td></tr><tr><td>HKNCC</td><td>[0-9]{3,3}</td></tr><tr><td>IENCC</td><td>[0-9]{6,6}</td></tr><tr><td>INFSC</td><td>[a-zA-Z0-9]{11,11}</td></tr><tr><td>ITNCC</td><td>[0-9]{10,10}</td></tr><tr><td>JPZGN</td><td>[0-9]{7,7}</td></tr><tr><td>NZNCC</td><td>[0-9]{6,6}</td></tr><tr><td>PLKNR</td><td>[0-9]{8,8}</td></tr><tr><td>PTNCC</td><td>[0-9]{8,8}</td></tr><tr><td>RUCBC</td><td>[0-9]{9,9}</td></tr><tr><td>SESBA</td><td>[0-9]{4,4}</td></tr><tr><td>SGIBG</td><td>[0-9]{7,7} or [0-9]{3,4}</td></tr><tr><td>TWNCC</td><td>[0-9]{7,7}</td></tr><tr><td>USABA</td><td>[0-9]{9,9}</td></tr><tr><td>USPID</td><td>[0-9]{4,4}</td></tr><tr><td>ZANCC</td><td>[0-9]{6,6}</td></tr></table> Regexp validation masks.'
                  example: '1234567'
                  nullable: false
              required:
                - customer_token
                - title
                - currency
                - beneficiary_name
                - bank_name
  '/api/v2/tokenize/banks/{customerBank_bank_token}':
    patch:
      summary: Update
      operationId: update
      description: "You can update a bank account by sending a PATCH request\n     over HTTPS to the **/tokenize/banks/{bank_token}** endpoint."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  bank_token: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title: 'Bank Account'
                  currency: USD
                  beneficiary_name: 'John Doe'
                  beneficiary_address: '123 Maple Street, London'
                  bank_name: 'Metro Bank'
                  branch_name: MetroBank
                  bank_address: '123 Maple Street, London'
                  bank_code: '0100'
                  bank_country: CZ
                  account_number: '789456123'
                  iban: GB23MBTC60161331926819
                  bic: MBTCPHMMXXX
                  account_type: current
                  bank_clearing_system_code: SGIBG
                  bank_clearing_system_id: '1234567'
                properties:
                  bank_token:
                    type: string
                    example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title:
                    type: string
                    example: 'Bank Account'
                  currency:
                    type: string
                    example: USD
                  beneficiary_name:
                    type: string
                    example: 'John Doe'
                  beneficiary_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_name:
                    type: string
                    example: 'Metro Bank'
                  branch_name:
                    type: string
                    example: MetroBank
                  bank_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_code:
                    type: string
                    example: '0100'
                  bank_country:
                    type: string
                    example: CZ
                  account_number:
                    type: string
                    example: '789456123'
                  iban:
                    type: string
                    example: GB23MBTC60161331926819
                  bic:
                    type: string
                    example: MBTCPHMMXXX
                  account_type:
                    type: string
                    example: current
                  bank_clearing_system_code:
                    type: string
                    example: SGIBG
                  bank_clearing_system_id:
                    type: string
                    example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
      requestBody:
        required: false
        content:
          'application/json (or application/x-www-form-url-encoded)':
            schema:
              type: object
              properties:
                customer_token:
                  type: string
                  description: 'A token identifying the customer who owns the bank account.'
                  example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  nullable: false
                title:
                  type: string
                  description: 'The name of the bank account. Must not be greater than 100 characters.'
                  example: 'Bank Account'
                  nullable: false
                currency:
                  type: string
                  description: 'The currency code representing the currency in which the bank account is denominated. The <code>cy_code</code> of an existing record in the currencies table.'
                  example: USD
                  nullable: false
                beneficiary_name:
                  type: string
                  description: 'The name of the account holder or the customer who owns the bank account. Must not be greater than 255 characters.'
                  example: 'John Doe'
                  nullable: false
                beneficiary_address:
                  type: string
                  description: 'The address of the account holder. Must not be greater than 255 characters.'
                  example: '123 Maple Street, London'
                  nullable: true
                bank_name:
                  type: string
                  description: "The name of the bank where the customer's account is held. Must not be greater than 255 characters."
                  example: 'Metro Bank'
                  nullable: false
                branch_name:
                  type: string
                  description: "The name of the specific branch of the bank where the customer's account is maintained. Must not be greater than 255 characters."
                  example: MetroBank
                  nullable: true
                bank_address:
                  type: string
                  description: "The address of the bank where the customer's account is held. Must not be greater than 255 characters."
                  example: '123 Maple Street, London'
                  nullable: true
                bank_code:
                  type: string
                  description: 'The code that uniquely identifies the bank. Must not be greater than 20 characters.'
                  example: '0100'
                  nullable: true
                bank_country:
                  type: string
                  description: 'The country code of the bank. The <code>country_code</code> of an existing record in the countries table. Must not be greater than 2 characters.'
                  example: CZ
                  nullable: true
                account_number:
                  type: number
                  description: "The bank account number that uniquely identifies the customer's bank account."
                  example: 789456123.0
                  nullable: true
                iban:
                  type: string
                  description: "An international standard account number (IBAN) used to uniquely identify the customer's bank account for cross-border transactions. Must not be greater than 50 characters."
                  example: GB23MBTC60161331926819
                  nullable: true
                bic:
                  type: string
                  description: "An international standard code (BIC/SWIFT) used to identify the customer's bank for cross-border transactions. Must not be greater than 20 characters."
                  example: MBTCPHMMXXX
                  nullable: true
                account_type:
                  type: string
                  description: 'The type of the bank account.'
                  example: current
                  nullable: true
                  enum:
                    - current
                    - savings
                    - checking
                bank_clearing_system_code:
                  type: string
                  description: 'The bank clearing code (ISO 20022).'
                  example: SGIBG
                  nullable: true
                  enum:
                    - ATBLZ
                    - AUBSB
                    - CACPA
                    - CHBCC
                    - CHSIC
                    - CNAPS
                    - DEBLZ
                    - ESNCC
                    - GBDSC
                    - GRBIC
                    - HKNCC
                    - IENCC
                    - INFSC
                    - ITNCC
                    - JPZGN
                    - NZNCC
                    - PLKNR
                    - PTNCC
                    - RUCBC
                    - SESBA
                    - SGIBG
                    - TWNCC
                    - USABA
                    - USPID
                    - ZANCC
                bank_clearing_system_id:
                  type: string
                  description: 'The bank clearing identifier (ISO 20022). <table><tr><th>clearing code</th><th>clearing ID validation mask</th></tr><tr><td>ATBLZ</td><td>[0-9]{5,5}</td></tr><tr><td>AUBSB</td><td>[0-9]{6,6}</td></tr><tr><td>CACPA</td><td>[0-9]{9,9}</td></tr><tr><td>CHBCC</td><td>[0-9]{3,5}</td></tr><tr><td>CHSIC</td><td>[0-9]{6,6}</td></tr><tr><td>CNAPS</td><td>[0-9]{12,12}</td></tr><tr><td>DEBLZ</td><td>[0-9]{8,8}</td></tr><tr><td>ESNCC</td><td>[0-9]{8,9}</td></tr><tr><td>GBDSC</td><td>[0-9]{6,6}</td></tr><tr><td>GRBIC</td><td>[0-9]{7,7}</td></tr><tr><td>HKNCC</td><td>[0-9]{3,3}</td></tr><tr><td>IENCC</td><td>[0-9]{6,6}</td></tr><tr><td>INFSC</td><td>[a-zA-Z0-9]{11,11}</td></tr><tr><td>ITNCC</td><td>[0-9]{10,10}</td></tr><tr><td>JPZGN</td><td>[0-9]{7,7}</td></tr><tr><td>NZNCC</td><td>[0-9]{6,6}</td></tr><tr><td>PLKNR</td><td>[0-9]{8,8}</td></tr><tr><td>PTNCC</td><td>[0-9]{8,8}</td></tr><tr><td>RUCBC</td><td>[0-9]{9,9}</td></tr><tr><td>SESBA</td><td>[0-9]{4,4}</td></tr><tr><td>SGIBG</td><td>[0-9]{7,7} or [0-9]{3,4}</td></tr><tr><td>TWNCC</td><td>[0-9]{7,7}</td></tr><tr><td>USABA</td><td>[0-9]{9,9}</td></tr><tr><td>USPID</td><td>[0-9]{4,4}</td></tr><tr><td>ZANCC</td><td>[0-9]{6,6}</td></tr></table> Regexp validation masks.'
                  example: '1234567'
                  nullable: true
    parameters:
      -
        in: path
        name: customerBank_bank_token
        description: 'Bank token of the existing bank account.'
        example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
        required: true
        schema:
          type: string
  /api/v2/payment-methods:
    get:
      summary: 'Get payment methods'
      operationId: getPaymentMethods
      description: "The payment methods endpoint returns available payment methods on the particular terminal by sending a GET\n     request over HTTPS to the **/payment-methods**."
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  card:
                    czk:
                      - jcb
                      - maestro
                      - mastercard
                      - visa
                    eur:
                      - jcb
                      - maestro
                      - mastercard
                      - unionpay
                      - visa
                    gbp:
                      - maestro
                      - mastercard
                      - visa
                    jpy:
                      - jcb
                      - maestro
                      - mastercard
                      - unionpay
                      - visa
                    ngn:
                      - mastercard
                      - verve
                      - visa
                    pln:
                      - maestro
                      - mastercard
                      - visa
                    usd:
                      - jcb
                      - maestro
                      - mastercard
                      - unionpay
                      - visa
                  wire: true
                  wallet:
                    - skrill
                    - neteller
                  crypto:
                    - confirmo
                properties:
                  card:
                    type: object
                    properties:
                      czk:
                        type: array
                        example:
                          - jcb
                          - maestro
                          - mastercard
                          - visa
                        items:
                          type: string
                      eur:
                        type: array
                        example:
                          - jcb
                          - maestro
                          - mastercard
                          - unionpay
                          - visa
                        items:
                          type: string
                      gbp:
                        type: array
                        example:
                          - maestro
                          - mastercard
                          - visa
                        items:
                          type: string
                      jpy:
                        type: array
                        example:
                          - jcb
                          - maestro
                          - mastercard
                          - unionpay
                          - visa
                        items:
                          type: string
                      ngn:
                        type: array
                        example:
                          - mastercard
                          - verve
                          - visa
                        items:
                          type: string
                      pln:
                        type: array
                        example:
                          - maestro
                          - mastercard
                          - visa
                        items:
                          type: string
                      usd:
                        type: array
                        example:
                          - jcb
                          - maestro
                          - mastercard
                          - unionpay
                          - visa
                        items:
                          type: string
                  wire:
                    type: boolean
                    example: true
                  wallet:
                    type: array
                    example:
                      - skrill
                      - neteller
                    items:
                      type: string
                  crypto:
                    type: array
                    example:
                      - confirmo
                    items:
                      type: string
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        410:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Transaction has expired (Transaction ID: #ID)'
                  code: 200037
                properties:
                  error:
                    type: string
                    example: 'Transaction has expired (Transaction ID: #ID)'
                  code:
                    type: integer
                    example: 200037
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
  '/api/v2/bank/{bank_token}':
    get:
      summary: Status
      operationId: status
      description: 'To get information about the current status of a bank account, call the status endpoint with the bank_token.'
      parameters: []
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                type: object
                example:
                  bank_token: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title: 'Bank Account'
                  currency: USD
                  beneficiary_name: 'John Doe'
                  beneficiary_address: '123 Maple Street, London'
                  bank_name: 'Metro Bank'
                  branch_name: MetroBank
                  bank_address: '123 Maple Street, London'
                  bank_code: '0100'
                  account_number: '789456123'
                  iban: GB23MBTC60161331926819
                  bic: MBTCPHMMXXX
                  account_type: current
                  bank_clearing_system_code: SGIBG
                  bank_clearing_system_id: '1234567'
                properties:
                  bank_token:
                    type: string
                    example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
                  customer_token:
                    type: string
                    example: 496d8b1f-916e-4f79-bab6-a09a223ecffb
                  title:
                    type: string
                    example: 'Bank Account'
                  currency:
                    type: string
                    example: USD
                  beneficiary_name:
                    type: string
                    example: 'John Doe'
                  beneficiary_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_name:
                    type: string
                    example: 'Metro Bank'
                  branch_name:
                    type: string
                    example: MetroBank
                  bank_address:
                    type: string
                    example: '123 Maple Street, London'
                  bank_code:
                    type: string
                    example: '0100'
                  account_number:
                    type: string
                    example: '789456123'
                  iban:
                    type: string
                    example: GB23MBTC60161331926819
                  bic:
                    type: string
                    example: MBTCPHMMXXX
                  account_type:
                    type: string
                    example: current
                  bank_clearing_system_code:
                    type: string
                    example: SGIBG
                  bank_clearing_system_id:
                    type: string
                    example: '1234567'
        400:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Bad request'
                  code: 200000
                properties:
                  error:
                    type: string
                    example: 'Bad request'
                  code:
                    type: integer
                    example: 200000
        401:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthenticated
                  code: 100001
                properties:
                  error:
                    type: string
                    example: Unauthenticated
                  code:
                    type: integer
                    example: 100001
        403:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  code: 100004
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  code:
                    type: integer
                    example: 100004
        404:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Record not found'
                  code: 200007
                properties:
                  error:
                    type: string
                    example: 'Record not found'
                  code:
                    type: integer
                    example: 200007
        405:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'The specified method for the request is invalid'
                  code: 200008
                properties:
                  error:
                    type: string
                    example: 'The specified method for the request is invalid'
                  code:
                    type: integer
                    example: 200008
        422:
          description: 'Error response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Invalid currency'
                  code: 100003
                properties:
                  error:
                    type: string
                    example: 'Invalid currency'
                  code:
                    type: integer
                    example: 100003
      tags:
        - Resources
    parameters:
      -
        in: path
        name: bank_token
        description: 'Bank token of the existing bank account.'
        example: a6a6509b-26dc-49cc-b0e6-92c5d6eede36
        required: true
        schema:
          type: string
tags:
  -
    name: Resources
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.'
security:
  -
    default: []
