Submit BKM Express Nonce (BKM Widget Callback)
Receives and stores the payment result (nonce) returned by the BKM Express JS widget after the user completes the payment on the BKM side.
This endpoint is called by the BKM Express JS widget callback, not directly by the end user.
Required Fields:
order_id: Order identifier as returned by BKM Expresstransaction_id: Transaction identifier matching the one stored in the pre-order session datadata: JSON object containing the BKM Express payment result. Required sub-fields:status: Must be"ok"for a successful paymentpaymentPurchased: Must be truthy (indicates payment was charged)totalAmount: Decimal string with comma as decimal separator (e.g.,"159,99"). Validated against the current pre-order total with interest.
Validation:
data.statusmust equal"ok"data.paymentPurchasedmust be truthydata.totalAmount(after replacing,with.) must matchpre_order.get_total_amount_with_interest()
State Update:
The validated nonce data is stored in cache under a key derived from
pre_order.basket.get_hash(). This cached value is later consumed byBexCompletePage.
Backward Navigation:
When navigating backward from this page, the
noncekey is removed frompre_order.data.
Next Pages:
BexCompletePage
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>)
Order identifier as returned by the BKM Express callback. Corresponds
to the order number assigned in BexSelectionPage.
ORD-2026-0001Transaction identifier issued by BKM Express. Must match the
transaction_id stored in the pre-order session data from BexSelectionPage.
TXN-20260401-001Nonce received and stored successfully
POST /orders/checkout/?page=BexNoncePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 134
"order_id='ORD-2026-0001'&transaction_id='TXN-20260401-001'&data={'status':'ok','paymentPurchased':true,'totalAmount':'165,99'}"Nonce received and stored successfully
{
"context_list": [
{
"page_name": "BexCompletePage",
"page_slug": "bexcompletepage",
"page_context": {}
}
],
"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": "165.59",
"currency_type_label": "TRY"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

