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 betrue. Submittingfalseor omitting this field causes a validation error.
Validation:
Basket amount must be greater than zero
Processing:
An order number is assigned to the pre-order (
pre_order.set_number())BexService.one_time_ticket()is called with the order number, total amount (with interest), user information, and remote addressOn success:
path,token, andtransaction_idfrom the BKM response are stored inpre_order.dataand thetransaction_idis mapped to the pre-order hash in cacheOn failure: order number is reset and a
non_field_errorserror is returned
Next Pages:
BexBinNumberPage— on success
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>)
User must accept terms and conditions to proceed. Must be true.
BKM Express session initiated successfully
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"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?

