Token Checkout

Token-based checkout flow endpoints

Initiate Token-Based Checkout

get

Initiates a checkout session using a pre-generated token.

Token Generation

Tokens are generated during the standard checkout flow on the PaymentOptionSelectionPage. The token URLs (checkout_url and status_url) are included in that page's response.

Token generation requirements:

  1. The request must be from an in-store (kiosk) device (client_type: instore)

  2. User must be authenticated, OR the CHECKOUT_WITH_TOKEN_ALLOW_ANONYMOUS setting must be enabled

  3. A valid session must exist

If these conditions are not met, no token URLs are generated.

How It Works

  1. Validates the token and retrieves the associated basket/user.

  2. If user is anonymous, validates the one_time_token query parameter.

  3. Logs in the user (if authenticated) and redirects to the checkout page.

  4. Sets the client type to instore for analytics tracking.

Configuration:

Setting
Type
Default
Description

CHECKOUT_WITH_TOKEN_ALLOW_ANONYMOUS

boolean

false

Allows anonymous users to use token-based checkout. Can be changed via Admin Panel (Dynamic Setting).

Use Cases:

  • In-store kiosk checkout (customer scans QR code to complete purchase on their phone)

  • QR code-based checkout

  • Email/SMS checkout links

Path parameters
tokenstringRequired

The checkout token (UUID format).

Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Responses
get
/orders/checkout-with-token/{token}/

No content

Check Token Checkout Order Status

get

Checks whether an order has been created for the basket associated with the token.

Business Logic:

  • Retrieves the basket associated with the token.

  • Checks if the basket status is submitted (order created).

  • Returns the order number if the order exists.

Use Cases:

  • Polling from external systems to check order completion.

  • In-store kiosk status display.

  • Real-time order tracking from POS systems.

Path parameters
tokenstringRequired

The checkout token (UUID format).

Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Responses
200

Order status

application/json
get
/orders/checkout-with-token/{token}/status/

Last updated

Was this helpful?