For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 message format is configured in the payment option's sms_config, the code is embedded in the formatted message. Otherwise the code is sent as-is.

State Changes:

  • pre_order.phone_number is set to the submitted phone number

  • pre_order.verification_code is set to the generated 6-digit code

  • pre_order.verification_sent_datetime is set to the current timestamp

Next Page: VerifySmsPage

post
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Body
phone_numberstringRequired

Recipient phone number for the Pay on Delivery verification SMS. Validated against the configured phone number format.

Example: +905551234567
Responses
200

Verification SMS sent successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=SendSmsPage
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'"
200

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?