Open a checkout session

Opens a hosted checkout session for a cart on one of your sales channels. Send your customer to the url it answers with: once they have paid they are redirected to redirect_confirm_url with the new order's id appended as order_id, and if they give up, to redirect_cancel_url. A session that is not paid for by expires_at can no longer be paid.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The cart, the sales channel it is sold through, and where to send the customer afterwards.

integer
required
100000 to 999999

The sales channel the sale is made through: the six-digit id shown on the channel's card in the TribiPay panel. Your API key covers every one of your channels, so each session names its own.

uri
required
length ≤ 2048
^https://

Where the customer is sent after paying, with order_id added to its query string. Must be https.

uri
required
length ≤ 2048
^https://

Where the customer is sent if they leave the checkout without paying. Must be https.

uri | null
^https://

Optional. Where the signed order.created webhook is posted once the order exists. Must be https, on a public host: an IP address or a name that resolves to a private, loopback or reserved address is refused. Redirects are not followed. Leave it out to poll GET /checkout/{id} instead.

total_amount
object
required

The full price before any discount: the sum of every item price and every additional service, to the cent. A total that does not add up is refused with a 422 that says what it should be. Your own discount goes in discount, not here.

additional_services
array of objects

Optional. Services you sell beside the cart. Each is part of total_amount, and is given the unlimited discount of the customer's level but never a Tribikey.

additional_services
discount
object

Optional. Your own discount on the whole sale.

items
object
required

The cart, grouped by category. Send at least one category that is not empty; a category left out or sent empty is not stored. Product ids are your own and are kept as sent — they are not checked against your product feed. A field that is not described here is refused with a 422 under its own path.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json