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

Initiate BKM Express Session

Accepts the terms and conditions and initiates a BKM Express session by calling the BKM Express API to obtain a one-time ticket.

Required Fields:

  • agreement: Must be true. Submitting false or omitting this field causes a validation error.

Validation:

  • Basket amount must be greater than zero

Processing:

  1. An order number is assigned to the pre-order (pre_order.set_number())

  2. BexService.one_time_ticket() is called with the order number, total amount (with interest), user information, and remote address

  3. On success: path, token, and transaction_id from the BKM response are stored in pre_order.data and the transaction_id is mapped to the pre-order hash in cache

  4. On failure: order number is reset and a non_field_errors error is returned

Next Pages:

  • BexBinNumberPage — on success

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
agreementboolean · enumRequired

User must accept terms and conditions to proceed. Must be true.

Possible values:
Responses
200

BKM Express session initiated successfully

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

"agreement=true"
200

BKM Express session initiated successfully

{
  "context_list": [
    {
      "page_name": "BexBinNumberPage",
      "page_slug": "bexbinnumberpage",
      "page_context": {
        "path": "/bex/payment/path",
        "token": "bex-session-token-abc123",
        "transaction_id": "TXN-20260401-001"
      }
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "150.00"
    },
    "payment_option": {
      "pk": 5,
      "name": "BKM Express",
      "slug": "bkm-express",
      "payment_type": "bkm_express",
      "payment_type_label": "BKM Express"
    },
    "number": "ORD-2026-0001",
    "total_amount": "159.99",
    "currency_type_label": "TRY"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?