Authorizations
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Body
The identifier for the customer
32 - 64
"12345_cus_01926c58bc6e77c09e809964e72af8c8"
Unique identifier for the payment. This ensures idempotency for multiple payments that have been done by a single merchant.
30
"pay_mbabizu24mvu3mela5njyhpit4"
The routing algorithm id to be used for the payment
Specifies how the payment is captured.
automatic
: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.manual
: Funds are authorized but not captured. A separate request to the/payments/{payment_id}/capture
endpoint is required to capture the funds.
automatic
, manual
, manual_multiple
, scheduled
, sequential_automatic
Specifies the type of cardholder authentication to be applied for a payment.
ThreeDs
: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.NoThreeDs
: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.
Note: The actual authentication behavior can also be influenced by merchant configuration and specific connector defaults. Some connectors might still enforce 3DS or bypass it regardless of this parameter.
three_ds
, no_three_ds
Set to present
to indicate that the customer is in your checkout flow during this payment, and therefore is able to authenticate. This parameter should be absent
when merchant's doing merchant initiated payments and customer is not present while doing the payment.
present
, absent
A description for the payment
"It's my first payment request"
The URL to which you want the user to be redirected after the completion of the payment operation
"https://hyperswitch.io"
Specifies how the payment method can be used for future payments.
off_session
: The payment method can be used for future payments when the customer is not present.on_session
: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults toon_session
.
off_session
, on_session
Apply
, Skip
For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
22
"Hyperswitch Router"
Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount
"[{\n \"product_name\": \"Apple iPhone 16\",\n \"quantity\": 1,\n \"amount\" : 69000\n \"product_img_link\" : \"https://dummy-img-link.com\"\n }]"
Use this parameter to restrict the Payment Method Types to show for a given PaymentIntent
Metadata is useful for storing additional, unstructured information on an object.
Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find specific details in the child attributes below.
additional data that might be required by hyperswitch
Whether payment link is requested to be enabled or not for this transaction
Enable
, Skip
true
, false
, default
Will be used to expire client secret after certain amount of time to be supplied in seconds, if not sent it will be taken from profile config (900) for 15 mins
x >= 0
900
Additional data related to some frm(Fraud Risk Management) connectors
Whether 3ds authentication is requested or not
Enable
, Skip
Indicates if 3ds challenge is forced
Merchant connector details
Response
Payment created
Global Payment Id for the payment
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).
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
, conflicted
, expired
It's a token used for client side verification.
"cs_0195b34da95d75239c6a4bf514458896"
The identifier for the profile. This is inferred from the x-profile-id
header
Specifies how the payment is captured.
automatic
: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.manual
: Funds are authorized but not captured. A separate request to the/payments/{payment_id}/capture
endpoint is required to capture the funds.
automatic
, manual
, manual_multiple
, scheduled
, sequential_automatic
The identifier for the customer
32 - 64
"12345_cus_01926c58bc6e77c09e809964e72af8c8"
Set to present
to indicate that the customer is in your checkout flow during this payment, and therefore is able to authenticate. This parameter should be absent
when merchant's doing merchant initiated payments and customer is not present while doing the payment.
present
, absent
Specifies how the payment method can be used for future payments.
off_session
: The payment method can be used for future payments when the customer is not present.on_session
: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults toon_session
.
off_session
, on_session
Apply
, Skip
Whether payment link is requested to be enabled or not for this transaction
Enable
, Skip
true
, false
, default
enable
, skip
Will be used to expire client secret after certain amount of time to be supplied in seconds
Whether 3ds authentication is requested or not
Enable
, Skip
The type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.
normal
, new_mandate
, setup_mandate
, recurring_mandate
Unique identifier for the payment. This ensures idempotency for multiple payments that have been done by a single merchant.
30
"pay_mbabizu24mvu3mela5njyhpit4"
The routing algorithm id to be used for the payment
Specifies the type of cardholder authentication to be applied for a payment.
ThreeDs
: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.NoThreeDs
: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.
Note: The actual authentication behavior can also be influenced by merchant configuration and specific connector defaults. Some connectors might still enforce 3DS or bypass it regardless of this parameter.
three_ds
, no_three_ds
A description for the payment
"It's my first payment request"
The URL to which you want the user to be redirected after the completion of the payment operation
"https://hyperswitch.io"
For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
22
"Hyperswitch Router"
Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount
"[{\n \"product_name\": \"Apple iPhone 16\",\n \"quantity\": 1,\n \"amount\" : 69000\n \"product_img_link\" : \"https://dummy-img-link.com\"\n }]"
Use this parameter to restrict the Payment Method Types to show for a given PaymentIntent
Metadata is useful for storing additional, unstructured information on an object.
Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find specific details in the child attributes below.
additional data that might be required by hyperswitch
Additional data related to some frm(Fraud Risk Management) connectors