Create checkout session
Basket
Create checkout session
Creates a checkout session and returns the URL the client should redirect the user to.
Use this as the final “continue to payment” step from basket/checkout pages.
What this endpoint checks before creating a session:
- listing availability and purchasability
- seller authorization constraints
- basket consistency at checkout time
Response behavior:
- On success: returns a checkout URL.
- On failure: returns listing-level validation errors for unavailable/invalid items.
Heads up:
- Requires authentication.
POST
Create checkout session
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the basket to retrieve
Body
application/json
The URL to redirect to after a successful payment. A ?purchase= query parameter will be appended to this URL containing the ID of the resulting purchase.
Response
The response containing the checkout URL
The URL to redirect the user to for checkout