Submit Index Page (email and phone)
Submits user email and optional phone number for guest checkout. After successful submission, the system routes to the next appropriate page.
Configuration:
CAN_GUEST_PURCHASE: Controls whether guest checkout is allowed. Iffalse, user must be authenticated.USER_PHONE_FORMAT: Phone number format used for display hints and validation guidance (default:"05999999999")
Next Pages (determined dynamically):
If multiple delivery options exist:
DeliveryOptionSelectionPageIf scheduled delivery is active:
SlotSelectionPageOtherwise:
AddressSelectionPage
Guest phone verification (optional)
When the checkout-phone purpose is enabled in VERIFICATION_TOKEN_CONF, a guest submitting a phone_number must first prove they own it with an SMS code. Authenticated users are never affected, and neither is a guest who submits no phone_number.
Flow, before calling this endpoint:
POST /users/verification/init/with{"purpose": "checkout-phone", "channel": "sms", "target": "<the number>"}— returnsrequest_idand sends the SMS. Bothpurposeandchannelare fixed for this flow; the backend accepts no channel other thansmshere, so no channel picker is needed.POST /users/verification/verify/with the samepurpose,channelandtarget, plusrequest_idandcode— returnsverification_token.Submit this page with that token in the
X-Verification-Tokenheader.
See the Verification & Step-up API document for those two endpoints.
The token must travel in the header. Unlike the DRF endpoints, this checkout view does not parse a verification_token body field.
Failure is reported as HTTP 200. An unverified number does not produce a 4xx: the response is 200 with errors.verification_token populated (["Phone number is not verified."]) and pre_order.phone_number left unset. Always inspect errors on the response instead of relying on the status code, and route the user back to the OTP step when that key is present.
The token is single-use, and burnt only on success. Re-submitting the same page after a different validation error does not consume it. Once the step succeeds the number is remembered for the session, so going back and re-submitting the same number needs no new verification — changing the number does.
The step cannot be skipped. While the number is unverified this step counts as neither valid nor done, so requesting a later page (e.g. ?page=AddressSelectionPage) routes back to IndexPage rather than advancing. Do not treat a context_list entry for IndexPage after such a request as an error — it means the guest still owes the verification.
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Single-use token from POST /users/verification/verify/, proving a guest
owns the submitted phone_number. Required only when the checkout-phone
purpose is enabled and a guest submits a phone number that is not already
verified in this session. Must be sent as a header — this view does not
read a verification_token body field.
User email address. Required for guest checkout.
Optional phone number. Must match phone regex pattern if provided.
When the checkout-phone purpose is enabled, a guest must prove
ownership of this number with an SMS code first and pass the resulting
token in X-Verification-Token; the same value must be used as the
target throughout that flow.
Email submitted successfully
POST /orders/checkout/?page=IndexPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 62
"user_email='user@akinon.com'&phone_number='+15551234567'"Email submitted successfully
{
"context_list": [
{
"page_name": "DeliveryOptionSelectionPage",
"page_slug": "deliveryoptionselectionpage",
"page_context": {
"delivery_options": [
{
"pk": 1,
"name": "Home Delivery",
"delivery_option_type": "customer",
"is_active": true
}
]
}
}
],
"pre_order": {
"user_email": "user@akinon.com",
"phone_number": "+15551234567"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

