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

# Profile - Update

> Update the *profile*



## OpenAPI

````yaml put /v2/profiles/{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
paths:
  /v2/profiles/{id}:
    put:
      tags:
        - Profile
      summary: Profile - Update
      description: Update the *profile*
      operationId: Update a Profile
      parameters:
        - name: id
          in: path
          description: The unique identifier for the profile
          required: true
          schema:
            type: string
        - name: X-Merchant-Id
          in: header
          description: Merchant ID of the profile.
          required: true
          schema:
            type: string
          example:
            X-Merchant-Id: abc_iG5VNjsN9xuCg7Xx0uWh
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileCreate'
            examples:
              Update profile with profile name fields:
                value:
                  profile_name: shoe_business
        required: true
      responses:
        '200':
          description: Profile Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileResponse'
        '400':
          description: Invalid data
      security:
        - admin_api_key: []
components:
  schemas:
    ProfileCreate:
      type: object
      required:
        - profile_name
      properties:
        profile_name:
          type: string
          description: The name of profile
          maxLength: 64
        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
        enable_payment_response_hash:
          type: boolean
          description: >-
            A boolean value to indicate if payment response hash needs to be
            enabled
          default: true
          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. If the value is not provided, a
            value is automatically generated.
          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
        webhook_details:
          allOf:
            - $ref: '#/components/schemas/WebhookDetails'
          nullable: true
        metadata:
          type: object
          description: >-
            Metadata is useful for storing additional, unstructured information
            on an object.
          nullable: true
        order_fulfillment_time:
          type: integer
          format: int32
          description: >-
            Will be used to determine the time till which your payment will be
            active once the payment session starts
          example: 900
          nullable: true
          minimum: 0
        order_fulfillment_time_origin:
          allOf:
            - $ref: '#/components/schemas/OrderFulfillmentTimeOrigin'
          nullable: true
        applepay_verified_domains:
          type: array
          items:
            type: string
          description: Verified Apple Pay domains for a particular profile
          nullable: true
        session_expiry:
          type: integer
          format: int32
          description: >-
            Client Secret Default expiry for all payments created under this
            profile
          example: 900
          nullable: true
          minimum: 0
        payment_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessPaymentLinkConfig'
          nullable: true
        authentication_connector_details:
          allOf:
            - $ref: '#/components/schemas/AuthenticationConnectorDetails'
          nullable: true
        use_billing_as_payment_method_billing:
          type: boolean
          description: >-
            Whether to use the billing details passed when creating the intent
            as payment method billing
          nullable: true
        collect_shipping_details_from_wallet_connector_if_required:
          type: boolean
          description: >-
            A boolean value to indicate if customer shipping details needs to be
            collected from wallet

            connector only if it is required field for connector (Eg. Apple Pay,
            Google Pay etc)
          default: false
          example: false
          nullable: true
        collect_billing_details_from_wallet_connector_if_required:
          type: boolean
          description: >-
            A boolean value to indicate if customer billing details needs to be
            collected from wallet

            connector only if it is required field for connector (Eg. Apple Pay,
            Google Pay etc)
          default: false
          example: false
          nullable: true
        always_collect_shipping_details_from_wallet_connector:
          type: boolean
          description: >-
            A boolean value to indicate if customer shipping details needs to be
            collected from wallet

            connector irrespective of connector required fields (Eg. Apple pay,
            Google pay etc)
          default: false
          example: false
          nullable: true
        always_collect_billing_details_from_wallet_connector:
          type: boolean
          description: >-
            A boolean value to indicate if customer billing details needs to be
            collected from wallet

            connector irrespective of connector required fields (Eg. Apple pay,
            Google pay etc)
          default: false
          example: false
          nullable: true
        is_connector_agnostic_mit_enabled:
          type: boolean
          description: >-
            Indicates if the MIT (merchant initiated transaction) payments can
            be made connector

            agnostic, i.e., MITs may be processed through different connector
            than CIT (customer

            initiated transaction) based on the routing rules.

            If set to `false`, MIT will go through the same connector as the
            CIT.
          nullable: true
        payout_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessPayoutLinkConfig'
          nullable: true
        outgoing_webhook_custom_http_headers:
          type: object
          description: >-
            These key-value pairs are sent as additional custom headers in the
            outgoing webhook request. It is recommended not to use more than
            four key-value pairs.
          nullable: true
        tax_connector_id:
          type: string
          description: Merchant Connector id to be stored for tax_calculator connector
          nullable: true
        is_tax_connector_enabled:
          type: boolean
          description: |-
            Indicates if tax_calculator connector is enabled or not.
            If set to `true` tax_connector_id will be checked.
        is_network_tokenization_enabled:
          type: boolean
          description: Indicates if network tokenization is enabled or not.
        is_click_to_pay_enabled:
          type: boolean
          description: Indicates if click to pay is enabled or not.
          default: false
          example: false
        authentication_product_ids:
          type: object
          description: Product authentication ids
          nullable: true
        card_testing_guard_config:
          allOf:
            - $ref: '#/components/schemas/CardTestingGuardConfig'
          nullable: true
        is_clear_pan_retries_enabled:
          type: boolean
          description: Indicates if clear pan retries is enabled or not.
          nullable: true
        is_debit_routing_enabled:
          type: boolean
          description: Indicates if debit routing is enabled or not
          nullable: true
        merchant_business_country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        is_iframe_redirection_enabled:
          type: boolean
          description: Indicates if the redirection has to open in the iframe
          example: false
          nullable: true
        is_external_vault_enabled:
          type: boolean
          description: Indicates if external vault is enabled or not.
          nullable: true
        external_vault_connector_details:
          allOf:
            - $ref: '#/components/schemas/ExternalVaultConnectorDetails'
          nullable: true
        merchant_category_code:
          allOf:
            - $ref: '#/components/schemas/MerchantCategoryCode'
          nullable: true
        merchant_country_code:
          allOf:
            - $ref: '#/components/schemas/MerchantCountryCode'
          nullable: true
        split_txns_enabled:
          allOf:
            - $ref: '#/components/schemas/SplitTxnsEnabled'
          default: skip
          nullable: true
        billing_processor_id:
          type: string
          description: Merchant Connector id to be stored for billing_processor connector
          nullable: true
        surcharge_connector_details:
          allOf:
            - $ref: '#/components/schemas/SurchargeConnectorDetails'
          nullable: true
        is_l2_l3_enabled:
          type: boolean
          description: >-
            Flag to enable Level 2 and Level 3 processing data for card
            transactions
          nullable: true
      additionalProperties: false
    ProfileResponse:
      type: object
      required:
        - merchant_id
        - id
        - profile_name
        - enable_payment_response_hash
        - redirect_to_merchant_with_http_post
        - is_tax_connector_enabled
        - is_network_tokenization_enabled
        - is_click_to_pay_enabled
        - is_clear_pan_retries_enabled
        - split_txns_enabled
      properties:
        merchant_id:
          type: string
          description: The identifier for Merchant Account
          example: y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
        id:
          type: string
          description: >-
            The identifier for profile. This must be used for creating merchant
            accounts, payments and payouts
          example: pro_abcdefghijklmnopqrstuvwxyz
          maxLength: 64
        profile_name:
          type: string
          description: Name of the profile
          maxLength: 64
        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
        enable_payment_response_hash:
          type: boolean
          description: >-
            A boolean value to indicate if payment response hash needs to be
            enabled
          default: true
          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.
          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
        webhook_details:
          allOf:
            - $ref: '#/components/schemas/WebhookDetails'
          nullable: true
        metadata:
          type: object
          description: >-
            Metadata is useful for storing additional, unstructured information
            on an object.
          nullable: true
        applepay_verified_domains:
          type: array
          items:
            type: string
          description: Verified Apple Pay domains for a particular profile
          nullable: true
        session_expiry:
          type: integer
          format: int64
          description: >-
            Client Secret Default expiry for all payments created under this
            profile
          example: 900
          nullable: true
        payment_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessPaymentLinkConfig'
          nullable: true
        authentication_connector_details:
          allOf:
            - $ref: '#/components/schemas/AuthenticationConnectorDetails'
          nullable: true
        use_billing_as_payment_method_billing:
          type: boolean
          nullable: true
        extended_card_info_config:
          allOf:
            - $ref: '#/components/schemas/ExtendedCardInfoConfig'
          nullable: true
        collect_shipping_details_from_wallet_connector_if_required:
          type: boolean
          description: >-
            A boolean value to indicate if customer shipping details needs to be
            collected from wallet

            connector only if it is required field for connector (Eg. Apple Pay,
            Google Pay etc)
          default: false
          example: false
          nullable: true
        collect_billing_details_from_wallet_connector_if_required:
          type: boolean
          description: >-
            A boolean value to indicate if customer billing details needs to be
            collected from wallet

            connector only if it is required field for connector (Eg. Apple Pay,
            Google Pay etc)
          default: false
          example: false
          nullable: true
        always_collect_shipping_details_from_wallet_connector:
          type: boolean
          description: >-
            A boolean value to indicate if customer shipping details needs to be
            collected from wallet

            connector irrespective of connector required fields (Eg. Apple pay,
            Google pay etc)
          default: false
          example: false
          nullable: true
        always_collect_billing_details_from_wallet_connector:
          type: boolean
          description: >-
            A boolean value to indicate if customer billing details needs to be
            collected from wallet

            connector irrespective of connector required fields (Eg. Apple pay,
            Google pay etc)
          default: false
          example: false
          nullable: true
        is_connector_agnostic_mit_enabled:
          type: boolean
          description: >-
            Indicates if the MIT (merchant initiated transaction) payments can
            be made connector

            agnostic, i.e., MITs may be processed through different connector
            than CIT (customer

            initiated transaction) based on the routing rules.

            If set to `false`, MIT will go through the same connector as the
            CIT.
          nullable: true
        payout_link_config:
          allOf:
            - $ref: '#/components/schemas/BusinessPayoutLinkConfig'
          nullable: true
        outgoing_webhook_custom_http_headers:
          type: object
          description: >-
            These key-value pairs are sent as additional custom headers in the
            outgoing webhook request.
          nullable: true
        order_fulfillment_time:
          type: integer
          format: int32
          description: >-
            Will be used to determine the time till which your payment will be
            active once the payment session starts
          example: 900
          nullable: true
          minimum: 0
        order_fulfillment_time_origin:
          allOf:
            - $ref: '#/components/schemas/OrderFulfillmentTimeOrigin'
          nullable: true
        tax_connector_id:
          type: string
          description: Merchant Connector id to be stored for tax_calculator connector
          nullable: true
        is_tax_connector_enabled:
          type: boolean
          description: |-
            Indicates if tax_calculator connector is enabled or not.
            If set to `true` tax_connector_id will be checked.
        is_network_tokenization_enabled:
          type: boolean
          description: Indicates if network tokenization is enabled or not.
          default: false
          example: false
        should_collect_cvv_during_payment:
          type: boolean
          description: Indicates if CVV should be collected during payment or not.
          nullable: true
        is_click_to_pay_enabled:
          type: boolean
          description: Indicates if click to pay is enabled or not.
          default: false
          example: false
        authentication_product_ids:
          type: object
          description: Product authentication ids
          nullable: true
        card_testing_guard_config:
          allOf:
            - $ref: '#/components/schemas/CardTestingGuardConfig'
          nullable: true
        is_clear_pan_retries_enabled:
          type: boolean
          description: Indicates if clear pan retries is enabled or not.
        is_debit_routing_enabled:
          type: boolean
          description: Indicates if debit routing is enabled or not
          nullable: true
        merchant_business_country:
          allOf:
            - $ref: '#/components/schemas/CountryAlpha2'
          nullable: true
        is_iframe_redirection_enabled:
          type: boolean
          description: Indicates if the redirection has to open in the iframe
          example: false
          nullable: true
        is_external_vault_enabled:
          type: boolean
          description: Indicates if external vault is enabled or not.
          nullable: true
        external_vault_connector_details:
          allOf:
            - $ref: '#/components/schemas/ExternalVaultConnectorDetails'
          nullable: true
        merchant_category_code:
          allOf:
            - $ref: '#/components/schemas/MerchantCategoryCode'
          nullable: true
        merchant_country_code:
          allOf:
            - $ref: '#/components/schemas/MerchantCountryCode'
          nullable: true
        split_txns_enabled:
          allOf:
            - $ref: '#/components/schemas/SplitTxnsEnabled'
          default: skip
        revenue_recovery_retry_algorithm_type:
          allOf:
            - $ref: '#/components/schemas/RevenueRecoveryAlgorithmType'
          nullable: true
        billing_processor_id:
          type: string
          description: Merchant Connector id to be stored for billing_processor connector
          nullable: true
        surcharge_connector_details:
          allOf:
            - $ref: '#/components/schemas/SurchargeConnectorDetails'
          nullable: true
        is_l2_l3_enabled:
          type: boolean
          description: >-
            Flag to enable Level 2 and Level 3 processing data for card
            transactions
          nullable: true
    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
    OrderFulfillmentTimeOrigin:
      type: string
      enum:
        - create
        - confirm
    BusinessPaymentLinkConfig:
      allOf:
        - $ref: '#/components/schemas/PaymentLinkConfigRequest'
        - type: object
          properties:
            domain_name:
              type: string
              description: >-
                Custom domain name to be used for hosting the link in your own
                domain
              nullable: true
            business_specific_configs:
              type: object
              description: list of configs for multi theme setup
              additionalProperties:
                $ref: '#/components/schemas/PaymentLinkConfigRequest'
              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
              nullable: true
            branding_visibility:
              type: boolean
              description: Toggle for HyperSwitch branding visibility
              nullable: true
    AuthenticationConnectorDetails:
      type: object
      required:
        - authentication_connectors
        - three_ds_requestor_url
      properties:
        authentication_connectors:
          type: array
          items:
            $ref: '#/components/schemas/AuthenticationConnectors'
          description: List of authentication connectors
        three_ds_requestor_url:
          type: string
          description: >-
            URL of the (customer service) website that will be shown to the
            shopper in case of technical errors during the 3D Secure 2 process.
        three_ds_requestor_app_url:
          type: string
          description: >-
            Merchant app declaring their URL within the CReq message so that the
            Authentication app can call the Merchant app after OOB
            authentication has occurred.
          nullable: true
    BusinessPayoutLinkConfig:
      allOf:
        - $ref: '#/components/schemas/BusinessGenericLinkConfig'
        - type: object
          properties:
            form_layout:
              allOf:
                - $ref: '#/components/schemas/UIWidgetFormLayout'
              nullable: true
            payout_test_mode:
              type: boolean
              description: >-
                Allows for removing any validations / pre-requisites which are
                necessary in a production environment
              default: false
              nullable: true
    CardTestingGuardConfig:
      type: object
      required:
        - card_ip_blocking_status
        - card_ip_blocking_threshold
        - guest_user_card_blocking_status
        - guest_user_card_blocking_threshold
        - customer_id_blocking_status
        - customer_id_blocking_threshold
        - card_testing_guard_expiry
      properties:
        card_ip_blocking_status:
          $ref: '#/components/schemas/CardTestingGuardStatus'
        card_ip_blocking_threshold:
          type: integer
          format: int32
          description: >-
            Determines the unsuccessful payment threshold for Card IP Blocking
            for profile
        guest_user_card_blocking_status:
          $ref: '#/components/schemas/CardTestingGuardStatus'
        guest_user_card_blocking_threshold:
          type: integer
          format: int32
          description: >-
            Determines the unsuccessful payment threshold for Guest User Card
            Blocking for profile
        customer_id_blocking_status:
          $ref: '#/components/schemas/CardTestingGuardStatus'
        customer_id_blocking_threshold:
          type: integer
          format: int32
          description: >-
            Determines the unsuccessful payment threshold for Customer Id
            Blocking for profile
        card_testing_guard_expiry:
          type: integer
          format: int32
          description: Determines Redis Expiry for Card Testing Guard for profile
        guest_ip_blocking_status:
          allOf:
            - $ref: '#/components/schemas/CardTestingGuardStatus'
          nullable: true
        guest_ip_blocking_threshold:
          type: integer
          format: int32
          description: >-
            Determines the unsuccessful payment threshold for Guest IP Blocking
            for profile
          default: 10
          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
    ExternalVaultConnectorDetails:
      type: object
      properties:
        vault_connector_id:
          type: string
          description: Merchant Connector id to be stored for vault connector
          nullable: true
        vault_sdk:
          allOf:
            - $ref: '#/components/schemas/VaultSdk'
          nullable: true
        vault_token_selector:
          type: array
          items:
            $ref: '#/components/schemas/VaultTokenField'
          description: Fields to tokenization in vault
          nullable: true
    MerchantCategoryCode:
      type: string
      title: 4 digit Merchant category code (MCC)
      example: '5411'
    MerchantCountryCode:
      type: string
      description: >-
        A wrapper type for merchant country codes that provides validation and
        conversion functionality.


        This type stores a country code as a string and provides methods to
        validate it

        and convert it to a `Country` enum variant.
    SplitTxnsEnabled:
      type: string
      enum:
        - enable
        - skip
    SurchargeConnectorDetails:
      type: object
      properties:
        surcharge_connector_id:
          type: string
          description: The surcharge connector ID for calculating external surcharge
          nullable: true
    ExtendedCardInfoConfig:
      type: object
      required:
        - public_key
      properties:
        public_key:
          type: string
          description: Merchant public key
        ttl_in_secs:
          type: integer
          format: int32
          description: TTL for extended card info
          default: 900
          maximum: 7200
          minimum: 0
    RevenueRecoveryAlgorithmType:
      type: string
      enum:
        - monitoring
        - smart
        - cascading
    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
    PaymentLinkConfigRequest:
      type: object
      properties:
        theme:
          type: string
          description: custom theme for the payment link
          example: '#4E6ADD'
          nullable: true
          maxLength: 255
        logo:
          type: string
          description: merchant display logo
          example: >-
            https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg
          nullable: true
          maxLength: 255
        seller_name:
          type: string
          description: Custom merchant name for payment link
          example: hyperswitch
          nullable: true
          maxLength: 255
        sdk_layout:
          type: string
          description: Custom layout for sdk
          example: accordion
          nullable: true
          maxLength: 255
        display_sdk_only:
          type: boolean
          description: Display only the sdk for payment link
          default: false
          example: true
          nullable: true
        enabled_saved_payment_method:
          type: boolean
          description: Enable saved payment method option for payment link
          default: false
          example: true
          nullable: true
        hide_card_nickname_field:
          type: boolean
          description: Hide card nickname field option for payment link
          default: false
          example: true
          nullable: true
        show_card_form_by_default:
          type: boolean
          description: Show card form by default for payment link
          default: true
          example: true
          nullable: true
        transaction_details:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLinkTransactionDetails'
          description: Dynamic details related to merchant to be rendered in payment link
          nullable: true
        background_image:
          allOf:
            - $ref: '#/components/schemas/PaymentLinkBackgroundImageConfig'
          nullable: true
        details_layout:
          allOf:
            - $ref: '#/components/schemas/PaymentLinkDetailsLayout'
          nullable: true
        payment_button_text:
          type: string
          description: Text for payment link's handle confirm button
          nullable: true
        custom_message_for_card_terms:
          type: string
          description: Text for customizing message for card terms
          nullable: true
        custom_message_for_payment_method_types:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodsConfig'
          nullable: true
        payment_button_colour:
          type: string
          description: Custom background colour for payment link's handle confirm button
          nullable: true
        skip_status_screen:
          type: boolean
          description: Skip the status screen after payment completion
          nullable: true
        payment_button_text_colour:
          type: string
          description: Custom text colour for payment link's handle confirm button
          nullable: true
        background_colour:
          type: string
          description: Custom background colour for the payment link
          nullable: true
        sdk_ui_rules:
          type: object
          description: SDK configuration rules
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          nullable: true
        payment_link_ui_rules:
          type: object
          description: Payment link configuration rules
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          nullable: true
        enable_button_only_on_form_ready:
          type: boolean
          description: >-
            Flag to enable the button only when the payment form is ready for
            submission
          nullable: true
        payment_form_header_text:
          type: string
          description: Optional header for the SDK's payment form
          nullable: true
        payment_form_label_type:
          allOf:
            - $ref: '#/components/schemas/PaymentLinkSdkLabelType'
          nullable: true
        show_card_terms:
          allOf:
            - $ref: '#/components/schemas/PaymentLinkShowSdkTerms'
          nullable: true
        is_setup_mandate_flow:
          type: boolean
          description: Boolean to control payment button text for setup mandate calls
          nullable: true
        color_icon_card_cvc_error:
          type: string
          description: Hex color for the CVC icon during error state
          nullable: true
        show_merchant_name:
          type: boolean
          description: Flag to display the merchant name in the payment link
          default: true
          example: true
          nullable: true
    AuthenticationConnectors:
      type: string
      enum:
        - threedsecureio
        - netcetera
        - gpayments
        - ctp_mastercard
        - unified_authentication_service
        - juspaythreedsserver
        - ctp_visa
        - cardinal
    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
    UIWidgetFormLayout:
      type: string
      enum:
        - tabs
        - journey
    CardTestingGuardStatus:
      type: string
      enum:
        - enabled
        - disabled
    VaultSdk:
      type: string
      enum:
        - vgs_sdk
        - hyperswitch_sdk
    VaultTokenField:
      type: object
      properties:
        token_type:
          allOf:
            - $ref: '#/components/schemas/VaultTokenType'
          nullable: true
    PaymentLinkTransactionDetails:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
          description: Key for the transaction details
          example: Policy-Number
          maxLength: 255
        value:
          type: string
          description: Value for the transaction details
          example: '297472368473924'
          maxLength: 255
        ui_configuration:
          allOf:
            - $ref: '#/components/schemas/TransactionDetailsUiConfiguration'
          nullable: true
    PaymentLinkBackgroundImageConfig:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: URL of the image
          example: https://hyperswitch.io/favicon.ico
        position:
          allOf:
            - $ref: '#/components/schemas/ElementPosition'
          nullable: true
        size:
          allOf:
            - $ref: '#/components/schemas/ElementSize'
          nullable: true
    PaymentLinkDetailsLayout:
      type: string
      enum:
        - layout1
        - layout2
    PaymentMethodsConfig:
      type: array
      items:
        $ref: '#/components/schemas/PaymentMethodConfig'
      description: List of custom T&C messages grouped by payment method
    PaymentLinkSdkLabelType:
      type: string
      enum:
        - above
        - floating
        - never
    PaymentLinkShowSdkTerms:
      type: string
      enum:
        - always
        - auto
        - never
    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
    VaultTokenType:
      type: string
      description: Fields that can be tokenized with vault
      enum:
        - card_number
        - card_cvc
        - card_expiry_year
        - card_expiry_month
        - network_token
        - network_token_expiry_year
        - network_token_expiry_month
        - network_token_cryptogram
    TransactionDetailsUiConfiguration:
      type: object
      properties:
        position:
          type: integer
          format: int32
          description: Position of the key-value pair in the UI
          example: 5
          nullable: true
        is_key_bold:
          type: boolean
          description: Whether the key should be bold
          default: false
          example: true
          nullable: true
        is_value_bold:
          type: boolean
          description: Whether the value should be bold
          default: false
          example: true
          nullable: true
    ElementPosition:
      type: string
      enum:
        - left
        - top left
        - top
        - top right
        - right
        - bottom right
        - bottom
        - bottom left
        - center
    ElementSize:
      oneOf:
        - type: object
          required:
            - Variants
          properties:
            Variants:
              $ref: '#/components/schemas/SizeVariants'
        - type: object
          required:
            - Percentage
          properties:
            Percentage:
              type: integer
              format: int32
              minimum: 0
        - type: object
          required:
            - Pixels
          properties:
            Pixels:
              type: integer
              format: int32
              minimum: 0
    PaymentMethodConfig:
      type: object
      description: Custom T&C messages for a specific payment method
      required:
        - payment_method
        - payment_method_types
      properties:
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_types:
          type: array
          items:
            $ref: '#/components/schemas/CustomTerms'
          description: Payment Method Types
          example:
            - message:
                display_mode: custom
                value: Sample message
              payment_method_type: credit
    SizeVariants:
      type: string
      enum:
        - cover
        - contain
    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
    CustomTerms:
      type: object
      description: Custom T&C message for a specific payment method type
      required:
        - payment_method_type
        - message
      properties:
        payment_method_type:
          $ref: '#/components/schemas/PaymentMethodType'
        message:
          $ref: '#/components/schemas/CustomMessage'
    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_qr
        - 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
    CustomMessage:
      type: object
      description: Custom T&C message content and display mode
      required:
        - value
      properties:
        value:
          type: string
          description: The text to be shown per payment method type
          example: I authorize Novalnet AG to debit my account.
        display_mode:
          $ref: '#/components/schemas/SdkDisplayMode'
    SdkDisplayMode:
      type: string
      description: Display mode options for controlling how messages are shown.
      enum:
        - default_sdk_message
        - custom_message
        - hidden
  securitySchemes:
    admin_api_key:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Format: `admin-api-key=<admin-api-key>`


        Admin API keys allow you to perform some privileged actions such as
        creating a merchant account and Connector account. This is only used
        during development.

````