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.
Path Parameters
The identifier for payment
Query Parameters
Decider to enable or disable the connector call for retrieve request
This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK
If enabled provides list of attempts linked to payment intent
If enabled provides list of captures linked to latest attempt
Response
Gets the payment with final status
Unique identifier for the payment. This ensures idempotency for multiple payments that have been done by a single merchant.
30
"pay_mbabizu24mvu3mela5njyhpit4"
This is an identifier for the merchant account. This is inferred from the API key provided during the request
255
"merchant_1668273825"
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
The payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc.,
6540
The payment net amount. net_amount = amount + surcharge_details.surcharge_amount + surcharge_details.tax_amount + shipping_cost + order_tax_amount, If no surcharge_details, shipping_cost, order_tax_amount, net_amount = amount
6540
The amount (in minor units) that can still be captured for this payment. This is relevant when capture_method
is manual
. Once fully captured, or if capture_method
is automatic
and payment succeeded, this will be 0.
x >= 100
6540
The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYN
, BZD
, CAD
, CDF
, CHF
, CLF
, CLP
, CNY
, COP
, CRC
, CUC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, INR
, IQD
, IRR
, ISK
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRU
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLE
, SLL
, SOS
, SRD
, SSP
, STD
, STN
, SVC
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VES
, VND
, VUV
, WST
, XAF
, XCD
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWL
Indicates the type of payment method. Eg: 'card', 'wallet', etc.
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
Total number of attempts associated with this payment
The shipping cost for the payment.
6540
The total amount (in minor units) that has been captured for this payment. For fauxpay
sandbox connector, this might reflect the authorized amount if status
is succeeded
even if capture_method
was manual
.
6540
The name of the payment connector (e.g., 'stripe', 'adyen') that processed or is processing this payment.
"stripe"
A secret token unique to this payment intent. It is primarily used by client-side applications (e.g., Hyperswitch SDKs) to authenticate actions like confirming the payment or handling next actions. This secret should be handled carefully and not exposed publicly beyond its intended client-side use.
"pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo"
Timestamp indicating when this payment intent was created, in ISO 8601 format.
"2022-09-10T10:11:12Z"
The identifier for the customer object. If not provided the customer ID will be autogenerated.
This field will be deprecated soon. Please refer to customer.id
1 - 64
"cus_y3oqhf46pyzuxjbcn2giaqnb44"
Details of customer attached to this payment
An arbitrary string providing a description for the payment, often useful for display or internal record-keeping.
"It's my first payment request"
An array of refund objects associated with this payment. Empty or null if no refunds have been processed.
List of disputes that happened on this intent
List of attempts that happened on this intent
List of captures done on latest attempt
A unique identifier to link the payment to a mandate, can be used instead of payment_method_data, in case of setting up recurring payments
255
"mandate_iwer89rnjef349dni3"
Passing this object during payments creates a mandate. The mandate_type sub object is passed by the server.
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
Set to true to indicate that the customer is not in your checkout flow during this payment, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. This parameter can only be used with confirm=true.
true
A timestamp (ISO 8601 code) that determines when the payment should be captured.
Providing this field will automatically set capture
to true
"2022-09-10T10:11:12Z"
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
Provide a reference to a stored payment method
"187282ab-40ef-47a9-9206-5099ba31e432"
Information about the product , quantity and amount for connectors. (e.g. Klarna)
"[{\n \"product_name\": \"gillete creme\",\n \"quantity\": 15,\n \"amount\" : 900\n }]"
description: The customer's email address
This field will be deprecated soon. Please refer to customer.email
object
255
"johntest@test.com"
description: The customer's name
This field will be deprecated soon. Please refer to customer.name
object
255
"John Test"
The customer's phone number
This field will be deprecated soon. Please refer to customer.phone
object
255
"9123456789"
The URL to redirect after the completion of the operation
"https://hyperswitch.io"
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
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.
255
"Hyperswitch Router"
Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor.
255
"Payment for shoes purchase"
Contains the url for redirection flow
If the payment intent was cancelled, this field provides a textual reason for the cancellation (e.g., "requested_by_customer", "abandoned").
The connector-specific error code from the last failed payment attempt associated with this payment intent.
"E0001"
A human-readable error message from the last failed payment attempt associated with this payment intent.
"Failed while verifying the card"
error code unified across the connectors is received here if there was an error while calling connector
error message unified across the connectors is received here if there was an error while calling connector
To indicate the type of payment experience that the customer would go through
redirect_to_url
, invoke_sdk_client
, display_qr_code
, one_click
, link_wallet
, invoke_payment_app
, display_wait_screen
, collect_otp
Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
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
, 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
, paypal
, paze
, pix
, pay_safe_card
, przelewy24
, prompt_pay
, pse
, red_compra
, red_pagos
, samsung_pay
, sepa
, sepa_bank_transfer
, skrill
, sofort
, swish
, touch_n_go
, trustly
, twint
, upi_collect
, upi_intent
, 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
A label identifying the specific merchant connector account (MCA) used for this payment. This often combines the connector name, business country, and a custom label (e.g., "stripe_US_primary").
"stripe_US_food"
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
The label identifying the specific business unit or profile under which this payment was processed by the merchant.
An optional sub-label for further categorization of the business unit or profile used for this payment.
Allowed Payment Method Types for a given PaymentIntent
ephemeral_key for the customer_id mentioned
If true the payment can be retried with same or different payment method which means the confirm call can be made again.
A unique identifier for a payment provided by the connector
"993672945374576J"
frm message is an object sent inside the payments response...when frm is invoked, its value is Some(...), else its None
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
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
reference(Identifier) to the payment at connector side
"993672945374576J"
The business profile that is associated with this payment
Details of surcharge applied on this payment, if applicable
Denotes the action(approve or reject) taken by merchant in case of manual review. Manual review can occur when the transaction is marked as risky by the frm_processor, payment processor or when there is underpayment/over payment incase of crypto payment
Identifier of the connector ( merchant connector account ) which was chosen to make the payment
If true, incremental authorization can be performed on this payment, in case the funds authorized initially fall short.
Total number of authorizations happened in an incremental_authorization payment
List of incremental authorizations happened to the payment
Details of external authentication
Flag indicating if external 3ds authentication is made or not
Date Time for expiry of the payment
"2022-09-10T10:11:12Z"
Payment Fingerprint, to identify a particular card. It is a 20 character long alphanumeric code.
Browser information to be used for 3DS 2.0
Describes the channel through which the payment was initiated.
ecommerce
A unique identifier for the payment method used in this payment. If the payment method was saved or tokenized, this ID can be used to reference it for future transactions or recurring payments.
The network transaction ID is a unique identifier for the transaction as recognized by the payment network (e.g., Visa, Mastercard), this ID can be used to reference it for future transactions or recurring payments.
Payment Method Status
active
, inactive
, processing
, awaiting_data
Date time at which payment was updated
"2022-09-10T10:11:12Z"
Charge Information
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. FRM Metadata is useful for storing additional, structured information on an object related to FRM.
flag that indicates if extended authorization is applied on this payment or not
Optional boolean value to extent authorization period of this payment
capture method must be manual or manual_multiple
date and time after which this payment cannot be captured
Merchant's identifier for the payment/invoice. This will be sent to the connector if the connector provides support to accept multiple reference ids. In case the connector supports only one reference id, Hyperswitch's Payment ID will be sent as reference.
255
"Custom_Order_id_123"
This Unit struct represents MinorUnit in which core amount works
Connector Identifier for the payment method
Indicates the method by which a card is discovered during a payment
manual
, saved_card
, click_to_pay
Indicates if 3ds challenge is forced
Indicates if 3ds challenge is triggered
Error code received from the issuer in case of failed payments
Error message received from the issuer in case of failed payments
Indicates if the redirection has to open in the iframe
Contains whole connector response
Allow partial authorization for this payment
Bool indicating if overcapture must be requested for this payment
Boolean indicating whether overcapture is effectively enabled for this payment
Boolean flag indicating whether this payment method is stored and has been previously used for payments
true