Skip to main content
POST
/
payments
curl --request POST \
--url https://sandbox.hyperswitch.io/payments \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"amount": 6540,
"currency": "USD"
}'
{
"amount": 6540,
"amount_capturable": 6540,
"attempt_count": 1,
"client_secret": "pay_syxxxxxxxxxxxx_secret_szzzzzzzzzzz",
"created": "2023-10-26T10:00:00Z",
"currency": "USD",
"expires_on": "2023-10-26T10:15:00Z",
"merchant_id": "merchant_myyyyyyyyyyyy",
"payment_id": "pay_syxxxxxxxxxxxx",
"profile_id": "pro_pzzzzzzzzzzz",
"status": "requires_payment_method"
}
Use the dropdown on the top right corner of the code snippet to try out different payment scenarios.

Authorizations

api-key
string
header
required

Body

application/json
amount
integer
required
Required range: x >= 0
currency
enum<string>
required
Available options:
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
order_tax_amount
integer | null
Example:
amount_to_capture
integer | null
Example:
shipping_cost
integer | null
Example:
payment_id
string | null
Required string length: 30
Example:
routing
object
  • Single
  • Priority
  • VolumeSplit
connector
enum<string>[] | null
Example:
capture_method
enum<string>
Available options:
automatic,
manual,
manual_multiple,
scheduled,
sequential_automatic
authentication_type
enum<string>
default:three_ds
Available options:
three_ds,
no_three_ds
billing
object
confirm
boolean | null
default:false
Example:
customer
object
customer_id
string | null
Required string length: 1 - 64
Example:
off_session
boolean | null
Example:
description
string | null
Example:
return_url
string | null
Maximum length: 2048
Example:
setup_future_usage
enum<string>
Available options:
off_session,
on_session
payment_method_data
object
  • Card
  • CardRedirect
  • Wallet
  • PayLater
  • BankRedirect
  • BankDebit
  • BankTransfer
  • RealTimePayment
  • Crypto
  • Upi
  • Voucher
  • GiftCard
  • CardToken
  • OpenBanking
  • MobilePayment
payment_method
enum<string>
Available options:
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
payment_token
string | null
Example:
shipping
object
statement_descriptor_name
string | null
deprecated
Maximum length: 255
Example:
statement_descriptor_suffix
string | null
deprecated
Maximum length: 255
Example:
order_details
object[] | null
Example:
mandate_data
object
customer_acceptance
object
mandate_id
string | null
Maximum length: 64
Example:
browser_info
object
payment_experience
enum<string>
Available options:
redirect_to_url,
invoke_sdk_client,
display_qr_code,
one_click,
link_wallet,
invoke_payment_app,
display_wait_screen,
collect_otp
payment_method_type
enum<string>
Available options:
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,
payjustnow,
paypal,
paze,
pix,
pay_safe_card,
przelewy24,
prompt_pay,
pse,
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
business_country
enum<string>
Available options:
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
business_label
string | null
Example:
merchant_connector_details
object
allowed_payment_method_types
enum<string>[] | null
metadata
object | null
connector_metadata
object
Example:
profile_id
string | null
surcharge_details
object
payment_type
enum<string>
Available options:
normal,
new_mandate,
setup_mandate,
recurring_mandate
request_incremental_authorization
boolean | null
session_expiry
integer | null
Required range: x >= 0
Example:
frm_metadata
object | null
request_external_three_ds_authentication
boolean | null
Example:
three_ds_data
object
recurring_details
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
split_payments
object
  • Option 1
  • Option 2
  • Option 3
request_extended_authorization
boolean | null
default:false
merchant_order_reference_id
string | null
Maximum length: 255
Example:
skip_external_tax_calculation
boolean | null
psd2_sca_exemption_type
enum<string>
Available options:
low_value,
transaction_risk_analysis
ctp_service_details
object
force_3ds_challenge
boolean | null
threeds_method_comp_ind
enum<string>
Available options:
Y,
N,
U
is_iframe_redirection_enabled
boolean | null
all_keys_required
boolean | null
payment_channel
Available options:
ecommerce
tax_status
enum<string>
Available options:
taxable,
exempt
discount_amount
integer | null
Example:
shipping_amount_tax
integer
duty_amount
integer
order_date
string<date-time> | null
enable_partial_authorization
boolean | null
default:false
enable_overcapture
boolean | null
Example:
is_stored_credential
boolean | null
Example:
mit_category
enum<string>
Available options:
installment,
unscheduled,
recurring,
resubmission
billing_descriptor
object
tokenization
enum<string>
Available options:
skip_psp,
tokenize_at_psp
partner_merchant_identifier_details
object

