> ## 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.

# Merchant Account - Update

> Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc



## OpenAPI

````yaml post /accounts/{account_id}
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
  - name: Authentication
    description: Create and manage authentication
  - name: Subscriptions
    description: Subscription management and billing endpoints
  - name: Card Issuer
    description: Create and manage card issuers
paths:
  /accounts/{account_id}:
    post:
      tags:
        - Merchant Account
      summary: Merchant Account - Update
      description: >-
        Updates details of an existing merchant account. Helpful in updating
        merchant details such as email, contact details, or other configuration
        details like webhook, routing algorithm etc
      operationId: Update a Merchant Account
      parameters:
        - name: account_id
          in: path
          description: The unique identifier for the merchant account
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantAccountUpdate'
            examples:
              Update merchant name:
                value:
                  merchant_id: merchant_abc
                  merchant_name: merchant_name
              Update return url:
                value:
                  merchant_id: merchant_abc
                  return_url: https://example.com
              Update webhook url:
                value:
                  merchant_id: merchant_abc
                  webhook_details:
                    webhook_url: https://webhook.site/a5c54f75-1f7e-4545-b781-af525b7e37a0
        required: true
      responses:
        '200':
          description: Merchant Account Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantAccountResponse'
        '404':
          description: Merchant account not found
      security:
        - admin_api_key: []
