Payments - Session token
POST /payments/session_tokens
Description
Create a payment session object or retrieve a session token from wallets.
cURL example
curl --request POST \
--url https://sandbox.hyperswitch.io/payments/session_tokens \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"payment_id": "<string>",
"client_secret": "<string>",
"wallets": [
"ach"
],
"merchant_connector_details": {
"creds_identifier": "<string>",
"encoded_data": {
"connector_account_details": {},
"metadata": {}
}
}
}
'Responses
200 (application/json)
Payment session object created or session token was retrieved from wallets.
Example response:
400
Bad request (validation or other client error).
Authorizations
api-key (header) — string — required
Request body (application/json)
payment_id (string) — required The identifier for the payment
client_secret (string) — required This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK
wallets (array of enum) — required The list of the supported wallets. Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
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
open_banking
network_token
merchant_connector_details (object) Merchant connector details used to make payments.
creds_identifier (string)
encoded_data (object)
connector_account_details (object)
metadata (object)
Response fields
payment_id (string) — required The identifier for the payment
client_secret (string) — required This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK
session_token (array of object) — required The list of session token objects. Example object fields shown in the example response above (delayed_session_token, connector, sdk_next_action, wallet_name).
If you want to propose edits or raise an issue for this doc:
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/payments/payments--session-token.mdx
Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/payments/payments--session-token