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

# Payouts - Confirm



## OpenAPI

````yaml openapi_spec post /payouts/{payout_id}/confirm
openapi: 3.0.3
info:
  title: Pesaswap - API Documentation
  description: >

    ## Get started


    Pesaswap provides a collection of APIs that enable you to process and manage
    payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Pesaswap API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://api.sandbox.pesaswap.io>   |

    | Production    | <https://api.pesaswap.io>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.pesaswap.io) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Pesaswap server by providing the
    appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Pesaswap Support
    url: https://pesaswap.io
    email: support@pesaswap.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://api.sandbox.pesaswap.io
    description: Sandbox Environment
  - url: https://api.pesaswap.io
    description: Production Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
paths:
  /payouts/{payout_id}/confirm:
    post:
      tags:
        - Payouts
      summary: Payouts - Confirm
      operationId: Confirm a Payout
      parameters:
        - name: payout_id
          in: path
          description: The identifier for payout
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayoutConfirmRequest'
        required: true
      responses:
        '200':
          description: Payout updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutCreateResponse'
        '400':
          description: Missing Mandatory fields
      security:
        - api_key: []
components:
  schemas:
    PayoutConfirmRequest:
      type: object
      required:
        - client_secret
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            The payout amount. Amount for the payout in lowest denomination of
            the currency. (i.e) in cents for USD denomination, in paisa for INR
            denomination etc.,
          example: 1000
          nullable: true
          minimum: 0
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          nullable: true
        routing:
          allOf:
            - $ref: '#/components/schemas/RoutingAlgorithm'
          nullable: true
        connector:
          type: array
          items:
            $ref: '#/components/schemas/PayoutConnectors'
          description: >-
            This field allows the merchant to manually select a connector with
            which the payout can go through.
          example:
            - wise
            - adyen
          nullable: true
        payout_type:
          allOf:
            - $ref: '#/components/schemas/PayoutType'
          nullable: true
        payout_method_data:
          allOf:
            - $ref: '#/components/schemas/PayoutMethodData'
          nullable: true
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        auto_fulfill:
          type: boolean
          description: >-
            Set to true to confirm the payout without review, no further action
            required
          default: false
          example: true
          nullable: true
        customer_id:
          type: string
          description: >-
            The identifier for the customer object. If not provided the customer
            ID will be autogenerated. _Deprecated: Use customer_id instead._
          deprecated: true
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          nullable: true
          maxLength: 255
        customer:
          allOf:
            - $ref: '#/components/schemas/CustomerDetails'
          nullable: true
        client_secret:
          type: string
          description: It's a token used for client side verification.
        return_url:
          type: string
          description: The URL to redirect after the completion of the operation
          example: https://pesaswap.io
          nullable: true
        business_country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        business_label:
          type: string
          description: >-
            Business label of the merchant for this payout. _Deprecated: Use
            profile_id instead._
          deprecated: true
          example: food
          nullable: true
        description:
          type: string
          description: A description of the payout
          example: It's my first payout request
          nullable: true
        entity_type:
          allOf:
            - $ref: '#/components/schemas/PayoutEntityType'
          nullable: true
        recurring:
          type: boolean
          description: Specifies whether or not the payout request is recurring
          default: false
          nullable: true
        metadata:
          type: object
          description: >-
            You can specify up to 50 keys, with key names up to 40 characters
            long and values up to 500 characters long. Metadata is useful for
            storing additional, structured information on an object.
          nullable: true
        payout_token:
          type: string
          description: >-
            Provide a reference to a stored payout method, used to process the
            payout.
          example: 187282ab-40ef-47a9-9206-5099ba31e432
          nullable: true
        profile_id:
          type: string
          description: >-
            The business profile to use for this payout, especially if there are
            multiple business profiles associated with the account, otherwise
            default business profile associated with the merchant account will
            be used.
          nullable: true
        priority:
          allOf:
            - $ref: '#/components/schemas/PayoutSendPriority'
          nullable: true
        payout_link:
          type: boolean
          description: >-
            Whether to get the payout link (if applicable). Merchant need to
            specify this during the Payout _Create_, this field can not be
            updated during Payout _Update_.
          default: false
          example: true
          nullable: true
        payout_link_config:
          allOf:
            - $ref: '#/components/schemas/PayoutCreatePayoutLinkConfig'
          nullable: true
        session_expiry:
          type: integer
          format: int32
          description: >-
            Will be used to expire client secret after certain amount of time to
            be supplied in seconds

            (900) for 15 mins
          example: 900
          nullable: true
          minimum: 0
        email:
          type: string
          description: 'Customer''s email. _Deprecated: Use customer object instead._'
          deprecated: true
          example: johntest@test.com
          nullable: true
          maxLength: 255
        name:
          type: string
          description: 'Customer''s name. _Deprecated: Use customer object instead._'
          deprecated: true
          example: John Test
          nullable: true
          maxLength: 255
        phone:
          type: string
          description: 'Customer''s phone. _Deprecated: Use customer object instead._'
          deprecated: true
          example: '9123456789'
          nullable: true
          maxLength: 255
        phone_country_code:
          type: string
          description: >-
            Customer's phone country code. _Deprecated: Use customer object
            instead._
          deprecated: true
          example: '+1'
          nullable: true
          maxLength: 255
        payout_method_id:
          type: string
          description: Identifier for payout method
          nullable: true
    PayoutCreateResponse:
      type: object
      required:
        - payout_id
        - merchant_id
        - amount
        - currency
        - auto_fulfill
        - customer_id
        - client_secret
        - return_url
        - business_country
        - entity_type
        - recurring
        - status
        - profile_id
      properties:
        payout_id:
          type: string
          description: >-
            Unique identifier for the payout. This ensures idempotency for
            multiple payouts

            that have been done by a single merchant. This field is auto
            generated and is returned in the API response.
          example: 187282ab-40ef-47a9-9206-5099ba31e432
          maxLength: 30
          minLength: 30
        merchant_id:
          type: string
          description: >-
            This is an identifier for the merchant account. This is inferred
            from the API key

            provided during the request
          example: merchant_1668273825
          maxLength: 255
        amount:
          type: integer
          format: int64
          description: >-
            The payout amount. Amount for the payout in lowest denomination of
            the currency. (i.e) in cents for USD denomination, in paisa for INR
            denomination etc.,
          example: 1000
        currency:
          $ref: '#/components/schemas/Currency'
        connector:
          type: string
          description: The connector used for the payout
          example: wise
          nullable: true
        payout_type:
          allOf:
            - $ref: '#/components/schemas/PayoutType'
          nullable: true
        payout_method_data:
          allOf:
            - $ref: '#/components/schemas/PayoutMethodDataResponse'
          nullable: true
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        auto_fulfill:
          type: boolean
          description: >-
            Set to true to confirm the payout without review, no further action
            required
          default: false
          example: true
        customer_id:
          type: string
          description: >-
            The identifier for the customer object. If not provided the customer
            ID will be autogenerated.
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 255
        customer:
          allOf:
            - $ref: '#/components/schemas/CustomerDetailsResponse'
          nullable: true
        client_secret:
          type: string
          description: It's a token used for client side verification.
          example: pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo
        return_url:
          type: string
          description: The URL to redirect after the completion of the operation
          example: https://pesaswap.io
        business_country:
          $ref: '#/components/schemas/CountryAlpha2'
        business_label:
          type: string
          description: Business label of the merchant for this payout
          example: food
          nullable: true
        description:
          type: string
          description: A description of the payout
          example: It's my first payout request
          nullable: true
        entity_type:
          $ref: '#/components/schemas/PayoutEntityType'
        recurring:
          type: boolean
          description: Specifies whether or not the payout request is recurring
          default: false
        metadata:
          type: object
          description: >-
            You can specify up to 50 keys, with key names up to 40 characters
            long and values up to 500 characters long. Metadata is useful for
            storing additional, structured information on an object.
          nullable: true
        merchant_connector_id:
          type: string
          description: Unique identifier of the merchant connector account
          example: mca_sAD3OZLATetvjLOYhUSy
          nullable: true
        status:
          $ref: '#/components/schemas/PayoutStatus'
        error_message:
          type: string
          description: >-
            If there was an error while calling the connector the error message
            is received here
          example: Failed while verifying the card
          nullable: true
        error_code:
          type: string
          description: >-
            If there was an error while calling the connectors the code is
            received here
          example: E0001
          nullable: true
        profile_id:
          type: string
          description: The business profile that is associated with this payout
        created:
          type: string
          format: date-time
          description: Time when the payout was created
          example: '2022-09-10T10:11:12Z'
          nullable: true
        connector_transaction_id:
          type: string
          description: Underlying processor's payout resource ID
          example: S3FC9G9M2MVFDXT5
          nullable: true
        priority:
          allOf:
            - $ref: '#/components/schemas/PayoutSendPriority'
          nullable: true
        attempts:
          type: array
          items:
            $ref: '#/components/schemas/PayoutAttemptResponse'
          description: List of attempts
          nullable: true
        payout_link:
          allOf:
            - $ref: '#/components/schemas/PayoutLinkResponse'
          nullable: true
        email:
          type: string
          description: 'Customer''s email. _Deprecated: Use customer object instead._'
          deprecated: true
          example: johntest@test.com
          nullable: true
          maxLength: 255
        name:
          type: string
          description: 'Customer''s name. _Deprecated: Use customer object instead._'
          deprecated: true
          example: John Test
          nullable: true
          maxLength: 255
        phone:
          type: string
          description: 'Customer''s phone. _Deprecated: Use customer object instead._'
          deprecated: true
          example: '9123456789'
          nullable: true
          maxLength: 255
        phone_country_code:
          type: string
          description: >-
            Customer's phone country code. _Deprecated: Use customer object
            instead._
          deprecated: true
          example: '+1'
          nullable: true
          maxLength: 255
        unified_code:
          type: string
          description: >-
            (This field is not live yet)

            Error code unified across the connectors is received here in case of
            errors while calling the underlying connector
          example: UE_000
          nullable: true
          maxLength: 255
        unified_message:
          type: string
          description: >-
            (This field is not live yet)

            Error message unified across the connectors is received here in case
            of errors while calling the underlying connector
          example: Invalid card details
          nullable: true
          maxLength: 1024
        payout_method_id:
          type: string
          description: Identifier for payout method
          nullable: true
      additionalProperties: false
    Currency:
      type: string
      description: >-
        The three letter ISO currency code in uppercase. Eg: 'USD' for the
        United States Dollar.
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZWL
    RoutingAlgorithm:
      oneOf:
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - single
            data:
              $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - priority
            data:
              type: array
              items:
                $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - volume_split
            data:
              type: array
              items:
                $ref: '#/components/schemas/ConnectorVolumeSplit'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - advanced
            data:
              $ref: '#/components/schemas/ProgramConnectorSelection'
      description: Routing Algorithm kind
      discriminator:
        propertyName: type
    PayoutConnectors:
      type: string
      enum:
        - adyen
        - adyenplatform
        - cybersource
        - ebanx
        - payone
        - paypal
        - stripe
        - wise
    PayoutType:
      type: string
      description: >-
        The payout_type of the payout request is a mandatory field for
        confirming the payouts. It should be specified in the Create request. If
        not provided, it must be updated in the Payout Update request before it
        can be confirmed.
      enum:
        - card
        - bank
        - wallet
    PayoutMethodData:
      oneOf:
        - type: object
          required:
            - card
          properties:
            card:
              $ref: '#/components/schemas/CardPayout'
        - type: object
          required:
            - bank
          properties:
            bank:
              $ref: '#/components/schemas/Bank'
        - type: object
          required:
            - wallet
          properties:
            wallet:
              $ref: '#/components/schemas/Wallet'
      description: The payout method information required for carrying out a payout
    Address:
      type: object
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/AddressDetails'
          nullable: true
        phone:
          allOf:
            - $ref: '#/components/schemas/PhoneDetails'
          nullable: true
        email:
          type: string
          nullable: true
      additionalProperties: false
    CustomerDetails:
      type: object
      description: >-
        Passing this object creates a new customer or attaches an existing
        customer to the payment
      required:
        - id
      properties:
        id:
          type: string
          description: The identifier for the customer.
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
          minLength: 1
        name:
          type: string
          description: The customer's name
          example: John Doe
          nullable: true
          maxLength: 255
        email:
          type: string
          description: The customer's email address
          example: johntest@test.com
          nullable: true
          maxLength: 255
        phone:
          type: string
          description: The customer's phone number
          example: '9123456789'
          nullable: true
          maxLength: 10
        phone_country_code:
          type: string
          description: The country code for the customer's phone number
          example: '+1'
          nullable: true
          maxLength: 2
    CountryAlpha2:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MK
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - US
    PayoutEntityType:
      type: string
      description: >-
        Type of entity to whom the payout is being carried out to, select from
        the given list of options
      enum:
        - Individual
        - Company
        - NonProfit
        - PublicSector
        - NaturalPerson
        - lowercase
        - Personal
    PayoutSendPriority:
      type: string
      description: >-
        The send method which will be required for processing payouts, check
        options for better understanding.
      enum:
        - instant
        - fast
        - regular
        - wire
        - cross_border
        - internal
    PayoutCreatePayoutLinkConfig:
      allOf:
        - allOf:
            - $ref: '#/components/schemas/GenericLinkUiConfig'
          nullable: true
        - type: object
          properties:
            payout_link_id:
              type: string
              description: The unique identifier for the collect link.
              example: pm_collect_link_2bdacf398vwzq5n422S1
              nullable: true
            enabled_payment_methods:
              type: array
              items:
                $ref: '#/components/schemas/EnabledPaymentMethod'
              description: List of payout methods shown on collect UI
              example: >-
                [{"payment_method": "bank_transfer", "payment_method_types":
                ["ach", "bacs"]}]
              nullable: true
            form_layout:
              allOf:
                - $ref: '#/components/schemas/UIWidgetFormLayout'
              nullable: true
            test_mode:
              type: boolean
              description: >-
                `test_mode` allows for opening payout links without any
                restrictions. This removes

                - domain name validations

                - check for making sure link is accessed within an iframe
              example: false
              nullable: true
      description: >-
        Custom payout link config for the particular payout, if payout link is
        to be generated.
    PayoutMethodDataResponse:
      oneOf:
        - type: object
          required:
            - card
          properties:
            card:
              $ref: '#/components/schemas/CardAdditionalData'
        - type: object
          required:
            - bank
          properties:
            bank:
              $ref: '#/components/schemas/BankAdditionalData'
        - type: object
          required:
            - wallet
          properties:
            wallet:
              $ref: '#/components/schemas/WalletAdditionalData'
      description: The payout method information for response
    CustomerDetailsResponse:
      type: object
      description: Details of customer attached to this payment
      properties:
        id:
          type: string
          description: The identifier for the customer.
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          nullable: true
          maxLength: 64
          minLength: 1
        name:
          type: string
          description: The customer's name
          example: John Doe
          nullable: true
          maxLength: 255
        email:
          type: string
          description: The customer's email address
          example: johntest@test.com
          nullable: true
          maxLength: 255
        phone:
          type: string
          description: The customer's phone number
          example: '9123456789'
          nullable: true
          maxLength: 10
        phone_country_code:
          type: string
          description: The country code for the customer's phone number
          example: '+1'
          nullable: true
          maxLength: 2
    PayoutStatus:
      type: string
      enum:
        - success
        - failed
        - cancelled
        - initiated
        - expired
        - reversed
        - pending
        - ineligible
        - requires_creation
        - requires_confirmation
        - requires_payout_method_data
        - requires_fulfillment
        - requires_vendor_account_creation
    PayoutAttemptResponse:
      type: object
      required:
        - attempt_id
        - status
        - amount
      properties:
        attempt_id:
          type: string
          description: Unique identifier for the attempt
        status:
          $ref: '#/components/schemas/PayoutStatus'
        amount:
          type: integer
          format: int64
          description: >-
            The payout attempt amount. Amount for the payout in lowest
            denomination of the currency. (i.e) in cents for USD denomination,
            in paisa for INR denomination etc.,
          example: 6583
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          nullable: true
        connector:
          type: string
          description: The connector used for the payout
          nullable: true
        error_code:
          type: string
          description: Connector's error code in case of failures
          nullable: true
        error_message:
          type: string
          description: Connector's error message in case of failures
          nullable: true
        payment_method:
          allOf:
            - $ref: '#/components/schemas/PayoutType'
          nullable: true
        payout_method_type:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodType'
          nullable: true
        connector_transaction_id:
          type: string
          description: A unique identifier for a payout provided by the connector
          nullable: true
        cancellation_reason:
          type: string
          description: If the payout was cancelled the reason provided here
          nullable: true
        unified_code:
          type: string
          description: >-
            (This field is not live yet)

            Error code unified across the connectors is received here in case of
            errors while calling the underlying connector
          example: UE_000
          nullable: true
          maxLength: 255
        unified_message:
          type: string
          description: >-
            (This field is not live yet)

            Error message unified across the connectors is received here in case
            of errors while calling the underlying connector
          example: Invalid card details
          nullable: true
          maxLength: 1024
    PayoutLinkResponse:
      type: object
      required:
        - payout_link_id
        - link
      properties:
        payout_link_id:
          type: string
        link:
          type: string
    RoutableConnectorChoice:
      type: object
      description: Routable Connector chosen for a payment
      required:
        - connector
      properties:
        connector:
          $ref: '#/components/schemas/RoutableConnectors'
        merchant_connector_id:
          type: string
          nullable: true
    ConnectorVolumeSplit:
      type: object
      required:
        - connector
        - split
      properties:
        connector:
          $ref: '#/components/schemas/RoutableConnectorChoice'
        split:
          type: integer
          format: int32
          minimum: 0
    ProgramConnectorSelection:
      type: object
      description: |-
        The program, having a default connector selection and
        a bunch of rules. Also can hold arbitrary metadata.
      required:
        - defaultSelection
        - rules
        - metadata
      properties:
        defaultSelection:
          $ref: '#/components/schemas/ConnectorSelection'
        rules:
          $ref: '#/components/schemas/RuleConnectorSelection'
        metadata:
          type: object
          additionalProperties: {}
    CardPayout:
      type: object
      required:
        - card_number
        - expiry_month
        - expiry_year
        - card_holder_name
      properties:
        card_number:
          type: string
          description: The card number
          example: '4242424242424242'
        expiry_month:
          type: string
          description: The card's expiry month
        expiry_year:
          type: string
          description: The card's expiry year
        card_holder_name:
          type: string
          description: The card holder's name
          example: John Doe
    Bank:
      oneOf:
        - $ref: '#/components/schemas/AchBankTransfer'
        - $ref: '#/components/schemas/BacsBankTransfer'
        - $ref: '#/components/schemas/SepaBankTransfer'
        - $ref: '#/components/schemas/PixBankTransfer'
    Wallet:
      oneOf:
        - type: object
          required:
            - paypal
          properties:
            paypal:
              $ref: '#/components/schemas/Paypal'
        - type: object
          required:
            - venmo
          properties:
            venmo:
              $ref: '#/components/schemas/Venmo'
    AddressDetails:
      type: object
      description: Address details
      properties:
        city:
          type: string
          description: The address city
          example: New York
          nullable: true
          maxLength: 50
        country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        line1:
          type: string
          description: The first line of the address
          example: 123, King Street
          nullable: true
          maxLength: 200
        line2:
          type: string
          description: The second line of the address
          example: Powelson Avenue
          nullable: true
          maxLength: 50
        line3:
          type: string
          description: The third line of the address
          example: Bridgewater
          nullable: true
          maxLength: 50
        zip:
          type: string
          description: The zip/postal code for the address
          example: '08807'
          nullable: true
          maxLength: 50
        state:
          type: string
          description: The address state
          example: New York
          nullable: true
        first_name:
          type: string
          description: The first name for the address
          example: John
          nullable: true
          maxLength: 255
        last_name:
          type: string
          description: The last name for the address
          example: Doe
          nullable: true
          maxLength: 255
      additionalProperties: false
    PhoneDetails:
      type: object
      properties:
        number:
          type: string
          description: The contact number
          example: '9123456789'
          nullable: true
        country_code:
          type: string
          description: The country code attached to the number
          example: '+1'
          nullable: true
    GenericLinkUiConfig:
      type: object
      description: Object for GenericLinkUiConfig
      properties:
        logo:
          type: string
          description: Merchant's display logo
          example: https://pesaswap.io/favicon.ico
          nullable: true
          maxLength: 255
        merchant_name:
          type: string
          description: Custom merchant name for the link
          example: Pesaswap
          nullable: true
          maxLength: 255
        theme:
          type: string
          description: Primary color to be used in the form represented in hex format
          example: '#4285F4'
          nullable: true
          maxLength: 255
    EnabledPaymentMethod:
      type: object
      description: Object for EnabledPaymentMethod
      required:
        - payment_method
        - payment_method_types
      properties:
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_types:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethodType'
          description: An array of associated payment method types
          uniqueItems: true
    UIWidgetFormLayout:
      type: string
      enum:
        - tabs
        - journey
    CardAdditionalData:
      type: object
      description: Masked payout method details for card payout method
      required:
        - card_exp_month
        - card_exp_year
        - card_holder_name
      properties:
        card_issuer:
          type: string
          description: Issuer of the card
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_type:
          type: string
          description: Card type, can be either `credit` or `debit`
          nullable: true
        card_issuing_country:
          type: string
          description: Card issuing country
          nullable: true
        bank_code:
          type: string
          description: Code for Card issuing bank
          nullable: true
        last4:
          type: string
          description: Last 4 digits of the card number
          nullable: true
        card_isin:
          type: string
          description: The ISIN of the card
          nullable: true
        card_extended_bin:
          type: string
          description: Extended bin of card, contains the first 8 digits of card number
          nullable: true
        card_exp_month:
          type: string
          description: Card expiry month
          example: '01'
        card_exp_year:
          type: string
          description: Card expiry year
          example: '2026'
        card_holder_name:
          type: string
          description: Card holder name
          example: John Doe
    BankAdditionalData:
      oneOf:
        - $ref: '#/components/schemas/AchBankTransferAdditionalData'
        - $ref: '#/components/schemas/BacsBankTransferAdditionalData'
        - $ref: '#/components/schemas/SepaBankTransferAdditionalData'
        - $ref: '#/components/schemas/PixBankTransferAdditionalData'
      description: Masked payout method details for bank payout method
    WalletAdditionalData:
      oneOf:
        - $ref: '#/components/schemas/PaypalAdditionalData'
        - $ref: '#/components/schemas/VenmoAdditionalData'
      description: Masked payout method details for wallet payout method
    PaymentMethodType:
      type: string
      description: >-
        Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay'
        for wallets.
      enum:
        - ach
        - affirm
        - afterpay_clearpay
        - alfamart
        - ali_pay
        - ali_pay_hk
        - alma
        - amazon_pay
        - apple_pay
        - atome
        - bacs
        - bancontact_card
        - becs
        - benefit
        - bizum
        - blik
        - boleto
        - bca_bank_transfer
        - bni_va
        - bri_va
        - card_redirect
        - cimb_va
        - classic
        - credit
        - crypto_currency
        - cashapp
        - dana
        - danamon_va
        - debit
        - duit_now
        - efecty
        - eps
        - fps
        - evoucher
        - giropay
        - givex
        - google_pay
        - go_pay
        - gcash
        - ideal
        - interac
        - indomaret
        - klarna
        - kakao_pay
        - local_bank_redirect
        - mandiri_va
        - knet
        - mb_way
        - mobile_pay
        - momo
        - momo_atm
        - multibanco
        - online_banking_thailand
        - online_banking_czech_republic
        - online_banking_finland
        - online_banking_fpx
        - online_banking_poland
        - online_banking_slovakia
        - oxxo
        - pago_efectivo
        - permata_bank_transfer
        - open_banking_uk
        - pay_bright
        - paypal
        - paze
        - pix
        - pay_safe_card
        - przelewy24
        - prompt_pay
        - pse
        - red_compra
        - red_pagos
        - samsung_pay
        - sepa
        - sofort
        - swish
        - touch_n_go
        - trustly
        - twint
        - upi_collect
        - upi_intent
        - vipps
        - viet_qr
        - venmo
        - walley
        - we_chat_pay
        - seven_eleven
        - lawson
        - mini_stop
        - family_mart
        - seicomart
        - pay_easy
        - local_bank_transfer
        - mifinity
        - open_banking_pis
        - m_pesa_express
        - direct_carrier_billing
    RoutableConnectors:
      type: string
      description: >-
        RoutableConnectors are the subset of Connectors that are eligible for
        payments routing
      enum:
        - choicebank
        - daraja
        - adyenplatform
        - phonypay
        - fauxpay
        - pretendpay
        - stripe_test
        - adyen_test
        - checkout_test
        - paypal_test
        - aci
        - adyen
        - airwallex
        - authorizedotnet
        - bankofamerica
        - billwerk
        - bitpay
        - bambora
        - bamboraapac
        - bluesnap
        - boku
        - braintree
        - cashtocode
        - checkout
        - coinbase
        - cryptopay
        - cybersource
        - datatrans
        - deutschebank
        - digitalvirgo
        - dlocal
        - ebanx
        - elavon
        - fiserv
        - fiservemea
        - fiuu
        - forte
        - globalpay
        - globepay
        - gocardless
        - helcim
        - iatapay
        - inespay
        - itaubank
        - jpmorgan
        - klarna
        - mifinity
        - mollie
        - multisafepay
        - nexinets
        - nexixpay
        - nmi
        - noon
        - novalnet
        - nuvei
        - opennode
        - paybox
        - payme
        - payone
        - paypal
        - payu
        - placetopay
        - powertranz
        - prophetpay
        - rapyd
        - razorpay
        - riskified
        - shift4
        - signifyd
        - square
        - stax
        - stripe
        - trustpay
        - tsys
        - volt
        - wellsfargo
        - wise
        - worldline
        - worldpay
        - xendit
        - zen
        - plaid
        - zsl
    ConnectorSelection:
      oneOf:
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - priority
            data:
              type: array
              items:
                $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - volume_split
            data:
              type: array
              items:
                $ref: '#/components/schemas/ConnectorVolumeSplit'
      discriminator:
        propertyName: type
    RuleConnectorSelection:
      type: object
      description: |-
        Represents a rule

        ```text
        rule_name: [stripe, adyen, checkout]
        {
        payment.method = card {
        payment.method.cardtype = (credit, debit) {
        payment.method.network = (amex, rupay, diners)
        }

        payment.method.cardtype = credit
        }
        }
        ```
      required:
        - name
        - connectorSelection
        - statements
      properties:
        name:
          type: string
        connectorSelection:
          $ref: '#/components/schemas/ConnectorSelection'
        statements:
          type: array
          items:
            $ref: '#/components/schemas/IfStatement'
    AchBankTransfer:
      type: object
      required:
        - bank_account_number
        - bank_routing_number
      properties:
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
        bank_account_number:
          type: string
          description: >-
            Bank account number is an unique identifier assigned by a bank to a
            customer.
          example: '000123456'
        bank_routing_number:
          type: string
          description: >-
            [9 digits] Routing number - used in USA for identifying a specific
            bank.
          example: '110000000'
    BacsBankTransfer:
      type: object
      required:
        - bank_account_number
        - bank_sort_code
      properties:
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
        bank_account_number:
          type: string
          description: >-
            Bank account number is an unique identifier assigned by a bank to a
            customer.
          example: '000123456'
        bank_sort_code:
          type: string
          description: >-
            [6 digits] Sort Code - used in UK and Ireland for identifying a bank
            and it's branches.
          example: 98-76-54
    SepaBankTransfer:
      type: object
      required:
        - iban
        - bic
      properties:
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
        iban:
          type: string
          description: >-
            International Bank Account Number (iban) - used in many countries
            for identifying a bank along with it's customer.
          example: DE89370400440532013000
        bic:
          type: string
          description: >-
            [8 / 11 digits] Bank Identifier Code (bic) / Swift Code - used in
            many countries for identifying a bank and it's branches
          example: HSBCGB2LXXX
    PixBankTransfer:
      type: object
      required:
        - bank_account_number
        - pix_key
      properties:
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_branch:
          type: string
          description: Bank branch
          example: '3707'
          nullable: true
        bank_account_number:
          type: string
          description: >-
            Bank account number is an unique identifier assigned by a bank to a
            customer.
          example: '000123456'
        pix_key:
          type: string
          description: Unique key for pix customer
          example: '000123456'
        tax_id:
          type: string
          description: Individual taxpayer identification number
          example: '000123456'
          nullable: true
    Paypal:
      type: object
      required:
        - email
        - telephone_number
        - paypal_id
      properties:
        email:
          type: string
          description: Email linked with paypal account
          example: john.doe@example.com
        telephone_number:
          type: string
          description: mobile number linked to paypal account
          example: '16608213349'
        paypal_id:
          type: string
          description: id of the paypal account
          example: G83KXTJ5EHCQ2
    Venmo:
      type: object
      required:
        - telephone_number
      properties:
        telephone_number:
          type: string
          description: mobile number linked to venmo account
          example: '16608213349'
    PaymentMethod:
      type: string
      description: 'Indicates the type of payment method. Eg: ''card'', ''wallet'', etc.'
      enum:
        - card
        - card_redirect
        - pay_later
        - wallet
        - bank_redirect
        - bank_transfer
        - crypto
        - bank_debit
        - reward
        - real_time_payment
        - upi
        - voucher
        - gift_card
        - open_banking
        - mobile_payment
    CardNetwork:
      type: string
      description: Indicates the card network.
      enum:
        - Visa
        - Mastercard
        - AmericanExpress
        - JCB
        - DinersClub
        - Discover
        - CartesBancaires
        - UnionPay
        - Interac
        - RuPay
        - Maestro
    AchBankTransferAdditionalData:
      type: object
      description: Masked payout method details for ach bank transfer payout method
      required:
        - bank_account_number
        - bank_routing_number
      properties:
        bank_account_number:
          type: string
          description: Partially masked account number for ach bank debit payment
          example: 0001****3456
        bank_routing_number:
          type: string
          description: Partially masked routing number for ach bank debit payment
          example: 110***000
        bank_name:
          allOf:
            - $ref: '#/components/schemas/BankNames'
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
    BacsBankTransferAdditionalData:
      type: object
      description: Masked payout method details for bacs bank transfer payout method
      required:
        - bank_sort_code
        - bank_account_number
      properties:
        bank_sort_code:
          type: string
          description: Partially masked sort code for Bacs payment method
          example: '108800'
        bank_account_number:
          type: string
          description: Bank account's owner name
          example: 0001****3456
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
    SepaBankTransferAdditionalData:
      type: object
      description: Masked payout method details for sepa bank transfer payout method
      required:
        - iban
      properties:
        iban:
          type: string
          description: Partially masked international bank account number (iban) for SEPA
          example: DE8937******013000
        bank_name:
          type: string
          description: Bank name
          example: Deutsche Bank
          nullable: true
        bank_country_code:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        bank_city:
          type: string
          description: Bank city
          example: California
          nullable: true
        bic:
          type: string
          description: >-
            [8 / 11 digits] Bank Identifier Code (bic) / Swift Code - used in
            many countries for identifying a bank and it's branches
          example: HSBCGB2LXXX
          nullable: true
    PixBankTransferAdditionalData:
      type: object
      properties:
        pix_key:
          type: string
          description: Partially masked unique key for pix transfer
          example: a1f4102e ****** 6fa48899c1d1
          nullable: true
        cpf:
          type: string
          description: Partially masked CPF - CPF is a Brazilian tax identification number
          example: '**** 124689'
          nullable: true
        cnpj:
          type: string
          description: >-
            Partially masked CNPJ - CNPJ is a Brazilian company tax
            identification number
          example: '**** 417312'
          nullable: true
    PaypalAdditionalData:
      type: object
      description: Masked payout method details for paypal wallet payout method
      properties:
        email:
          type: string
          description: Email linked with paypal account
          example: john.doe@example.com
          nullable: true
        telephone_number:
          type: string
          description: mobile number linked to paypal account
          example: '******* 3349'
          nullable: true
        paypal_id:
          type: string
          description: id of the paypal account
          example: G83K ***** HCQ2
          nullable: true
    VenmoAdditionalData:
      type: object
      description: Masked payout method details for venmo wallet payout method
      properties:
        telephone_number:
          type: string
          description: mobile number linked to venmo account
          example: '******* 3349'
          nullable: true
    IfStatement:
      type: object
      description: >-
        Represents an IF statement with conditions and optional nested IF
        statements


        ```text

        payment.method = card {

        payment.method.cardtype = (credit, debit) {

        payment.method.network = (amex, rupay, diners)

        }

        }

        ```
      required:
        - condition
      properties:
        condition:
          type: array
          items:
            $ref: '#/components/schemas/Comparison'
        nested:
          type: array
          items:
            $ref: '#/components/schemas/IfStatement'
          nullable: true
    BankNames:
      type: string
      description: Name of banks supported by Pesaswap
      enum:
        - american_express
        - affin_bank
        - agro_bank
        - alliance_bank
        - am_bank
        - bank_of_america
        - bank_of_china
        - bank_islam
        - bank_muamalat
        - bank_rakyat
        - bank_simpanan_nasional
        - barclays
        - blik_p_s_p
        - capital_one
        - chase
        - citi
        - cimb_bank
        - discover
        - navy_federal_credit_union
        - pentagon_federal_credit_union
        - synchrony_bank
        - wells_fargo
        - abn_amro
        - asn_bank
        - bunq
        - handelsbanken
        - hong_leong_bank
        - hsbc_bank
        - ing
        - knab
        - kuwait_finance_house
        - moneyou
        - rabobank
        - regiobank
        - revolut
        - sns_bank
        - triodos_bank
        - van_lanschot
        - arzte_und_apotheker_bank
        - austrian_anadi_bank_ag
        - bank_austria
        - bank99_ag
        - bankhaus_carl_spangler
        - bankhaus_schelhammer_und_schattera_ag
        - bank_millennium
        - bank_p_e_k_a_o_s_a
        - bawag_psk_ag
        - bks_bank_ag
        - brull_kallmus_bank_ag
        - btv_vier_lander_bank
        - capital_bank_grawe_gruppe_ag
        - ceska_sporitelna
        - dolomitenbank
        - easybank_ag
        - e_platby_v_u_b
        - erste_bank_und_sparkassen
        - friesland_bank
        - hypo_alpeadriabank_international_ag
        - hypo_noe_lb_fur_niederosterreich_u_wien
        - hypo_oberosterreich_salzburg_steiermark
        - hypo_tirol_bank_ag
        - hypo_vorarlberg_bank_ag
        - hypo_bank_burgenland_aktiengesellschaft
        - komercni_banka
        - m_bank
        - marchfelder_bank
        - maybank
        - oberbank_ag
        - osterreichische_arzte_und_apothekerbank
        - ocbc_bank
        - pay_with_i_n_g
        - place_z_i_p_k_o
        - platnosc_online_karta_platnicza
        - posojilnica_bank_e_gen
        - postova_banka
        - public_bank
        - raiffeisen_bankengruppe_osterreich
        - rhb_bank
        - schelhammer_capital_bank_ag
        - standard_chartered_bank
        - schoellerbank_ag
        - sparda_bank_wien
        - sporo_pay
        - santander_przelew24
        - tatra_pay
        - viamo
        - volksbank_gruppe
        - volkskreditbank_ag
        - vr_bank_braunau
        - uob_bank
        - pay_with_alior_bank
        - banki_spoldzielcze
        - pay_with_inteligo
        - b_n_p_paribas_poland
        - bank_nowy_s_a
        - credit_agricole
        - pay_with_b_o_s
        - pay_with_citi_handlowy
        - pay_with_plus_bank
        - toyota_bank
        - velo_bank
        - e_transfer_pocztowy24
        - plus_bank
        - etransfer_pocztowy24
        - banki_spbdzielcze
        - bank_nowy_bfg_sa
        - getin_bank
        - blik
        - noble_pay
        - idea_bank
        - envelo_bank
        - nest_przelew
        - mbank_mtransfer
        - inteligo
        - pbac_z_ipko
        - bnp_paribas
        - bank_pekao_sa
        - volkswagen_bank
        - alior_bank
        - boz
        - bangkok_bank
        - krungsri_bank
        - krung_thai_bank
        - the_siam_commercial_bank
        - kasikorn_bank
        - open_bank_success
        - open_bank_failure
        - open_bank_cancelled
        - aib
        - bank_of_scotland
        - danske_bank
        - first_direct
        - first_trust
        - halifax
        - lloyds
        - monzo
        - nat_west
        - nationwide_bank
        - royal_bank_of_scotland
        - starling
        - tsb_bank
        - tesco_bank
        - ulster_bank
        - yoursafe
        - n26
        - nationale_nederlanden
    Comparison:
      type: object
      description: Represents a single comparison condition.
      required:
        - lhs
        - comparison
        - value
        - metadata
      properties:
        lhs:
          type: string
          description: >-
            The left hand side which will always be a domain input identifier
            like "payment.method.cardtype"
        comparison:
          $ref: '#/components/schemas/ComparisonType'
        value:
          $ref: '#/components/schemas/ValueType'
        metadata:
          type: object
          description: >-
            Additional metadata that the Static Analyzer and Backend does not
            touch.

            This can be used to store useful information for the frontend and is
            required for communication

            between the static analyzer and the frontend.
          additionalProperties: {}
    ComparisonType:
      type: string
      description: Conditional comparison type
      enum:
        - equal
        - not_equal
        - less_than
        - less_than_equal
        - greater_than
        - greater_than_equal
    ValueType:
      oneOf:
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number
            value:
              $ref: '#/components/schemas/MinorUnit'
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - enum_variant
            value:
              type: string
              description: Represents an enum variant
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - metadata_variant
            value:
              $ref: '#/components/schemas/MetadataValue'
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - str_value
            value:
              type: string
              description: Represents a arbitrary String value
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number_array
            value:
              type: array
              items:
                $ref: '#/components/schemas/MinorUnit'
              description: |-
                Represents an array of numbers. This is basically used for
                "one of the given numbers" operations
                eg: payment.method.amount = (1, 2, 3)
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - enum_variant_array
            value:
              type: array
              items:
                type: string
              description: |-
                Similar to NumberArray but for enum variants
                eg: payment.method.cardtype = (debit, credit)
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number_comparison_array
            value:
              type: array
              items:
                $ref: '#/components/schemas/NumberComparison'
              description: |-
                Like a number array but can include comparisons. Useful for
                conditions like "500 < amount < 1000"
                eg: payment.amount = (> 500, < 1000)
      description: Represents a value in the DSL
      discriminator:
        propertyName: type
    MinorUnit:
      type: integer
      format: int64
      description: This Unit struct represents MinorUnit in which core amount works
    MetadataValue:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: string
    NumberComparison:
      type: object
      description: Represents a number comparison for "NumberComparisonArrayValue"
      required:
        - comparisonType
        - number
      properties:
        comparisonType:
          $ref: '#/components/schemas/ComparisonType'
        number:
          $ref: '#/components/schemas/MinorUnit'
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Use the API key created under your merchant account from the Pesaswap
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.

````