Get Masterpass REST Complete Page context
Returns the context required to drive the final Masterpass REST payment request from the client. The context contains the MSISDN, the order number, the 3D Secure routing flag, and a set of gateway-specific extras that are passed through to the Masterpass JS SDK.
Preconditions:
Basket must not be empty
Payment option must be Masterpass REST (
check_masterpass_selected)Card information must be present (
check_card_info_not_empty)An installment must be selected (
check_installment_selected)Order number must have been generated (
check_order_no_generated)pre_order.redirect_to_three_dmust be set (check_redirect_to_three_d_not_none)
Page Context:
msisdn: The user's phone number formatted with the country code, obtained frompayment_gateway._get_msisdn(...).order_no: The previously assignedpre_order.number.three_d:pre_order.redirect_to_three_d—trueif a 3D Secure challenge is required, otherwisefalse.extras:user_id: The user's PK as a string.nullfor guest checkouts.bank_ica: ACQ ICA value when the gateway'smerchant_typeis"custom"(resolved viapayment_gateway.get_pos_config(vpos)).nullfor non-custom gateways.additional_fields: Free-form dict returned bypayment_gateway.get_additional_fields(...). Includes user, billing/shipping addresses, remote address, the total with interest, and reward state.
Step Completion:
is_already_donereturnstruewhen the order is finalised (pre_order.order_finalized()istrue).
available_for_post_order: true
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>)
Masterpass REST complete page context retrieved
GET /orders/checkout/?page=MasterpassRestCompletePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Masterpass REST complete page context retrieved
{
"context_list": [
{
"page_name": "MasterpassRestCompletePage",
"page_slug": "masterpassrestcompletepage",
"page_context": {
"msisdn": "905551234567",
"order_no": "ORD-2026-0042",
"three_d": true,
"extras": {
"user_id": "1042",
"bank_ica": "9999",
"additional_fields": {}
}
}
}
],
"pre_order": {
"payment_option": {
"pk": 7,
"slug": "masterpass-rest",
"payment_type": "masterpass_rest"
},
"number": "ORD-2026-0042",
"total_amount": "165.59",
"currency_type_label": "TRY"
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

