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

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

application/json

Response

200
application/json

Payment created

The response is of type object.