Send Pay on Delivery Verification SMS
Sends a one-time verification code (OTP) to the given phone number via SMS.
Required Fields:
phone_number: Recipient's phone number, validated against the configured phone number format (User.phone_regex).
SMS Content:
A 6-digit random verification code is generated and sent to the phone number.
If a
messageformat is configured in the payment option'ssms_config, the code is embedded in the formatted message. Otherwise the code is sent as-is.
State Changes:
pre_order.phone_numberis set to the submitted phone numberpre_order.verification_codeis set to the generated 6-digit codepre_order.verification_sent_datetimeis set to the current timestamp
Next Page: VerifySmsPage
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>)
Recipient phone number for the Pay on Delivery verification SMS. Validated against the configured phone number format.
+905551234567Verification SMS sent successfully
POST /orders/checkout/?page=SendSmsPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 32
"phone_number='+905551234567'"Verification SMS sent successfully
{
"context_list": [
{
"page_name": "VerifySmsPage",
"page_slug": "verifysmspage",
"page_context": {
"verification_sent_datetime": "2024-01-15T12:00:00Z",
"seconds_left": 180,
"retry": true
}
}
],
"pre_order": {
"basket": {
"pk": 123,
"total_amount": "150.00"
},
"payment_option": {
"pk": 4,
"name": "Pay on Delivery",
"payment_type": "pay_on_delivery"
},
"phone_number": "+905551234567"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

