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

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 Express

  • transaction_id: Transaction identifier matching the one stored in the pre-order session data

  • data: JSON object containing the BKM Express payment result. Required sub-fields:

    • status: Must be "ok" for a successful payment

    • paymentPurchased: 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.status must equal "ok"

  • data.paymentPurchased must be truthy

  • data.totalAmount (after replacing , with .) must match pre_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 by BexCompletePage.

Backward Navigation:

  • When navigating backward from this page, the nonce key is removed from pre_order.data.

Next Pages:

  • BexCompletePage

available_for_post_order: true

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
order_idstringRequired

Order identifier as returned by the BKM Express callback. Corresponds to the order number assigned in BexSelectionPage.

Example: ORD-2026-0001
transaction_idstringRequired

Transaction identifier issued by BKM Express. Must match the transaction_id stored in the pre-order session data from BexSelectionPage.

Example: TXN-20260401-001
Responses
200

Nonce received and stored successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=BexNoncePage
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'}"
200

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?