Skip to main content
POST
/
api
/
v1
/
billing
/
checkout
/
sessions
Create checkout session
curl --request POST \
  --url https://api.myrouter.example/api/v1/billing/checkout/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "currency": "<string>",
  "success_url": "<string>",
  "cancel_url": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "url": "<string>",
    "status": "<string>",
    "payment_status": "<string>",
    "amount_total": "<string>",
    "currency": "<string>"
  },
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-request-id
string

Optional caller request id.

Body

application/json
amount
string
required

Top-up amount.

currency
string
required

Payment currency.

success_url
string<uri>
required

Return URL after successful checkout.

cancel_url
string<uri>
required

Return URL after cancelled checkout.

Response

Create checkout session response.

data
object
required

Checkout session.

request_id
string

Request id.