components:
  schemas:
    MerchantAccountUpdate:
      type: object
      required:
        - merchant_id
      properties:
        merchant_id:
          type: string
          description: The identifier for the Merchant Account
          example: y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
        merchant_name:
          type: string
          description: Name of the Merchant Account
          example: NewAge Retailer
          nullable: true
        merchant_details:
          allOf:
            - $ref: '#/components/schemas/MerchantDetails'
          nullable: true
        return_url:
          type: string
          description: The URL to redirect after the completion of the operation
          example: https://www.example.com/success
          nullable: true
          maxLength: 255
        webhook_details:
          allOf:
            - $ref: '#/components/schemas/WebhookDetails'
          nullable: true
        payout_routing_algorithm:
          allOf:
            - $ref: '#/components/schemas/StaticRoutingAlgorithm'
          nullable: true
        sub_merchants_enabled:
          type: boolean
          description: >-
            A boolean value to indicate if the merchant is a sub-merchant under
            a master or a parent merchant. By default, its value is false.
          default: false
          example: false
          nullable: true
        parent_merchant_id:
          type: string
          description: >-
            Refers to the Parent Merchant ID if the merchant being created is a
            sub-merchant
          example: xkkdf909012sdjki2dkh5sdf
          nullable: true
          maxLength: 255
        enable_payment_response_hash:
          type: boolean
          description: >-
            A boolean value to indicate if payment response hash needs to be
            enabled
          default: false
          example: true
          nullable: true
        payment_response_hash_key:
          type: string
          description: >-
            Refers to the hash key used for calculating the signature for
            webhooks and redirect response.
          nullable: true
        redirect_to_merchant_with_http_post:
          type: boolean
          description: >-
            A boolean value to indicate if redirect to merchant with http post
            needs to be enabled
          default: false
          example: true
          nullable: true
        metadata:
          type: object
          description: >-
            Metadata is useful for storing additional, unstructured information
            on an object.
          nullable: true
        publishable_key:
          type: string
          description: API key that will be used for server side API access
          example: AH3423bkjbkjdsfbkj
          nullable: true
        locker_id:
          type: string
          description: >-
            An identifier for the vault used to store payment method
            information.
          example: locker_abc123
          nullable: true
        primary_business_details:
          type: array
          items:
            $ref: '#/components/schemas/PrimaryBusinessDetails'
          description: Details about the primary business unit of the merchant account
          nullable: true
        frm_routing_algorithm:
          type: object
          description: >-
            The frm routing algorithm to be used for routing payments to desired
            FRM's
          nullable: true
        default_profile:
          type: string
          description: >-
            The default profile that must be used for creating merchant accounts
            and payments
          nullable: true
          maxLength: 64
        pm_collect_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessCollectLinkConfig'
          nullable: true
        network_tokenization_credentials:
          allOf:
            - $ref: '#/components/schemas/NetworkTokeizationProviderCredentials'
          nullable: true
      additionalProperties: false
    MerchantAccountResponse:
      type: object
      required:
        - merchant_id
        - enable_payment_response_hash
        - redirect_to_merchant_with_http_post
        - primary_business_details
        - organization_id
        - is_recon_enabled
        - recon_status
        - merchant_account_type
      properties:
        merchant_id:
          type: string
          description: The identifier for the Merchant Account
          example: y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
        merchant_name:
          type: string
          description: Name of the Merchant Account
          example: NewAge Retailer
          nullable: true
        return_url:
          type: string
          description: The URL to redirect after completion of the payment
          example: https://www.example.com/success
          nullable: true
          maxLength: 255
        enable_payment_response_hash:
          type: boolean
          description: >-
            A boolean value to indicate if payment response hash needs to be
            enabled
          default: false
          example: true
        payment_response_hash_key:
          type: string
          description: >-
            Refers to the hash key used for calculating the signature for
            webhooks and redirect response. If the value is not provided, a
            value is automatically generated.
          example: xkkdf909012sdjki2dkh5sdf
          nullable: true
          maxLength: 255
        redirect_to_merchant_with_http_post:
          type: boolean
          description: >-
            A boolean value to indicate if redirect to merchant with http post
            needs to be enabled
          default: false
          example: true
        merchant_details:
          allOf:
            - $ref: '#/components/schemas/MerchantDetails'
          nullable: true
        webhook_details:
          allOf:
            - $ref: '#/components/schemas/WebhookDetails'
          nullable: true
        payout_routing_algorithm:
          allOf:
            - $ref: '#/components/schemas/StaticRoutingAlgorithm'
          nullable: true
        sub_merchants_enabled:
          type: boolean
          description: >-
            A boolean value to indicate if the merchant is a sub-merchant under
            a master or a parent merchant. By default, its value is false.
          default: false
          example: false
          nullable: true
        parent_merchant_id:
          type: string
          description: >-
            Refers to the Parent Merchant ID if the merchant being created is a
            sub-merchant
          example: xkkdf909012sdjki2dkh5sdf
          nullable: true
          maxLength: 255
        publishable_key:
          type: string
          description: API key that will be used for server side API access
          example: AH3423bkjbkjdsfbkj
          nullable: true
        metadata:
          type: object
          description: >-
            Metadata is useful for storing additional, unstructured information
            on an object.
          nullable: true
        locker_id:
          type: string
          description: >-
            An identifier for the vault used to store payment method
            information.
          example: locker_abc123
          nullable: true
        primary_business_details:
          type: array
          items:
            $ref: '#/components/schemas/PrimaryBusinessDetails'
          description: Details about the primary business unit of the merchant account
        frm_routing_algorithm:
          allOf:
            - $ref: '#/components/schemas/StaticRoutingAlgorithm'
          nullable: true
        organization_id:
          type: string
          description: The organization id merchant is associated with
          example: org_q98uSGAYbjEwqs0mJwnz
          maxLength: 64
          minLength: 1
        is_recon_enabled:
          type: boolean
          description: >-
            A boolean value to indicate if the merchant has recon service is
            enabled or not, by default value is false
        default_profile:
          type: string
          description: >-
            The default profile that must be used for creating merchant accounts
            and payments
          nullable: true
          maxLength: 64
        recon_status:
          $ref: '#/components/schemas/ReconStatus'
        pm_collect_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessCollectLinkConfig'
          nullable: true
        product_type:
          allOf:
            - $ref: '#/components/schemas/MerchantProductType'
          nullable: true
        merchant_account_type:
          $ref: '#/components/schemas/MerchantAccountType'
        network_tokenization_credentials:
          allOf:
            - $ref: '#/components/schemas/NetworkTokeizationProviderCredentials'
          nullable: true
    MerchantDetails:
      type: object
      properties:
        primary_contact_person:
          type: string
          description: The merchant's primary contact name
          example: John Doe
          nullable: true
          maxLength: 255
        primary_phone:
          type: string
          description: The merchant's primary phone number
          example: '999999999'
          nullable: true
          maxLength: 255
        primary_email:
          type: string
          description: The merchant's primary email address
          example: johndoe@test.com
          nullable: true
          maxLength: 255
        secondary_contact_person:
          type: string
          description: The merchant's secondary contact name
          example: John Doe2
          nullable: true
          maxLength: 255
        secondary_phone:
          type: string
          description: The merchant's secondary phone number
          example: '999999988'
          nullable: true
          maxLength: 255
        secondary_email:
          type: string
          description: The merchant's secondary email address
          example: johndoe2@test.com
          nullable: true
          maxLength: 255
        website:
          type: string
          description: The business website of the merchant
          example: www.example.com
          nullable: true
          maxLength: 255
        about_business:
          type: string
          description: A brief description about merchant's business
          example: >-
            Online Retail with a wide selection of organic products for North
            America
          nullable: true
          maxLength: 255
        address:
          allOf:
            - $ref: '#/components/schemas/AddressDetails'
          nullable: true
        merchant_tax_registration_id:
          type: string
          example: '123456789'
          nullable: true
      additionalProperties: false
    WebhookDetails:
      type: object
      required:
        - payment_statuses_enabled
        - refund_statuses_enabled
      properties:
        webhook_version:
          type: string
          description: The version for Webhook
          example: 1.0.2
          nullable: true
          maxLength: 255
        webhook_username:
          type: string
          description: The user name for Webhook login
          example: ekart_retail
          nullable: true
          maxLength: 255
        webhook_password:
          type: string
          description: The password for Webhook login
          example: ekart@123
          nullable: true
          maxLength: 255
        webhook_url:
          type: string
          description: The url for the webhook endpoint
          example: www.ekart.com/webhooks
          nullable: true
        payment_created_enabled:
          type: boolean
          description: >-
            If this property is true, a webhook message is posted whenever a new
            payment is created
          example: true
          nullable: true
        payment_succeeded_enabled:
          type: boolean
          description: >-
            If this property is true, a webhook message is posted whenever a
            payment is successful
          example: true
          nullable: true
        payment_failed_enabled:
          type: boolean
          description: >-
            If this property is true, a webhook message is posted whenever a
            payment fails
          example: true
          nullable: true
        payment_statuses_enabled:
          type: array
          items:
            $ref: '#/components/schemas/IntentStatus'
          description: List of payment statuses that triggers a webhook for payment intents
          example:
            - succeeded
            - failed
            - partially_captured
            - requires_merchant_action
        refund_statuses_enabled:
          type: array
          items:
            $ref: '#/components/schemas/IntentStatus'
          description: List of refund statuses that triggers a webhook for refunds
          example:
            - success
            - failure
        payout_statuses_enabled:
          type: array
          items:
            $ref: '#/components/schemas/PayoutStatus'
          description: List of payout statuses that triggers a webhook for payouts
          example:
            - success
            - failed
          nullable: true
      additionalProperties: false
    StaticRoutingAlgorithm:
      oneOf:
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - single
            data:
              $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - priority
            data:
              type: array
              items:
                $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - volume_split
            data:
              type: array
              items:
                $ref: '#/components/schemas/ConnectorVolumeSplit'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - advanced
            data:
              $ref: '#/components/schemas/ProgramConnectorSelection'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - three_ds_decision_rule
            data:
              $ref: '#/components/schemas/ProgramThreeDsDecisionRule'
      discriminator:
        propertyName: type
    PrimaryBusinessDetails:
      type: object
      required:
        - country
        - business
      properties:
        country:
          $ref: '#/components/schemas/CountryAlpha2'
        business:
          type: string
          example: food
      additionalProperties: false
    BusinessCollectLinkConfig:
      allOf:
        - $ref: '#/components/schemas/BusinessGenericLinkConfig'
        - type: object
          required:
            - enabled_payment_methods
          properties:
            enabled_payment_methods:
              type: array
              items:
                $ref: '#/components/schemas/EnabledPaymentMethod'
              description: List of payment methods shown on collect UI
              example: >-
                [{"payment_method": "bank_transfer", "payment_method_types":
                ["ach", "bacs", "sepa"]}]
    NetworkTokeizationProviderCredentials:
      oneOf:
        - type: object
          required:
            - internal_network_token_service
          properties:
            internal_network_token_service:
              $ref: '#/components/schemas/InternalNetworkTokenizationCredentials'
      description: >-
        The credentials required for calling the network tokenization provider
        APIs
    ReconStatus:
      type: string
      enum:
        - not_requested
        - requested
        - active
        - disabled
    MerchantProductType:
      type: string
      enum:
        - orchestration
        - vault
        - recon
        - recovery
        - cost_observability
        - dynamic_routing
    MerchantAccountType:
      type: string
      enum:
        - standard
        - platform
        - connected
    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
    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
    PayoutStatus:
      type: string
      enum:
        - success
        - failed
        - cancelled
        - initiated
        - expired
        - reversed
        - pending
        - ineligible
        - requires_creation
        - requires_confirmation
        - requires_payout_method_data
        - requires_fulfillment
        - requires_vendor_account_creation
    RoutableConnectorChoice:
      type: object
      description: Routable Connector chosen for a payment
      required:
        - connector
      properties:
        connector:
          $ref: '#/components/schemas/RoutableConnectors'
        merchant_connector_id:
          type: string
          nullable: true
    ConnectorVolumeSplit:
      type: object
      required:
        - connector
        - split
      properties:
        connector:
          $ref: '#/components/schemas/RoutableConnectorChoice'
        split:
          type: integer
          format: int32
          minimum: 0
    ProgramConnectorSelection:
      type: object
      description: |-
        The program, having a default connector selection and
        a bunch of rules. Also can hold arbitrary metadata.
      required:
        - defaultSelection
        - rules
        - metadata
      properties:
        defaultSelection:
          $ref: '#/components/schemas/ConnectorSelection'
        rules:
          $ref: '#/components/schemas/RuleConnectorSelection'
        metadata:
          type: object
          additionalProperties: {}
    ProgramThreeDsDecisionRule:
      type: object
      required:
        - defaultSelection
        - rules
        - metadata
      properties:
        defaultSelection:
          $ref: '#/components/schemas/ThreeDSDecisionRule'
        rules:
          $ref: '#/components/schemas/RuleThreeDsDecisionRule'
        metadata:
          type: object
          additionalProperties: {}
    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
    BusinessGenericLinkConfig:
      allOf:
        - $ref: '#/components/schemas/GenericLinkUiConfig'
        - type: object
          required:
            - allowed_domains
          properties:
            domain_name:
              type: string
              description: Custom domain name to be used for hosting the link
              nullable: true
            allowed_domains:
              type: array
              items:
                type: string
              description: >-
                A list of allowed domains (glob patterns) where this link can be
                embedded / opened from
              uniqueItems: true
    EnabledPaymentMethod:
      type: object
      description: Object for EnabledPaymentMethod
      required:
        - payment_method
        - payment_method_types
      properties:
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_types:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethodType'
          description: An array of associated payment method types
          uniqueItems: true
    InternalNetworkTokenizationCredentials:
      type: object
      required:
        - token_service_api_key
        - public_key
        - private_key
        - key_id
      properties:
        token_service_api_key:
          type: string
          description: The API key to contact the network tokenization provider
          example: MDRFRDU3Mzc1Q0Q0N2893727712QzQjJEQzlENTBCOg==
          maxLength: 255
        public_key:
          type: string
          description: >-
            The public key to encrypt the card details before sending to the
            network tokenization provider
          example: |-
            -----BEGIN PUBLIC KEY-----
            som8723hj1bajhgd123==
            -----END PUBLIC KEY-----
          maxLength: 255
        private_key:
          type: string
          description: >-
            The private key to decrypt the tokenized card details received from
            the network tokenization provider
          example: |-
            -----BEGIN RSA PRIVATE KEY-----
            897238huhbsdbjh12==
            -----END RSA PRIVATE KEY-----
          maxLength: 255
        key_id:
          type: string
          description: The key_id used in encryption
          example: key_1ac9895a6d85414897213gahdac838a8
          maxLength: 255
      additionalProperties: false
    RoutableConnectors:
      type: string
      description: >-
        RoutableConnectors are the subset of Connectors that are eligible for
        payments routing
      enum:
        - authipay
        - adyenplatform
        - stripe_billing_test
        - phonypay
        - fauxpay
        - pretendpay
        - stripe_test
        - adyen_test
        - checkout_test
        - paypal_test
        - aci
        - adyen
        - affirm
        - airwallex
        - amazonpay
        - archipel
        - authorizedotnet
        - bankofamerica
        - barclaycard
        - billwerk
        - bitpay
        - bambora
        - blackhawknetwork
        - bamboraapac
        - bluesnap
        - calida
        - boku
        - braintree
        - breadpay
        - cashtocode
        - celero
        - chargebee
        - custombilling
        - checkbook
        - checkout
        - coinbase
        - coingate
        - cryptopay
        - cybersource
        - cybersourcedecisionmanager
        - datatrans
        - deutschebank
        - digitalvirgo
        - dlocal
        - dwolla
        - ebanx
        - elavon
        - envoy
        - facilitapay
        - finix
        - fiserv
        - fiservemea
        - fiservcommercehub
        - fiuu
        - flexiti
        - forte
        - getnet
        - gigadat
        - globalpay
        - globepay
        - gocardless
        - hipay
        - helcim
        - hyperpg
        - iatapay
        - imerchantsolutions
        - inespay
        - itaubank
        - jpmorgan
        - klarna
        - loonio
        - mifinity
        - mollie
        - moneris
        - multisafepay
        - nexinets
        - nexixpay
        - nmi
        - nomupay
        - noon
        - nordea
        - novalnet
        - nuvei
        - opennode
        - paybox
        - payme
        - payload
        - payone
        - paypal
        - paysafe
        - paystack
        - paytm
        - payu
        - peachpayments
        - payjustnow
        - payjustnowinstore
        - phonepe
        - placetopay
        - powertranz
        - prophetpay
        - rapyd
        - razorpay
        - recurly
        - redsys
        - revolv3
        - riskified
        - sanlam
        - santander
        - shift4
        - signifyd
        - silverflow
        - square
        - stax
        - stripe
        - stripebilling
        - tesouro
        - truelayer
        - trustly
        - trustpay
        - trustpayments
        - tokenio
        - tsys
        - volt
        - wellsfargo
        - wise
        - worldline
        - worldpay
        - worldpaymodular
        - worldpayvantiv
        - worldpayxml
        - xendit
        - zen
        - zift
        - plaid
        - zsl
        - juspaythreedsserver
        - ctp_mastercard
        - ctp_visa
        - netcetera
        - cardinal
        - threedsecureio
    ConnectorSelection:
      oneOf:
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - priority
            data:
              type: array
              items:
                $ref: '#/components/schemas/RoutableConnectorChoice'
        - type: object
          required:
            - type
            - data
          properties:
            type:
              type: string
              enum:
                - volume_split
            data:
              type: array
              items:
                $ref: '#/components/schemas/ConnectorVolumeSplit'
      discriminator:
        propertyName: type
    RuleConnectorSelection:
      type: object
      description: |-
        Represents a rule

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

        payment.method.cardtype = credit
        }
        }
        ```
      required:
        - name
        - connectorSelection
        - statements
      properties:
        name:
          type: string
        connectorSelection:
          $ref: '#/components/schemas/ConnectorSelection'
        statements:
          type: array
          items:
            $ref: '#/components/schemas/IfStatement'
    ThreeDSDecisionRule:
      type: object
      description: >-
        Struct representing the output configuration for the 3DS Decision Rule
        Engine.
      required:
        - decision
      properties:
        decision:
          $ref: '#/components/schemas/ThreeDSDecision'
    RuleThreeDsDecisionRule:
      type: object
      required:
        - name
        - connectorSelection
        - statements
      properties:
        name:
          type: string
        connectorSelection:
          $ref: '#/components/schemas/ThreeDSDecision'
        statements:
          type: array
          items:
            $ref: '#/components/schemas/IfStatement'
    GenericLinkUiConfig:
      type: object
      description: Object for GenericLinkUiConfig
      properties:
        logo:
          type: string
          description: Merchant's display logo
          example: https://hyperswitch.io/favicon.ico
          nullable: true
          maxLength: 255
        merchant_name:
          type: string
          description: Custom merchant name for the link
          example: Hyperswitch
          nullable: true
          maxLength: 255
        theme:
          type: string
          description: Primary color to be used in the form represented in hex format
          example: '#4285F4'
          nullable: true
          maxLength: 255
    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
    IfStatement:
      type: object
      description: >-
        Represents an IF statement with conditions and optional nested IF
        statements


        ```text

        payment.method = card {

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

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

        }

        }

        ```
      required:
        - condition
      properties:
        condition:
          type: array
          items:
            $ref: '#/components/schemas/Comparison'
        nested:
          type: array
          items:
            $ref: '#/components/schemas/IfStatement'
          nullable: true
    ThreeDSDecision:
      type: string
      description: Enum representing the possible outcomes of the 3DS Decision Rule Engine.
      enum:
        - no_three_ds
        - challenge_requested
        - challenge_preferred
        - three_ds_exemption_requested_tra
        - three_ds_exemption_requested_low_value
        - issuer_three_ds_exemption_requested
    Comparison:
      type: object
      description: Represents a single comparison condition.
      required:
        - lhs
        - comparison
        - value
        - metadata
      properties:
        lhs:
          type: string
          description: >-
            The left hand side which will always be a domain input identifier
            like "payment.method.cardtype"
        comparison:
          $ref: '#/components/schemas/ComparisonType'
        value:
          $ref: '#/components/schemas/ValueType'
        metadata:
          type: object
          description: >-
            Additional metadata that the Static Analyzer and Backend does not
            touch.

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

            between the static analyzer and the frontend.
          additionalProperties: {}
    ComparisonType:
      type: string
      description: Conditional comparison type
      enum:
        - equal
        - not_equal
        - less_than
        - less_than_equal
        - greater_than
        - greater_than_equal
    ValueType:
      oneOf:
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number
            value:
              type: integer
              format: int64
              description: Represents a number literal
              minimum: 0
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - enum_variant
            value:
              type: string
              description: Represents an enum variant
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - metadata_variant
            value:
              $ref: '#/components/schemas/MetadataValue'
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - str_value
            value:
              type: string
              description: Represents a arbitrary String value
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - global_ref
            value:
              type: string
              description: >-
                Represents a global reference, which is a reference to a global
                variable
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number_array
            value:
              type: array
              items:
                type: integer
                format: int64
                minimum: 0
              description: |-
                Represents an array of numbers. This is basically used for
                "one of the given numbers" operations
                eg: payment.method.amount = (1, 2, 3)
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - enum_variant_array
            value:
              type: array
              items:
                type: string
              description: |-
                Similar to NumberArray but for enum variants
                eg: payment.method.cardtype = (debit, credit)
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - number_comparison_array
            value:
              type: array
              items:
                $ref: '#/components/schemas/NumberComparison'
              description: |-
                Like a number array but can include comparisons. Useful for
                conditions like "500 < amount < 1000"
                eg: payment.amount = (> 500, < 1000)
      description: Represents a value in the DSL
      discriminator:
        propertyName: type
    MetadataValue:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: string
    NumberComparison:
      type: object
      description: Represents a number comparison for "NumberComparisonArrayValue"
      required:
        - comparisonType
        - number
      properties:
        comparisonType:
          $ref: '#/components/schemas/ComparisonType'
        number:
          $ref: '#/components/schemas/MinorUnit'
    MinorUnit:
      type: integer
      format: int64
      description: This Unit struct represents MinorUnit in which core amount works
  securitySchemes:
    admin_api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Admin API keys allow you to perform some privileged actions such as
        creating a merchant account and Merchant Connector account.

````