Create a checkout session
POST /v1/checkout/sessions
POST
/v1/checkout/sessions
Creates a hosted checkout session and returns a one-time public URL. The customer tops up their wallet (eSewa/Khalti) and authorizes the subscription there. Listen for subscription.created to fulfil.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” Idempotency-Key
required
string
A client-generated unique key (UUID recommended). Required on all POST/PATCH/DELETE. Retrying with the same key returns the original response for 24 hours.
Request Body required
Section titled “Request Body required ”object
priceId
required
string
price_01ARZ3NDEKTSV4RRFFQ69G5FAY customerId
Optional — pre-bind to an existing customer.
string
successUrl
string format: uri
cancelUrl
string format: uri
metadata
Up to 50 key/value string pairs you can attach to an object. Trile ignores them; they’re returned on every read.
object
key
additional properties
string
{ "internal_user_id": "42"}Responses
Section titled “ Responses ”Session created.
object
id
string
cs_01ARZ3NDEKTSV4RRFFQ69G5FB9 token
One-time token embedded in the public URL.
string
publicUrl
string format: uri
https://checkout.trile.app/cs_...