Get Send SMS Page context (Pay on Delivery phone verification)
Returns the context for the phone number collection step in the pay-on-delivery flow. This page is part of the pay-on-delivery verification sequence and appears between PayOnDeliveryPaymentChoicePage and VerifySmsPage, before the user reaches PayOnDeliveryPage. The user is asked to enter their phone number to receive a one-time verification code.
Preconditions:
Pay-on-delivery payment option must be selected (
check_pay_on_delivery_selected)If the payment option has any
payment_choices, one must already be selected
Skip Conditions:
Page is skipped when
sms_verificationisfalsein the payment option's configuration. In that case the flow proceeds directly toPayOnDeliveryPage.
Page Context:
verification: Whether SMS verification is enabled for this payment option. This will always betruewhen this page is reached (skipped otherwise).
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>)
Send SMS page context retrieved
GET /orders/checkout/?page=SendSmsPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Send SMS page context retrieved
{
"context_list": [
{
"page_name": "SendSmsPage",
"page_slug": "sendsmspage",
"page_context": {
"verification": true
}
}
],
"pre_order": {
"basket": {
"pk": 123,
"total_amount": "150.00"
},
"payment_option": {
"pk": 4,
"name": "Pay on Delivery",
"slug": "pay-on-delivery",
"payment_type": "pay_on_delivery",
"payment_type_label": "Pay on Delivery"
},
"phone_number": null
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

