> ## 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 Session - Create

> Create a payment method session for a customer
This is used to list the saved payment methods for the customer
The customer can also add a new payment method using this session



## OpenAPI

````yaml post /v1/payment-method-sessions
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-method-sessions:
    post:
      tags:
        - Payment Method Session
      summary: Payment Method Session - Create
      description: |-
        Create a payment method session for a customer
        This is used to list the saved payment methods for the customer
        The customer can also add a new payment method using this session
      operationId: Create a payment method session
      parameters:
        - name: X-Profile-Id
          in: header
          description: Profile ID associated to the payment method session
          required: true
          schema:
            type: string
          example: pro_abcdefghijklmnop
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodSessionRequest'
            examples:
              Create a payment method session with customer_id:
                value:
                  customer_id: 12345_cus_abcdefghijklmnopqrstuvwxyz
        required: true
      responses:
        '200':
          description: Create the payment method session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodSessionResponse'
        '400':
          description: The request is invalid
      security:
        - api_key: []
components:
  schemas:
    PaymentMethodSessionRequest:
      type: object
      required:
        - storage_type
      properties:
        customer_id:
          type: string
          description: >-
            The customer id for which the payment methods session is to be
            created
          example: cus_y3oqhf46pyzuxjbcn2giaqnb44
          nullable: true
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        return_url:
          type: string
          description: >-
            The return url to which the customer should be redirected to after
            adding the payment method
          nullable: true
        psp_tokenization:
          allOf:
            - $ref: '#/components/schemas/PspTokenization'
          nullable: true
        network_tokenization:
          allOf:
            - $ref: '#/components/schemas/NetworkTokenization'
          nullable: true
        expires_in:
          type: integer
          format: int32
          description: |-
            The time (seconds ) when the session will expire
            If not provided, the session will expire in 15 minutes
          default: 900
          example: 900
          nullable: true
          minimum: 0
        tokenization_data:
          description: >-
            Contains data to be passed on to tokenization service ( if present )
            to create token_id for given JSON data
          nullable: true
        storage_type:
          $ref: '#/components/schemas/StorageType'
        keep_alive:
          type: boolean
          description: Whether the card with new status should be listed in the session
          nullable: true
    PaymentMethodSessionResponse:
      type: object
      required:
        - id
        - expires_at
        - client_secret
        - storage_type
        - keep_alive
      properties:
        id:
          type: string
          example: 12345_pms_01926c58bc6e77c09e809964e72af8c8
        customer_id:
          type: string
          description: >-
            The customer id for which the payment methods session is to be
            created
          example: 12345_cus_01926c58bc6e77c09e809964e72af8c8
          nullable: true
        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
        tokenization_data:
          description: >-
            Contains data to be passed on to tokenization service ( if present )
            to create token_id for given JSON data
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: >-
            The iso timestamp when the session will expire

            Trying to retrieve the session or any operations on the session
            after this time will result in an error
          example: '2023-01-18T11:04:09.922Z'
        client_secret:
          type: string
          description: Client Secret
          example: cs_9wcXDRVkfEtLEsSnYKgQ
        return_url:
          type: string
          description: The return url to which the user should be redirected to
          example: https://merchant-website.com/return
          nullable: true
        next_action:
          allOf:
            - $ref: '#/components/schemas/NextActionData'
          nullable: true
        authentication_details:
          allOf:
            - $ref: '#/components/schemas/AuthenticationDetails'
          nullable: true
        associated_payment_methods:
          type: array
          items:
            $ref: '#/components/schemas/AssociatedPaymentMethods'
          description: >-
            The payment method that was created using this payment method
            session
          nullable: true
        associated_token_id:
          type: string
          description: The token-id created if there is tokenization_data present
          example: 12345_tok_01926c58bc6e77c09e809964e72af8c8
          nullable: true
        storage_type:
          $ref: '#/components/schemas/StorageType'
        card_cvc_token_storage:
          allOf:
            - $ref: '#/components/schemas/CardCVCTokenStorageDetails'
          nullable: true
        payment_method_data:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodResponseData'
          nullable: true
        sdk_authorization:
          type: string
          description: |-
            SDK authorization token for client SDK usage
            Contains encoded authentication details for subsequent API calls
          example: cHJvZmlsZV9pZD0uLi4=
          nullable: true
        keep_alive:
          type: boolean
          description: Whether the card with new status should be listed in the session
        network_tokenization_data:
          allOf:
            - $ref: '#/components/schemas/NetworkTokenResponse'
          nullable: true
    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
    NextActionData:
      oneOf:
        - type: object
          description: Contains the url for redirection flow
          required:
            - redirect_to_url
            - type
          properties:
            redirect_to_url:
              type: string
              example: https://example.com/redirect
            type:
              type: string
              enum:
                - redirect_to_url
        - type: object
          description: >-
            Informs the next steps for bank transfer and also contains the
            charges details (ex: amount received, amount charged etc)
          required:
            - bank_transfer_steps_and_charges_details
            - type
          properties:
            bank_transfer_steps_and_charges_details:
              $ref: '#/components/schemas/BankTransferNextStepsData'
            type:
              type: string
              enum:
                - display_bank_transfer_information
        - type: object
          description: Contains third party sdk session token response
          required:
            - type
          properties:
            session_token:
              allOf:
                - $ref: '#/components/schemas/SessionToken'
              nullable: true
            type:
              type: string
              enum:
                - third_party_sdk_session_token
        - type: object
          description: Contains url for Qr code image, this qr code has to be shown in sdk
          required:
            - image_data_url
            - qr_code_url
            - type
          properties:
            image_data_url:
              type: string
              description: Hyperswitch generated image data source url
            display_to_timestamp:
              type: integer
              format: int64
              nullable: true
            qr_code_url:
              type: string
              description: The url for Qr code given by the connector
            display_text:
              type: string
              nullable: true
            border_color:
              type: string
              nullable: true
            raw_qr_data:
              type: string
              description: >-
                The raw QR code data (EMV copy and paste) used for Brazilian
                payment methods like Pix
              nullable: true
            type:
              type: string
              enum:
                - qr_code_information
        - type: object
          description: Contains url to fetch Qr code data
          required:
            - qr_code_fetch_url
            - type
          properties:
            qr_code_fetch_url:
              type: string
            type:
              type: string
              enum:
                - fetch_qr_code_information
        - type: object
          required:
            - sdk_uri
            - display_from_timestamp
            - type
          properties:
            sdk_uri:
              type: string
            display_from_timestamp:
              type: integer
            display_to_timestamp:
              type: integer
              nullable: true
            poll_config:
              allOf:
                - $ref: '#/components/schemas/PollConfig'
              nullable: true
            type:
              type: string
              enum:
                - invoke_upi_intent_sdk
        - type: object
          required:
            - qr_code_url
            - display_from_timestamp
            - type
          properties:
            qr_code_url:
              type: string
            display_from_timestamp:
              type: integer
            display_to_timestamp:
              type: integer
              nullable: true
            poll_config:
              allOf:
                - $ref: '#/components/schemas/PollConfig'
              nullable: true
            type:
              type: string
              enum:
                - invoke_upi_qr_flow
        - type: object
          description: Contains the download url and the reference number for transaction
          required:
            - voucher_details
            - type
          properties:
            voucher_details:
              type: string
            type:
              type: string
              enum:
                - display_voucher_information
        - type: object
          description: >-
            Contains duration for displaying a wait screen, wait screen with
            timer is displayed by sdk
          required:
            - display_from_timestamp
            - type
          properties:
            display_from_timestamp:
              type: integer
            display_to_timestamp:
              type: integer
              nullable: true
            poll_config:
              allOf:
                - $ref: '#/components/schemas/PollConfig'
              nullable: true
            type:
              type: string
              enum:
                - wait_screen_information
        - type: object
          description: >-
            Contains the information regarding three_ds_method_data submission,
            three_ds authentication, and authorization flows
          required:
            - three_ds_data
            - type
          properties:
            three_ds_data:
              $ref: '#/components/schemas/ThreeDsData'
            type:
              type: string
              enum:
                - three_ds_invoke
        - type: object
          required:
            - next_action_data
            - type
          properties:
            next_action_data:
              $ref: '#/components/schemas/SdkNextActionData'
            type:
              type: string
              enum:
                - invoke_sdk_client
        - type: object
          description: Contains consent to collect otp for mobile payment
          required:
            - consent_data_required
            - type
          properties:
            consent_data_required:
              $ref: '#/components/schemas/MobilePaymentConsent'
            type:
              type: string
              enum:
                - collect_otp
        - type: object
          description: Contains data required to invoke hidden iframe
          required:
            - iframe_data
            - type
          properties:
            iframe_data:
              $ref: '#/components/schemas/IframeData'
            type:
              type: string
              enum:
                - invoke_hidden_iframe
        - type: object
          description: >-
            The data required to trigger the DDC (Device Data Collection) flow
            by rendering the provided URL in a hidden iframe.
          required:
            - ddc_data
            - type
          properties:
            ddc_data:
              $ref: '#/components/schemas/DDCData'
            type:
              type: string
              enum:
                - invoke_ddc
      discriminator:
        propertyName: type
    AuthenticationDetails:
      type: object
      required:
        - status
      properties:
        status:
          $ref: '#/components/schemas/IntentStatus'
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorDetails'
          nullable: true
    AssociatedPaymentMethods:
      type: object
      description: Details of associated payment methods for Payment Methods Session
      required:
        - payment_method_token
      properties:
        payment_method_token:
          $ref: '#/components/schemas/AssociatedPaymentMethodTokenType'
    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
    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'
    NetworkTokenResponse:
      type: object
      required:
        - payment_method_data
      properties:
        payment_method_data:
          $ref: '#/components/schemas/NetworkTokenDetailsPaymentMethod'
    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
    BankTransferNextStepsData:
      allOf:
        - $ref: '#/components/schemas/BankTransferInstructions'
        - type: object
          properties:
            receiver:
              allOf:
                - $ref: '#/components/schemas/ReceiverDetails'
              nullable: true
    SessionToken:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/GpaySessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - google_pay
        - allOf:
            - $ref: '#/components/schemas/SamsungPaySessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - samsung_pay
        - allOf:
            - $ref: '#/components/schemas/KlarnaSessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - klarna
        - allOf:
            - $ref: '#/components/schemas/PaypalSessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - paypal
        - allOf:
            - $ref: '#/components/schemas/ApplepaySessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - apple_pay
        - allOf:
            - $ref: '#/components/schemas/OpenBankingSessionToken'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - open_banking
        - allOf:
            - $ref: '#/components/schemas/PazeSessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - paze
        - allOf:
            - $ref: '#/components/schemas/ClickToPaySessionResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - click_to_pay
        - allOf:
            - $ref: '#/components/schemas/AmazonPaySessionTokenResponse'
            - type: object
              required:
                - wallet_name
              properties:
                wallet_name:
                  type: string
                  enum:
                    - amazon_pay
        - type: object
          required:
            - wallet_name
          properties:
            wallet_name:
              type: string
              enum:
                - no_session_token_received
      discriminator:
        propertyName: wallet_name
    PollConfig:
      type: object
      required:
        - delay_in_secs
        - frequency
      properties:
        delay_in_secs:
          type: integer
          format: int32
          description: Interval of the poll
          minimum: 0
        frequency:
          type: integer
          format: int32
          description: Frequency of the poll
          minimum: 0
    ThreeDsData:
      type: object
      required:
        - three_ds_authentication_url
        - three_ds_authorize_url
        - three_ds_method_details
        - poll_config
      properties:
        three_ds_authentication_url:
          type: string
          description: ThreeDS authentication url - to initiate authentication
        three_ds_authorize_url:
          type: string
          description: >-
            ThreeDS authorize url - to complete the payment authorization after
            authentication
        three_ds_method_details:
          $ref: '#/components/schemas/ThreeDsMethodData'
        poll_config:
          $ref: '#/components/schemas/PollConfigResponse'
        message_version:
          type: string
          description: Message Version
          nullable: true
        directory_server_id:
          type: string
          description: Directory Server ID
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        three_ds_connector:
          type: string
          description: Preferred 3ds Connector
          nullable: true
    SdkNextActionData:
      type: object
      required:
        - next_action
      properties:
        next_action:
          $ref: '#/components/schemas/NextActionCall'
        order_id:
          type: string
          nullable: true
    MobilePaymentConsent:
      type: string
      enum:
        - consent_required
        - consent_not_required
        - consent_optional
    IframeData:
      oneOf:
        - type: object
          required:
            - three_ds_method_url
            - three_ds_method_data_submission
            - directory_server_id
            - method_key
          properties:
            three_ds_method_url:
              type: string
              description: ThreeDS method url
            three_ds_method_data_submission:
              type: boolean
              description: Whether ThreeDS method data submission is required
            three_ds_method_data:
              type: string
              description: ThreeDS method data
              nullable: true
            directory_server_id:
              type: string
              description: ThreeDS Server ID
            message_version:
              type: string
              description: ThreeDS Protocol version
              nullable: true
            method_key:
              type: string
              enum:
                - threeDSMethodData
      discriminator:
        propertyName: method_key
    DDCData:
      type: object
      required:
        - iframe_url
      properties:
        iframe_url:
          type: string
        timeout_ms:
          type: integer
          format: int32
          nullable: true
    IntentStatus:
      type: string
      description: >-
        Represents the overall status of a payment intent.

        The status transitions through various states depending on the payment
        method, confirmation, capture method, and any subsequent actions (like
        customer authentication or manual capture).
      enum:
        - succeeded
        - failed
        - cancelled
        - cancelled_post_capture
        - processing
        - requires_customer_action
        - requires_merchant_action
        - requires_payment_method
        - requires_confirmation
        - requires_capture
        - partially_captured
        - partially_captured_and_capturable
        - partially_authorized_and_requires_capture
        - partially_captured_and_processing
        - conflicted
        - expired
        - review
    ErrorDetails:
      type: object
      description: Error details for the payment
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: The error code
          example: card_declined
        message:
          type: string
          description: The error message
          example: The card was declined.
        reason:
          type: string
          description: The detailed error reason that was returned by the connector.
          example: The card was declined.
          nullable: true
        unified_code:
          type: string
          description: |-
            The unified error code across all connectors.
            This can be relied upon for taking decisions based on the error.
          example: card_declined
          nullable: true
        unified_message:
          type: string
          description: >-
            The unified error message across all connectors.

            If there is a translation available, this will have the translated
            message
          example: The card was declined.
          nullable: true
        network_advice_code:
          type: string
          description: >-
            This field can be returned for both approved and refused Mastercard
            payments.

            This code provides additional information about the type of
            transaction or the reason why the payment failed.

            If the payment failed, the network advice code gives guidance on if
            and when you can retry the payment.
          example: '01'
          nullable: true
        network_decline_code:
          type: string
          description: >-
            For card errors resulting from a card issuer decline, a brand
            specific 2, 3, or 4 digit code which indicates the reason the
            authorization failed.
          example: '05'
          nullable: true
        network_error_message:
          type: string
          description: >-
            A string indicating how to proceed with an network error if payment
            gateway provide one. This is used to understand the network error
            code better.
          example: Do not retry
          nullable: true
    AssociatedPaymentMethodTokenType:
      oneOf:
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - payment_method_session_token
            data:
              type: string
              description: Payment Method Session Token
              example: token_9wcXDRVkfEtLEsSnYKgQ
      description: Token type for Payment Method Session associated payment methods
      discriminator:
        propertyName: type
    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
    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'
    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
    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
    BankTransferInstructions:
      oneOf:
        - type: object
          required:
            - doku_bank_transfer_instructions
          properties:
            doku_bank_transfer_instructions:
              $ref: '#/components/schemas/DokuBankTransferInstructions'
        - type: object
          required:
            - ach_credit_transfer
          properties:
            ach_credit_transfer:
              $ref: '#/components/schemas/AchTransfer'
        - type: object
          required:
            - sepa_bank_instructions
          properties:
            sepa_bank_instructions:
              $ref: '#/components/schemas/SepaBankTransferInstructions'
        - type: object
          required:
            - bacs_bank_instructions
          properties:
            bacs_bank_instructions:
              $ref: '#/components/schemas/BacsBankTransferInstructions'
        - type: object
          required:
            - multibanco
          properties:
            multibanco:
              $ref: '#/components/schemas/MultibancoTransferInstructions'
    ReceiverDetails:
      type: object
      required:
        - amount_received
      properties:
        amount_received:
          type: integer
          format: int64
          description: The amount received by receiver
        amount_charged:
          type: integer
          format: int64
          description: The amount charged by ACH
          nullable: true
        amount_remaining:
          type: integer
          format: int64
          description: The amount remaining to be sent via ACH
          nullable: true
    GpaySessionTokenResponse:
      oneOf:
        - $ref: '#/components/schemas/GooglePayThirdPartySdk'
        - $ref: '#/components/schemas/GooglePaySessionResponse'
    SamsungPaySessionTokenResponse:
      type: object
      required:
        - version
        - service_id
        - order_number
        - merchant
        - amount
        - protocol
        - allowed_brands
        - billing_address_required
        - shipping_address_required
      properties:
        version:
          type: string
          description: Samsung Pay API version
        service_id:
          type: string
          description: Samsung Pay service ID to which session call needs to be made
        order_number:
          type: string
          description: Order number of the transaction
        merchant:
          $ref: '#/components/schemas/SamsungPayMerchantPaymentInformation'
        amount:
          $ref: '#/components/schemas/SamsungPayAmountDetails'
        protocol:
          $ref: '#/components/schemas/SamsungPayProtocolType'
        allowed_brands:
          type: array
          items:
            type: string
          description: List of supported card brands
        billing_address_required:
          type: boolean
          description: Is billing address required to be collected from wallet
        shipping_address_required:
          type: boolean
          description: Is shipping address required to be collected from wallet
    KlarnaSessionTokenResponse:
      type: object
      required:
        - session_token
        - session_id
      properties:
        session_token:
          type: string
          description: The session token for Klarna
        session_id:
          type: string
          description: The identifier for the session
    PaypalSessionTokenResponse:
      type: object
      required:
        - connector
        - session_token
        - sdk_next_action
      properties:
        connector:
          type: string
          description: Name of the connector
        session_token:
          type: string
          description: The session token for PayPal
        sdk_next_action:
          $ref: '#/components/schemas/SdkNextAction'
        client_token:
          type: string
          description: Authorization token used by client to initiate sdk
          nullable: true
        transaction_info:
          allOf:
            - $ref: '#/components/schemas/PaypalTransactionInfo'
          nullable: true
        data_user_id_token:
          type: string
          description: >-
            User token required for returning customer flow, used by client to
            initiate sdk
          nullable: true
    ApplepaySessionTokenResponse:
      type: object
      required:
        - connector
        - delayed_session_token
        - sdk_next_action
      properties:
        session_token_data:
          allOf:
            - $ref: '#/components/schemas/ApplePaySessionResponse'
          nullable: true
        payment_request_data:
          allOf:
            - $ref: '#/components/schemas/ApplePayPaymentRequest'
          nullable: true
        connector:
          type: string
          description: The session token is w.r.t this connector
        delayed_session_token:
          type: boolean
          description: Identifier for the delayed session response
        sdk_next_action:
          $ref: '#/components/schemas/SdkNextAction'
        connector_reference_id:
          type: string
          description: The connector transaction id
          nullable: true
        connector_sdk_public_key:
          type: string
          description: The public key id is to invoke third party sdk
          nullable: true
        connector_merchant_id:
          type: string
          description: The connector merchant id
          nullable: true
    OpenBankingSessionToken:
      type: object
      required:
        - open_banking_session_token
      properties:
        open_banking_session_token:
          type: string
          description: The session token for OpenBanking Connectors
    PazeSessionTokenResponse:
      type: object
      required:
        - client_id
        - client_name
        - client_profile_id
        - transaction_currency_code
        - transaction_amount
      properties:
        client_id:
          type: string
          description: Paze Client ID
        client_name:
          type: string
          description: Client Name to be displayed on the Paze screen
        client_profile_id:
          type: string
          description: Paze Client Profile ID
        transaction_currency_code:
          $ref: '#/components/schemas/Currency'
        transaction_amount:
          type: string
          description: The transaction amount
          example: '38.02'
        email_address:
          type: string
          description: Email Address
          example: johntest@test.com
          nullable: true
          maxLength: 255
    ClickToPaySessionResponse:
      type: object
      required:
        - dpa_id
        - dpa_name
        - locale
        - card_brands
        - acquirer_bin
        - acquirer_merchant_id
        - merchant_country_code
        - transaction_amount
        - transaction_currency_code
      properties:
        dpa_id:
          type: string
        dpa_name:
          type: string
        locale:
          type: string
        card_brands:
          type: array
          items:
            $ref: '#/components/schemas/CardNetwork'
          example: '[Visa, Mastercard]'
        acquirer_bin:
          type: string
        acquirer_merchant_id:
          type: string
        merchant_category_code:
          type: string
          nullable: true
        merchant_country_code:
          type: string
        transaction_amount:
          type: string
          example: '38.02'
        transaction_currency_code:
          $ref: '#/components/schemas/Currency'
        phone_number:
          type: string
          example: '9123456789'
          nullable: true
          maxLength: 255
        email:
          type: string
          example: johntest@test.com
          nullable: true
          maxLength: 255
        phone_country_code:
          type: string
          nullable: true
        provider:
          allOf:
            - $ref: '#/components/schemas/CtpServiceProvider'
          nullable: true
        dpa_client_id:
          type: string
          nullable: true
    AmazonPaySessionTokenResponse:
      type: object
      required:
        - merchant_id
        - ledger_currency
        - store_id
        - payment_intent
        - total_shipping_amount
        - total_tax_amount
        - total_base_amount
        - delivery_options
      properties:
        merchant_id:
          type: string
          description: Amazon Pay merchant account identifier
        ledger_currency:
          $ref: '#/components/schemas/Currency'
        store_id:
          type: string
          description: Amazon Pay store ID
        payment_intent:
          $ref: '#/components/schemas/AmazonPayPaymentIntent'
        total_shipping_amount:
          type: string
          description: The total shipping costs
        total_tax_amount:
          type: string
          description: The total tax amount for the order
        total_base_amount:
          type: string
          description: The total amount for items in the cart
        delivery_options:
          type: array
          items:
            $ref: '#/components/schemas/AmazonPayDeliveryOptions'
          description: The delivery options available for the provided address
    ThreeDsMethodData:
      oneOf:
        - type: object
          required:
            - three_ds_method_data_submission
            - consume_post_message_for_three_ds_method_completion
          properties:
            three_ds_method_data_submission:
              type: boolean
              description: Whether ThreeDS method data submission is required
            three_ds_method_data:
              type: string
              description: ThreeDS method data
              nullable: true
            three_ds_method_url:
              type: string
              description: ThreeDS method url
              nullable: true
            three_ds_method_key:
              allOf:
                - $ref: '#/components/schemas/ThreeDsMethodKey'
              nullable: true
            consume_post_message_for_three_ds_method_completion:
              type: boolean
              description: >-
                Indicates whether to wait for Post message after 3DS method data
                submission
    PollConfigResponse:
      type: object
      required:
        - poll_id
        - delay_in_secs
        - frequency
      properties:
        poll_id:
          type: string
          description: Poll Id
        delay_in_secs:
          type: integer
          format: int32
          description: Interval of the poll
        frequency:
          type: integer
          format: int32
          description: Frequency of the poll
    CardNetwork:
      type: string
      description: Indicates the card network.
      enum:
        - Visa
        - Mastercard
        - AmericanExpress
        - JCB
        - DinersClub
        - Discover
        - CartesBancaires
        - UnionPay
        - Interac
        - RuPay
        - Maestro
        - Star
        - Pulse
        - Accel
        - Nyce
    NextActionCall:
      oneOf:
        - type: string
          description: The next action call is Post Session Tokens
          enum:
            - post_session_tokens
        - type: string
          description: The next action call is confirm
          enum:
            - confirm
        - type: string
          description: The next action call is sync
          enum:
            - sync
        - type: string
          description: The next action call is Complete Authorize
          enum:
            - complete_authorize
        - type: string
          description: The next action is to await for a merchant callback
          enum:
            - await_merchant_callback
        - type: object
          required:
            - deny
          properties:
            deny:
              type: object
              description: The next action is to deny the payment with an error message
              required:
                - message
              properties:
                message:
                  type: string
        - type: string
          description: The next action is to perform eligibility check
          enum:
            - eligibility_check
    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
    DokuBankTransferInstructions:
      type: object
      required:
        - expires_at
        - reference
        - instructions_url
      properties:
        expires_at:
          type: string
          example: '1707091200000'
        reference:
          type: string
          example: '122385736258'
        instructions_url:
          type: string
    AchTransfer:
      type: object
      required:
        - account_number
        - bank_name
        - routing_number
        - swift_code
      properties:
        account_number:
          type: string
          example: '122385736258'
        bank_name:
          type: string
        routing_number:
          type: string
          example: '012'
        swift_code:
          type: string
          example: '234'
    SepaBankTransferInstructions:
      type: object
      required:
        - account_holder_name
        - bic
        - country
        - iban
        - reference
      properties:
        account_holder_name:
          type: string
          example: Jane Doe
        bic:
          type: string
          example: '9123456789'
        country:
          type: string
        iban:
          type: string
          example: '123456789'
        reference:
          type: string
          example: U2PVVSEV4V9Y
    BacsBankTransferInstructions:
      type: object
      required:
        - account_holder_name
        - account_number
        - sort_code
      properties:
        account_holder_name:
          type: string
          example: Jane Doe
        account_number:
          type: string
          example: '10244123908'
        sort_code:
          type: string
          example: '012'
    MultibancoTransferInstructions:
      type: object
      required:
        - reference
        - entity
      properties:
        reference:
          type: string
          example: '122385736258'
        entity:
          type: string
          example: '12345'
    GooglePayThirdPartySdk:
      type: object
      required:
        - delayed_session_token
        - connector
        - sdk_next_action
      properties:
        delayed_session_token:
          type: boolean
          description: Identifier for the delayed session response
        connector:
          type: string
          description: The name of the connector
        sdk_next_action:
          $ref: '#/components/schemas/SdkNextAction'
    GooglePaySessionResponse:
      type: object
      required:
        - merchant_info
        - shipping_address_required
        - email_required
        - shipping_address_parameters
        - allowed_payment_methods
        - transaction_info
        - delayed_session_token
        - connector
        - sdk_next_action
      properties:
        merchant_info:
          $ref: '#/components/schemas/GpayMerchantInfo'
        shipping_address_required:
          type: boolean
          description: Is shipping address required
        email_required:
          type: boolean
          description: Is email required
        shipping_address_parameters:
          $ref: '#/components/schemas/GpayShippingAddressParameters'
        allowed_payment_methods:
          type: array
          items:
            $ref: '#/components/schemas/GpayAllowedPaymentMethods'
          description: List of the allowed payment methods
        transaction_info:
          $ref: '#/components/schemas/GpayTransactionInfo'
        delayed_session_token:
          type: boolean
          description: Identifier for the delayed session response
        connector:
          type: string
          description: The name of the connector
        sdk_next_action:
          $ref: '#/components/schemas/SdkNextAction'
        secrets:
          allOf:
            - $ref: '#/components/schemas/SecretInfoToInitiateSdk'
          nullable: true
    SamsungPayMerchantPaymentInformation:
      type: object
      required:
        - name
        - country_code
      properties:
        name:
          type: string
          description: Merchant name, this will be displayed on the Samsung Pay screen
        url:
          type: string
          description: Merchant domain that process payments, required for web payments
          nullable: true
        country_code:
          $ref: '#/components/schemas/CountryAlpha2'
    SamsungPayAmountDetails:
      type: object
      required:
        - option
        - currency_code
        - total
      properties:
        option:
          $ref: '#/components/schemas/SamsungPayAmountFormat'
        currency_code:
          $ref: '#/components/schemas/Currency'
        total:
          type: string
          description: The total amount of the transaction
          example: '38.02'
    SamsungPayProtocolType:
      type: string
      enum:
        - PROTOCOL3DS
    SdkNextAction:
      type: object
      required:
        - next_action
      properties:
        next_action:
          $ref: '#/components/schemas/NextActionCall'
    PaypalTransactionInfo:
      type: object
      required:
        - flow
        - currency_code
        - total_price
      properties:
        flow:
          $ref: '#/components/schemas/PaypalFlow'
        currency_code:
          $ref: '#/components/schemas/Currency'
        total_price:
          type: string
          description: Total price
          example: '38.02'
    ApplePaySessionResponse:
      oneOf:
        - $ref: '#/components/schemas/ThirdPartySdkSessionResponse'
        - $ref: '#/components/schemas/NoThirdPartySdkSessionResponse'
        - $ref: '#/components/schemas/NullObject'
    ApplePayPaymentRequest:
      type: object
      required:
        - country_code
        - currency_code
        - total
      properties:
        country_code:
          $ref: '#/components/schemas/CountryAlpha2'
        currency_code:
          $ref: '#/components/schemas/Currency'
        total:
          $ref: '#/components/schemas/AmountInfo'
        merchant_capabilities:
          type: array
          items:
            type: string
          description: >-
            The list of merchant capabilities(ex: whether capable of 3ds or
            no-3ds)
          nullable: true
        supported_networks:
          type: array
          items:
            type: string
          description: The list of supported networks
          nullable: true
        merchant_identifier:
          type: string
          nullable: true
        required_billing_contact_fields:
          allOf:
            - $ref: '#/components/schemas/ApplePayBillingContactFields'
          nullable: true
        required_shipping_contact_fields:
          allOf:
            - $ref: '#/components/schemas/ApplePayShippingContactFields'
          nullable: true
        recurring_payment_request:
          allOf:
            - $ref: '#/components/schemas/ApplePayRecurringPaymentRequest'
          nullable: true
    Currency:
      type: string
      description: >-
        The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the
        payment amount. This field is mandatory for creating a payment.
      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
        - CLF
        - CLP
        - CNY
        - COP
        - CRC
        - CUC
        - 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
        - STD
        - 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
    CtpServiceProvider:
      type: string
      enum:
        - visa
        - mastercard
    AmazonPayPaymentIntent:
      type: string
      enum:
        - Confirm
        - Authorize
        - AuthorizeWithCapture
    AmazonPayDeliveryOptions:
      type: object
      required:
        - id
        - price
        - shipping_method
        - is_default
      properties:
        id:
          type: string
          description: Delivery Option identifier
        price:
          $ref: '#/components/schemas/AmazonPayDeliveryPrice'
        shipping_method:
          $ref: '#/components/schemas/AmazonPayShippingMethod'
        is_default:
          type: boolean
          description: Specifies if this delivery option is the default
    ThreeDsMethodKey:
      type: string
      enum:
        - threeDSMethodData
        - JWT
    GpayMerchantInfo:
      type: object
      required:
        - merchant_name
      properties:
        merchant_id:
          type: string
          description: >-
            The merchant Identifier that needs to be passed while invoking Gpay
            SDK
          nullable: true
        merchant_name:
          type: string
          description: The name of the merchant that needs to be displayed on Gpay PopUp
    GpayShippingAddressParameters:
      type: object
      required:
        - phone_number_required
      properties:
        phone_number_required:
          type: boolean
          description: Is shipping phone number required
    GpayAllowedPaymentMethods:
      type: object
      required:
        - type
        - parameters
        - tokenization_specification
      properties:
        type:
          type: string
          description: The type of payment method
        parameters:
          $ref: '#/components/schemas/GpayAllowedMethodsParameters'
        tokenization_specification:
          $ref: '#/components/schemas/GpayTokenizationSpecification'
    GpayTransactionInfo:
      type: object
      required:
        - country_code
        - currency_code
        - total_price_status
        - total_price
      properties:
        country_code:
          $ref: '#/components/schemas/CountryAlpha2'
        currency_code:
          $ref: '#/components/schemas/Currency'
        total_price_status:
          type: string
          description: 'The total price status (ex: ''FINAL'')'
        total_price:
          type: string
          description: The total price
          example: '38.02'
    SecretInfoToInitiateSdk:
      type: object
      required:
        - display
        - payment
      properties:
        display:
          type: string
        payment:
          type: string
    SamsungPayAmountFormat:
      type: string
      enum:
        - FORMAT_TOTAL_PRICE_ONLY
        - FORMAT_TOTAL_ESTIMATED_AMOUNT
    PaypalFlow:
      type: string
      enum:
        - checkout
    ThirdPartySdkSessionResponse:
      type: object
      required:
        - secrets
      properties:
        secrets:
          $ref: '#/components/schemas/SecretInfoToInitiateSdk'
    NoThirdPartySdkSessionResponse:
      type: object
      required:
        - epoch_timestamp
        - expires_at
        - merchant_session_identifier
        - nonce
        - merchant_identifier
        - domain_name
        - display_name
        - signature
        - operational_analytics_identifier
        - retries
        - psp_id
      properties:
        epoch_timestamp:
          type: integer
          format: int64
          description: Timestamp at which session is requested
          minimum: 0
        expires_at:
          type: integer
          format: int64
          description: Timestamp at which session expires
          minimum: 0
        merchant_session_identifier:
          type: string
          description: The identifier for the merchant session
        nonce:
          type: string
          description: Apple pay generated unique ID (UUID) value
        merchant_identifier:
          type: string
          description: The identifier for the merchant
        domain_name:
          type: string
          description: The domain name of the merchant which is registered in Apple Pay
        display_name:
          type: string
          description: The name to be displayed on Apple Pay button
        signature:
          type: string
          description: A string which represents the properties of a payment
        operational_analytics_identifier:
          type: string
          description: The identifier for the operational analytics
        retries:
          type: integer
          format: int32
          description: The number of retries to get the session response
          minimum: 0
        psp_id:
          type: string
          description: The identifier for the connector transaction
    NullObject:
      default: null
      nullable: true
    AmountInfo:
      type: object
      required:
        - label
        - amount
      properties:
        label:
          type: string
          description: The label must be the name of the merchant.
        type:
          type: string
          description: >-
            A value that indicates whether the line item(Ex: total, tax,
            discount, or grand total) is final or pending.
          nullable: true
        amount:
          type: string
          description: 'The total amount for the payment in majot unit string (Ex: 38.02)'
          example: '38.02'
    ApplePayBillingContactFields:
      type: array
      items:
        $ref: '#/components/schemas/ApplePayAddressParameters'
    ApplePayShippingContactFields:
      type: array
      items:
        $ref: '#/components/schemas/ApplePayAddressParameters'
    ApplePayRecurringPaymentRequest:
      type: object
      required:
        - payment_description
        - regular_billing
        - management_u_r_l
      properties:
        payment_description:
          type: string
          description: >-
            A description of the recurring payment that Apple Pay displays to
            the user in the payment sheet
        regular_billing:
          $ref: '#/components/schemas/ApplePayRegularBillingRequest'
        billing_agreement:
          type: string
          description: >-
            A localized billing agreement that the payment sheet displays to the
            user before the user authorizes the payment
          nullable: true
        management_u_r_l:
          type: string
          description: >-
            A URL to a web page where the user can update or delete the payment
            method for the recurring payment
          example: https://hyperswitch.io
    AmazonPayDeliveryPrice:
      type: object
      required:
        - amount
        - currency_code
      properties:
        amount:
          $ref: '#/components/schemas/MinorUnit'
        currency_code:
          $ref: '#/components/schemas/Currency'
    AmazonPayShippingMethod:
      type: object
      required:
        - shipping_method_name
        - shipping_method_code
      properties:
        shipping_method_name:
          type: string
          description: Name of the shipping method
        shipping_method_code:
          type: string
          description: Code of the shipping method
    GpayAllowedMethodsParameters:
      type: object
      required:
        - allowed_auth_methods
        - allowed_card_networks
      properties:
        allowed_auth_methods:
          type: array
          items:
            type: string
          description: 'The list of allowed auth methods (ex: 3DS, No3DS, PAN_ONLY etc)'
        allowed_card_networks:
          type: array
          items:
            type: string
          description: 'The list of allowed card networks (ex: AMEX,JCB etc)'
        billing_address_required:
          type: boolean
          description: Is billing address required
          nullable: true
        billing_address_parameters:
          allOf:
            - $ref: '#/components/schemas/GpayBillingAddressParameters'
          nullable: true
        assurance_details_required:
          type: boolean
          description: Whether assurance details are required
          nullable: true
        allow_credit_cards:
          type: boolean
          description: Set to false if you don't want to allow credit cards
          nullable: true
    GpayTokenizationSpecification:
      type: object
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          description: 'The token specification type(ex: PAYMENT_GATEWAY)'
        parameters:
          $ref: '#/components/schemas/GpayTokenParameters'
    ApplePayAddressParameters:
      type: string
      enum:
        - postalAddress
        - phone
        - email
    ApplePayRegularBillingRequest:
      type: object
      required:
        - amount
        - label
        - payment_timing
      properties:
        amount:
          type: string
          description: The amount of the recurring payment
          example: '38.02'
        label:
          type: string
          description: >-
            The label that Apple Pay displays to the user in the payment sheet
            with the recurring details
        payment_timing:
          $ref: '#/components/schemas/ApplePayPaymentTiming'
        recurring_payment_start_date:
          type: string
          format: date-time
          description: The date of the first payment
          nullable: true
        recurring_payment_end_date:
          type: string
          format: date-time
          description: The date of the final payment
          nullable: true
        recurring_payment_interval_unit:
          allOf:
            - $ref: '#/components/schemas/RecurringPaymentIntervalUnit'
          nullable: true
        recurring_payment_interval_count:
          type: integer
          format: int32
          description: The number of interval units that make up the total payment interval
          nullable: true
    MinorUnit:
      type: integer
      format: int64
      description: This Unit struct represents MinorUnit in which core amount works
    GpayBillingAddressParameters:
      type: object
      required:
        - phone_number_required
        - format
      properties:
        phone_number_required:
          type: boolean
          description: Is billing phone number required
        format:
          $ref: '#/components/schemas/GpayBillingAddressFormat'
    GpayTokenParameters:
      type: object
      properties:
        gateway:
          type: string
          description: The name of the connector
          nullable: true
        gateway_merchant_id:
          type: string
          description: The merchant ID registered in the connector associated
          nullable: true
        stripe:version:
          type: string
          nullable: true
        stripe:publishableKey:
          type: string
          nullable: true
        protocol_version:
          type: string
          description: The protocol version for encryption
          nullable: true
        public_key:
          type: string
          description: The public key provided by the merchant
          nullable: true
    ApplePayPaymentTiming:
      type: string
      enum:
        - immediate
        - recurring
    RecurringPaymentIntervalUnit:
      type: string
      enum:
        - year
        - month
        - day
        - hour
        - minute
    GpayBillingAddressFormat:
      type: string
      enum:
        - FULL
        - MIN
  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.

````