POST
/
api
/
checkout
/
v2
/
payment_session
curl --request POST \
  --url https://api.sprintcheckout.com/api/checkout/v2/payment_session \
  --header 'Content-Type: application/json' \
  --header 'X-SC-ApiKey: <x-sc-apikey>' \
  --data '{
  "orderType": "STATIC",
  "amount": 100.5,
  "minAmount": 100.5,
  "editable": true,
  "currency": "USD",
  "orderId": "inv-00010",
  "successUrl": "<string>",
  "cancelUrl": "<string>"
}'
{
  "sessionId": "<string>",
  "redirectUrl": "<string>"
}

Headers

X-SC-ApiKey
string
required

Get an Api Key from Sprintcheckout Dashboard > Get paid

Body

application/json
orderType
string | null

An order can be STATIC or TRANSIENT (default behavior). A static order will not expire. A typical example could be a donation scenario. A transient order will not be reusable once is paid.

amount
number
required

Amount of the purchase

minAmount
number | null

Minimum amount of the payment

editable
boolean | null

Is the payment input editable in UI?

currency
string
required

Three letter FIAT currency code

orderId
string | null

Unique reference of the order on your ecommerce platform

successUrl
string | null

URL where the user will be redirected from the hosted payment page on a successful payment

cancelUrl
string | null

URL where the user will be redirected from the hosted payment page on a canceled payment

Response

201 - application/json
sessionId
string

Session unique identifier

redirectUrl
string

Payment session URL that will redirect to the Sprintcheckout dApp