Submit payment confirmation
Calls the payment gateway's query_payment method. The behavior and required input differ significantly by gateway:
TomPay: No input required.
start_paymentsent a push notification to the user's TomPay mobile app. The frontend submits this endpoint repeatedly (with an empty body) until the user approves in the app. While waiting, the gateway returnsresult.code = 3039which maps toerror_code: not_confirmed_yet.Paycell: Requires
otp.start_paymentsent an OTP SMS to the user's phone. The user enters the OTP and submits once — this is a single submission, not repeated polling.PosAs Gift Card: Requires
customer_card_noandpassword. The user enters their gift card number and PIN and submits once.Apple Pay / default: No input required.
Response error codes:
not_confirmed_yet: Gateway is still waiting for the user to confirm (applicable to TomPay). Frontend should retry.generic_error: An unrecoverable error occurred. Token and order number are cleared; the user must restart fromConfirmationPaymentSelectedPage.
State Updates (on success):
user_confirmed = trueFor PosAs Gift Card:
customer_card_no,customer_id, andcodeare also stored.tokenmay be updated if the gateway returns a new token.
Backward Navigation:
When navigating backward,
user_confirmed,customer_card_no,customer_id, andcodeare removed frompre_order.data.
Next Pages:
ConfirmationPaymentCompletePage
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>)
Gateway-dependent input for the confirmation payment polling step. Most gateways (TomPay, Apple Pay, default) require no fields — submit an empty body for those. Gateway-specific fields are listed below.
Paycell only. 4-digit one-time password sent to the user's registered
phone number. Required when the active gateway is paycell.
1234PosAs Gift Card only. The gift card number. Required when the active
gateway is posas_giftcard.
1234567890123456PosAs Gift Card only. 4-digit PIN for the gift card. Required when the
active gateway is posas_giftcard. Must consist of exactly 4 digits.
1234Pattern: ^\d{4}$Payment query result
POST /orders/checkout/?page=ConfirmationPaymentQueryPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 2
""Payment query result
{
"context_list": [
{
"page_name": "ConfirmationPaymentCompletePage",
"page_slug": "confirmationpaymentcompletepage",
"page_context": {}
}
],
"pre_order": {
"user_email": "user@akinon.com"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

