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

Assign Order Number and Decide 3D Secure Routing

Assigns the order number that will be sent to Masterpass and evaluates whether the transaction must be processed under 3D Secure.

Optional Fields:

  • use_three_d: Boolean flag forwarded to the 3D Secure decision rule (check_three_d_secure). When the rule resolves to true, the user will be required to complete a 3D Secure challenge before the subsequent MasterpassRestCompletePage step. Defaults to false.

Processing:

  1. The client IP is captured from the request and stored as pre_order.remote_addr.

  2. The order number is generated via pre_order.set_number().

  3. The 3D Secure decision is computed by check_three_d_secure(...) using the gateway's POS configuration, the user, the basket total, the resolved card, the BIN number, and the submitted use_three_d flag. If the gateway's merchant_type is "custom", the regular pre-order POS is used as the underlying POS and the Masterpass POS is supplied as proxy_pos; otherwise the Masterpass POS is used directly.

  4. pre_order.redirect_to_three_d is set to either true or false accordingly.

Backward Navigation:

  • On backward navigation: pre_order.remote_addr is cleared, pre_order.reset_number() is called, and redirect_to_three_d is reset to null.

Next Pages:

  • MasterpassRestCompletePage

Previous Page (computed dynamically):

  • MasterpassRemoteInstallmentPage — when the payment option's config has an installment_slug set

  • MasterpassRestInstallmentPage — otherwise

available_for_post_order: true

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
use_three_dbooleanOptional

Hint forwarded to check_three_d_secure(...). When the rule resolves to true, the user must complete a 3D Secure challenge before the subsequent MasterpassRestCompletePage step.

Default: falseExample: false
Responses
200

Order number assigned successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=MasterpassRestOrderNoPage
POST /orders/checkout/?page=MasterpassRestOrderNoPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 21

"use_three_d=false"
200

Order number assigned successfully

{
  "context_list": [
    {
      "page_name": "MasterpassRestCompletePage",
      "page_slug": "masterpassrestcompletepage",
      "page_context": {
        "msisdn": "905551234567",
        "order_no": "ORD-2026-0042",
        "three_d": false,
        "extras": {
          "user_id": "1042",
          "bank_ica": null,
          "additional_fields": {}
        }
      }
    }
  ],
  "pre_order": {
    "payment_option": {
      "pk": 7,
      "slug": "masterpass-rest",
      "payment_type": "masterpass_rest"
    },
    "number": "ORD-2026-0042",
    "remote_addr": "94.235.240.102",
    "redirect_to_three_d": false
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?