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

Get Masterpass REST BIN Number Page context

Returns the context for the Masterpass REST BIN number page. The card details are collected on the client side via the Masterpass JS SDK; only the BIN (and a flag indicating whether the card is a stored Masterpass card) is sent back to the server so it can identify the card type and determine the available installment options.

Preconditions:

  • Basket must not be empty

  • Payment option must be of Masterpass REST type (is_masterpass_rest())

Page Context:

  • Returns an empty object {}. No additional data is exposed at GET time — the card data flow runs through the Masterpass JS SDK.

Step Completion: This page is considered already completed (is_already_done) when both of the following are true:

  • pre_order.card_info is populated, and

  • The selected payment option is Masterpass REST.

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 REST BIN number page context retrieved

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

Masterpass REST BIN number page context retrieved

{
  "context_list": [
    {
      "page_name": "MasterpassRestBinNumberPage",
      "page_slug": "masterpassrestbinnumberpage",
      "page_context": {}
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "150.00"
    },
    "payment_option": {
      "pk": 7,
      "name": "Masterpass",
      "slug": "masterpass-rest",
      "payment_type": "masterpass_rest",
      "payment_type_label": "Masterpass"
    },
    "card_info": null,
    "total_amount": "159.99",
    "currency_type_label": "TRY"
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?