Skip to main content
POST
/
v1
/
sdk
/
checkout-sessions
Create a checkout session
curl --request POST \
  --url https://api.example.com/v1/sdk/checkout-sessions \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerRef": "<string>",
  "productRef": "<string>",
  "planRef": "<string>",
  "returnUrl": "<string>",
  "purpose": "credit_topup"
}
'
{
  "sessionId": "e3f1c2d4b6a89f001122334455667788",
  "checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"
}

Body

application/json
customerRef
string
required
Minimum string length: 1
productRef
string
Minimum string length: 1
planRef
string
returnUrl
string
purpose
enum<string>
Available options:
credit_topup

Response

Checkout session created

sessionId
string
required

Checkout session ID/token

Example:

"e3f1c2d4b6a89f001122334455667788"

checkoutUrl
string
required

Full checkout URL based on backend configuration (ready to redirect customer)

Example:

"https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"