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

Get Masterpass Complete Page context

Returns the context required to drive the final Masterpass payment request from the client. The context contains the MSISDN, the order number, the 3D Secure routing flag, signed request tokens for the Masterpass JS SDK, and a set of gateway-specific extras.

Preconditions:

  • Basket must not be empty

  • Payment option must be of Masterpass type

  • Card information must be present

  • An installment must be selected

  • Order number must have been generated

  • The 3D Secure routing decision must have been made

Page Context:

  • msisdn: The user's phone number in E.164 format (e.g. "905551234567"). null for guest checkouts or when the user has no phone number on file.

  • order_no: The previously assigned order number. For payment gateways with a custom merchant type this value may differ from the raw pre_order.number.

  • three_d: true when a 3D Secure challenge is required for this transaction, false otherwise.

  • token: A signed request token for the Masterpass JS SDK, generated with the user's identity (user ID and MSISDN) when the customer is logged in. When provisioning is enabled for the payment option, the provision flag is included.

  • direct_token: A variant of the above token where the MSISDN is set to null, used for direct and guest purchase flows.

  • extras: Gateway-specific data (installment, amounts, addresses, user information) forwarded to the Masterpass JS SDK.

Step Completion:

  • This page is considered already completed when the order has been finalised.

available_for_post_order: true

get
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>)

Responses
200

Masterpass complete page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=MasterpassCompletePage
GET /orders/checkout/?page=MasterpassCompletePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
200

Masterpass complete page context retrieved

{
  "context_list": [
    {
      "page_name": "MasterpassCompletePage",
      "page_slug": "masterpasscompletepage",
      "page_context": {
        "msisdn": "905551234567",
        "order_no": "ORD-2026-0042",
        "three_d": true,
        "token": "signed-token-abc123",
        "direct_token": "signed-direct-token-xyz789",
        "extras": {
          "user_id": "1042",
          "bank_ica": "9999",
          "additional_fields": {}
        }
      }
    }
  ],
  "pre_order": {
    "payment_option": {
      "pk": 5,
      "slug": "masterpass",
      "payment_type": "masterpass"
    },
    "number": "ORD-2026-0042",
    "total_amount": "165.59",
    "currency_type_label": "TRY"
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?