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

# Payment Method - Create

> Creates and stores a payment method against a customer. In case of cards, this API should be used only by PCI compliant merchants.



## OpenAPI

````yaml post /v1/payment-methods
openapi: 3.0.3
info:
  title: Hyperswitch - API Documentation
  description: >

    ## Get started


    Hyperswitch 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 Hyperswitch API.


    ### Environment


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


    | Environment   |  Base URL                          |

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

    | Sandbox       | <https://sandbox.hyperswitch.io>   |

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


    ## Authentication


    When you sign up on our [dashboard](https://app.hyperswitch.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 Hyperswitch 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: Hyperswitch Support
    url: https://hyperswitch.io
    email: support.global@juspay.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://sandbox.hyperswitch.io
    description: Sandbox 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:
  /v1/payment-methods:
    post:
      tags:
        - Payment Methods
      summary: Payment Method - Create
      description: >-
        Creates and stores a payment method against a customer. In case of
        cards, this API should be used only by PCI compliant merchants.
      operationId: Create Payment Method
      parameters:
        - name: X-Profile-Id
          in: header
          description: Profile ID associated to the payment method
          required: true
          schema:
            type: string
          example: pro_abcdefghijklmnop
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodCreate'
        required: true
      responses:
        '200':
          description: Payment Method Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodResponse'
        '400':
          description: Invalid Data
      security:
        - api_key: []
components:
  schemas:
    PaymentMethodCreate:
      type: object
      required:
        - payment_method_type
        - customer_id
        - payment_method_data
        - storage_type
      properties:
        payment_method_type:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_subtype:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodType'
          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
        customer_id:
          type: string
          description: The unique identifier of the customer.
          example: 12345_cus_01926c58bc6e77c09e809964e72af8c8
          maxLength: 64
          minLength: 32
        payment_method_data:
          $ref: '#/components/schemas/PaymentMethodCreateData'
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        psp_tokenization:
          allOf:
            - $ref: '#/components/schemas/PspTokenization'
          nullable: true
        network_tokenization:
          allOf:
            - $ref: '#/components/schemas/NetworkTokenization'
          nullable: true
        storage_type:
          $ref: '#/components/schemas/StorageType'
      additionalProperties: false
    PaymentMethodResponse:
      type: object
      required:
        - id
        - merchant_id
        - customer_id
        - payment_method_type
        - storage_type
        - network_transaction_id
        - raw_payment_method_data
      properties:
        id:
          type: string
          description: The unique identifier of the Payment method
          example: 12345_pm_01926c58bc6e77c09e809964e72af8c8
        merchant_id:
          type: string
          description: Unique identifier for a merchant
          example: merchant_1671528864
        customer_id:
          type: string
          description: The unique identifier of the customer.
          example: 12345_cus_01926c58bc6e77c09e809964e72af8c8
          maxLength: 64
          minLength: 32
        payment_method_type:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_subtype:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodType'
          nullable: true
        recurring_enabled:
          type: boolean
          description: >-
            Indicates whether the payment method supports recurring payments.
            Optional.
          example: true
          nullable: true
        created:
          type: string
          format: date-time
          description: >-
            A timestamp (ISO 8601 code) that determines when the payment method
            was created
          example: '2023-01-18T11:04:09.922Z'
          nullable: true
        last_used_at:
          type: string
          format: date-time
          description: >-
            A timestamp (ISO 8601 code) that determines when the payment method
            was last used
          example: '2024-02-24T11:04:09.922Z'
          nullable: true
        payment_method_data:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodResponseData'
          nullable: true
        connector_tokens:
          type: array
          items:
            $ref: '#/components/schemas/ConnectorTokenDetails'
          description: The connector token details if available
          nullable: true
        network_token:
          allOf:
            - $ref: '#/components/schemas/NetworkTokenResponse'
          nullable: true
        storage_type:
          $ref: '#/components/schemas/StorageType'
        card_cvc_token_storage:
          allOf:
            - $ref: '#/components/schemas/CardCVCTokenStorageDetails'
          nullable: true
        network_transaction_id:
          type: string
          description: >-
            The network transaction ID provided by the card network during a
            Customer Initiated Transaction (CIT)

            when `setup_future_usage` is set to `off_session`.
        raw_payment_method_data:
          $ref: '#/components/schemas/RawPaymentMethodData'
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        acknowledgement_status:
          allOf:
            - $ref: '#/components/schemas/AcknowledgementStatus'
          nullable: true
    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
        - network_token
    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
        - paysera
        - apple_pay
        - atome
        - bacs
        - bancontact_card
        - becs
        - benefit
        - bizum
        - blik
        - bluecode
        - boleto
        - bca_bank_transfer
        - bni_va
        - breadpay
        - bri_va
        - bhn_card_network
        - card_redirect
        - cimb_va
        - classic
        - credit
        - crypto_currency
        - cashapp
        - dana
        - danamon_va
        - debit
        - duit_now
        - efecty
        - eft
        - eft_debit_order
        - eps
        - flexiti
        - 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
        - payjustnow
        - paypal
        - paze
        - pix
        - pix_key
        - pix_emv
        - pix_automatico_qr
        - pix_automatico_push
        - pay_safe_card
        - przelewy24
        - prompt_pay
        - pse
        - qris
        - red_compra
        - red_pagos
        - samsung_pay
        - sepa
        - sepa_bank_transfer
        - sepa_guarenteed_debit
        - skrill
        - sofort
        - swish
        - touch_n_go
        - trustly
        - twint
        - upi_collect
        - upi_intent
        - upi_qr
        - 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
        - direct_carrier_billing
        - instant_bank_transfer
        - instant_bank_transfer_finland
        - instant_bank_transfer_poland
        - revolut_pay
        - indonesian_bank_transfer
        - open_banking
        - network_token
    PaymentMethodCreateData:
      oneOf:
        - type: object
          required:
            - card
          properties:
            card:
              $ref: '#/components/schemas/CardDetail'
        - type: object
          required:
            - proxy_card
          properties:
            proxy_card:
              $ref: '#/components/schemas/ProxyCardDetails'
        - type: object
          required:
            - bank_debit
          properties:
            bank_debit:
              $ref: '#/components/schemas/BankDebitDetail'
        - type: object
          required:
            - wallet
          properties:
            wallet:
              $ref: '#/components/schemas/WalletPaymentMethodData'
        - type: object
          required:
            - bank_redirect
          properties:
            bank_redirect:
              $ref: '#/components/schemas/BankRedirectDetail'
    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
    PspTokenization:
      type: object
      description: >-
        The Payment Service Provider Configuration for payment methods that are
        created using the payment method session
      required:
        - tokenization_type
        - connector_id
      properties:
        tokenization_type:
          $ref: '#/components/schemas/TokenizationType'
        connector_id:
          type: string
          description: The merchant connector id to be used for tokenization
          example: mca_28a7367sad8239s67
    NetworkTokenization:
      type: object
      description: >-
        The network tokenization configuration for creating the payment method
        session
      required:
        - enable
      properties:
        enable:
          $ref: '#/components/schemas/NetworkTokenizationToggle'
    StorageType:
      type: string
      enum:
        - volatile
        - persistent
    PaymentMethodResponseData:
      oneOf:
        - type: object
          required:
            - card
          properties:
            card:
              $ref: '#/components/schemas/CardDetailFromLocker'
        - type: object
          required:
            - bank_debit
          properties:
            bank_debit:
              $ref: '#/components/schemas/BankDebitDetailsPaymentMethod'
        - type: object
          required:
            - wallet
          properties:
            wallet:
              $ref: '#/components/schemas/WalletPaymentMethodData'
    ConnectorTokenDetails:
      type: object
      description: >-
        Token information that can be used to initiate transactions by the
        merchant.
      required:
        - token
      properties:
        token:
          type: string
          description: >-
            A token that can be used to make payments directly with the
            connector.
          example: pm_9UhMqBMEOooRIvJFFdeW
        connector_token_request_reference_id:
          type: string
          description: The reference id sent to the connector when creating the token
          nullable: true
    NetworkTokenResponse:
      type: object
      required:
        - payment_method_data
      properties:
        payment_method_data:
          $ref: '#/components/schemas/NetworkTokenDetailsPaymentMethod'
    CardCVCTokenStorageDetails:
      type: object
      required:
        - is_stored
      properties:
        is_stored:
          type: boolean
          description: Indicates whether the card cvc is stored or not
          example: true
        expires_at:
          type: string
          format: date-time
          description: >-
            A timestamp (ISO 8601 code) that determines expiry for stored card
            cvc token
          example: '2024-02-24T11:04:09.922Z'
          nullable: true
    RawPaymentMethodData:
      oneOf:
        - type: object
          required:
            - card
          properties:
            card:
              $ref: '#/components/schemas/CardDetail'
        - type: object
          required:
            - card_with_n_t
          properties:
            card_with_n_t:
              $ref: '#/components/schemas/RawCardWithNTDetails'
        - type: object
          required:
            - bank_debit
          properties:
            bank_debit:
              $ref: '#/components/schemas/BankDebitDetail'
    AcknowledgementStatus:
      type: string
      enum:
        - authenticated
        - failed
    CardDetail:
      type: object
      required:
        - card_number
        - card_exp_month
        - card_exp_year
        - card_holder_name
        - card_issuing_country
        - card_cvc
      properties:
        card_number:
          type: string
          description: Card Number
          example: '4111111145551142'
        card_exp_month:
          type: string
          description: Card Expiry Month
          example: '10'
        card_exp_year:
          type: string
          description: Card Expiry Year
          example: '25'
        card_holder_name:
          type: string
          description: Card Holder Name
          example: John Doe
        nick_name:
          type: string
          description: Card Holder's Nick Name
          example: John Doe
          nullable: true
        card_issuing_country:
          $ref: '#/components/schemas/CountryAlpha2'
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_issuer:
          type: string
          description: Issuer Bank for Card
          nullable: true
        card_type:
          allOf:
            - $ref: '#/components/schemas/CardType'
          nullable: true
        card_cvc:
          type: string
          description: |-
            The CVC number for the card
            This is optional in case the card needs to be vaulted
          example: '242'
      additionalProperties: false
    ProxyCardDetails:
      type: object
      required:
        - card_number
        - card_exp_month
        - card_exp_year
        - card_holder_name
        - card_cvc
      properties:
        card_number:
          type: string
          description: Tokenized Card Number
          example: tok_sjfowhoejsldj
        card_exp_month:
          type: string
          description: Card Expiry Month
          example: '10'
        card_exp_year:
          type: string
          description: Card Expiry Year
          example: '25'
        bin_number:
          type: string
          description: First Six Digit of Card Number
          nullable: true
        last_four:
          type: string
          description: Last Four Digit of Card Number
          nullable: true
        card_issuer:
          type: string
          description: Issuer Bank for Card
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_type:
          type: string
          description: Card Type
          nullable: true
        card_issuing_country:
          type: string
          description: Issuing Country of the Card
          nullable: true
        nick_name:
          type: string
          description: Card Holder's Nick Name
          example: John Doe
          nullable: true
        card_holder_name:
          type: string
          description: Card Holder Name
          example: John Doe
        card_cvc:
          type: string
          description: |-
            The CVC number for the card
            This is optional in case the card needs to be vaulted
          example: '242'
    BankDebitDetail:
      oneOf:
        - type: object
          required:
            - ach
          properties:
            ach:
              type: object
              required:
                - account_number
                - routing_number
              properties:
                account_number:
                  type: string
                routing_number:
                  type: string
                bank_account_holder_name:
                  type: string
                  nullable: true
                bank_type:
                  allOf:
                    - $ref: '#/components/schemas/BankType'
                  nullable: true
                bank_holder_type:
                  allOf:
                    - $ref: '#/components/schemas/BankHolderType'
                  nullable: true
                bank_name:
                  allOf:
                    - $ref: '#/components/schemas/BankNames'
                  nullable: true
    WalletPaymentMethodData:
      oneOf:
        - type: object
          required:
            - apple_pay
          properties:
            apple_pay:
              $ref: '#/components/schemas/PaymentMethodDataWalletInfo'
        - type: object
          required:
            - google_pay
          properties:
            google_pay:
              $ref: '#/components/schemas/PaymentMethodDataWalletInfo'
        - type: object
          required:
            - pay_pal
          properties:
            pay_pal:
              $ref: '#/components/schemas/PaypalRedirection'
    BankRedirectDetail:
      oneOf:
        - type: object
          required:
            - bancontact_card
          properties:
            bancontact_card:
              type: object
    AddressDetails:
      type: object
      description: Address details
      properties:
        city:
          type: string
          description: The city, district, suburb, town, or village of the address.
          example: New York
          nullable: true
          maxLength: 50
        country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        line1:
          type: string
          description: The first line of the street address or P.O. Box.
          example: 123, King Street
          nullable: true
          maxLength: 200
        line2:
          type: string
          description: >-
            The second line of the street address or P.O. Box (e.g., apartment,
            suite, unit, or building).
          example: Powelson Avenue
          nullable: true
          maxLength: 50
        line3:
          type: string
          description: The third line of the street address, if applicable.
          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
        origin_zip:
          type: string
          description: The zip/postal code of the origin
          example: '08807'
          nullable: true
          maxLength: 50
    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
    TokenizationType:
      type: string
      description: The type of tokenization to use for the payment method
      enum:
        - single_use
        - multi_use
    NetworkTokenizationToggle:
      type: string
      description: >-
        The network tokenization toggle, whether to enable or skip the network
        tokenization
      enum:
        - Enable
        - Skip
    CardDetailFromLocker:
      type: object
      required:
        - saved_to_locker
      properties:
        issuer_country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        last4_digits:
          type: string
          example: '4242'
          nullable: true
        expiry_month:
          type: string
          example: '10'
          nullable: true
        expiry_year:
          type: string
          example: '25'
          nullable: true
        card_holder_name:
          type: string
          example: John Doe
          nullable: true
        card_fingerprint:
          type: string
          example: fingerprint_12345
          nullable: true
        nick_name:
          type: string
          example: Card
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_isin:
          type: string
          example: '4567890'
          nullable: true
        card_issuer:
          type: string
          example: Issuer Bank
          nullable: true
        card_type:
          type: string
          example: Credit
          nullable: true
        saved_to_locker:
          type: boolean
          example: true
    BankDebitDetailsPaymentMethod:
      oneOf:
        - type: object
          required:
            - ach_bank_debit
          properties:
            ach_bank_debit:
              type: object
              required:
                - account_number_last4_digits
                - routing_number_last4_digits
                - bank_name
                - bank_type
                - bank_holder_type
              properties:
                account_number_last4_digits:
                  type: string
                routing_number_last4_digits:
                  type: string
                bank_account_holder_name:
                  type: string
                  nullable: true
                bank_name:
                  type: string
                  example: ach
                bank_type:
                  type: string
                  example: checking
                bank_holder_type:
                  type: string
                  example: personal
    NetworkTokenDetailsPaymentMethod:
      type: object
      properties:
        last4_digits:
          type: string
          example: '4242'
          nullable: true
        issuer_country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        network_token_expiry_month:
          type: string
          example: '05'
          nullable: true
        network_token_expiry_year:
          type: string
          example: '27'
          nullable: true
        nick_name:
          type: string
          example: Card
          nullable: true
        card_holder_name:
          type: string
          example: John Doe
          nullable: true
        card_isin:
          type: string
          example: '16712672'
          nullable: true
        card_issuer:
          type: string
          example: Bank of America
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_type:
          type: string
          example: Credit
          nullable: true
        saved_to_locker:
          type: boolean
        par:
          type: string
          example: 522134KAVJ1JPZ8L77N0Z2LRYZS7J
          nullable: true
    RawCardWithNTDetails:
      type: object
      required:
        - card_details
        - network_token_details
      properties:
        card_details:
          $ref: '#/components/schemas/CardDetail'
        network_token_details:
          $ref: '#/components/schemas/CardDetail'
    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
    CardNetwork:
      type: string
      description: Indicates the card network.
      enum:
        - Visa
        - Mastercard
        - AmericanExpress
        - JCB
        - DinersClub
        - Discover
        - CartesBancaires
        - UnionPay
        - Interac
        - RuPay
        - Maestro
        - Star
        - Pulse
        - Accel
        - Nyce
    CardType:
      type: string
      enum:
        - credit
        - debit
    BankType:
      type: string
      enum:
        - checking
        - savings
    BankHolderType:
      type: string
      enum:
        - personal
        - business
    BankNames:
      type: string
      description: Name of banks supported by Hyperswitch
      enum:
        - absa
        - 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
    PaymentMethodDataWalletInfo:
      type: object
      properties:
        last4:
          type: string
          description: Last 4 digits of the card number
          nullable: true
        card_network:
          type: string
          description: The information of the payment method
          nullable: true
        type:
          type: string
          description: The type of payment method
          nullable: true
        card_exp_month:
          type: string
          description: The card's expiry month
          example: '10'
          nullable: true
        card_exp_year:
          type: string
          description: The card's expiry year
          example: '25'
          nullable: true
        auth_code:
          type: string
          description: Unique authorisation code for the payment
          example: '003225'
          nullable: true
        email:
          type: string
          description: Email address associated with the wallet (e.g. PayPal email)
          example: johntest@test.com
          nullable: true
    PaypalRedirection:
      type: object
      properties:
        email:
          type: string
          description: paypal's email address
          example: johntest@test.com
          nullable: true
          maxLength: 255
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Format: `api-key=<api_key>`


        Use the API key created under your merchant account from the HyperSwitch
        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.

````