Response

payment_id
string
required
Required string length: 30
Example:
merchant_id
string
required
Maximum length: 255
Example:
status
enum<string>
default:requires_confirmation
required
Available options:
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
amount
integer
required
Example:
net_amount
integer
required
Example:
amount_capturable
integer
required
Required range: x >= 100
Example:
currency
enum<string>
required
Available options:
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
payment_method
enum<string>
required
Available options:
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
attempt_count
integer
required
shipping_cost
integer | null
Example:
amount_received
integer | null
Example:
connector
string | null
Example:
client_secret
string | null
Example:
created
string<date-time> | null
Example:
customer_id
string | null
deprecated
Required string length: 1 - 64
Example:
description
string | null
Example:
refunds
object[] | null
disputes
object[] | null
attempts
object[] | null
captures
object[] | null
mandate_id
string | null
Maximum length: 255
Example:
mandate_data
object
setup_future_usage
enum<string>
Available options:
off_session,
on_session
off_session
boolean | null
Example:
capture_method
enum<string>
Available options:
automatic,
manual,
manual_multiple,
scheduled,
sequential_automatic
payment_method_data
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17
payment_token
string | null
Example:
shipping
object
billing
object
order_details
object[] | null
Example:
email
string | null
deprecated
Maximum length: 255
Example:
name
string | null
deprecated
Maximum length: 255
Example:
phone
string | null
deprecated
Maximum length: 255
Example:
return_url
string | null
Example:
authentication_type
enum<string>
default:three_ds
Available options:
three_ds,
no_three_ds
statement_descriptor_name
string | null
Maximum length: 255
Example:
statement_descriptor_suffix
string | null
Maximum length: 255
Example:
next_action
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
cancellation_reason
string | null
error_code
string | null
Example:
error_message
string | null
Example:
payment_experience
enum<string>
Available options:
redirect_to_url,
invoke_sdk_client,
display_qr_code,
one_click,
link_wallet,
invoke_payment_app,
display_wait_screen,
collect_otp
payment_method_type
enum<string>
Available options:
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,
payjustnow,
paypal,
paze,
pix,
pay_safe_card,
przelewy24,
prompt_pay,
pse,
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
connector_label
string | null
Example:
business_country
enum<string>
Available options:
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
business_label
string | null
business_sub_label
string | null
allowed_payment_method_types
enum<string>[] | null
ephemeral_key
object
manual_retry_allowed
boolean | null
connector_transaction_id
string | null
Example:
frm_message
object
metadata
object | null
connector_metadata
object
feature_metadata
object
reference_id
string | null
Example:
profile_id
string | null
surcharge_details
object
merchant_decision
string | null
merchant_connector_id
string | null
incremental_authorization_allowed
boolean | null
authorization_count
integer | null
incremental_authorizations
object[] | null
external_authentication_details
object
external_3ds_authentication_attempted
boolean | null
expires_on
string<date-time> | null
Example:
fingerprint
string | null
browser_info
object
payment_channel
Available options:
ecommerce
payment_method_id
string | null
network_transaction_id
string | null
payment_method_status
enum<string>
Available options:
active,
inactive,
processing,
awaiting_data
updated
string<date-time> | null
Example:
split_payments
object
  • Option 1
  • Option 2
  • Option 3
frm_metadata
object | null
extended_authorization_applied
boolean | null
extended_authorization_last_applied_at
string<date-time> | null
Example:
request_extended_authorization
boolean | null
default:false
capture_before
string<date-time> | null
merchant_order_reference_id
string | null
Maximum length: 255
Example:
order_tax_amount
integer
connector_mandate_id
string | null
card_discovery
enum<string>
Available options:
manual,
saved_card,
click_to_pay
force_3ds_challenge
boolean | null
force_3ds_challenge_trigger
boolean | null
issuer_error_code
string | null
issuer_error_message
string | null
is_iframe_redirection_enabled
boolean | null
whole_connector_response
string | null
enable_partial_authorization
boolean | null
default:false
enable_overcapture
boolean | null
is_overcapture_enabled
boolean | null
network_details
object
is_stored_credential
boolean | null
Example:
mit_category
enum<string>
Available options:
installment,
unscheduled,
recurring,
resubmission
billing_descriptor
object
tokenization
enum<string>
Available options:
skip_psp,
tokenize_at_psp
partner_merchant_identifier_details
object
payment_method_tokenization_details
object