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

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_payment sent 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 returns result.code = 3039 which maps to error_code: not_confirmed_yet.

  • Paycell: Requires otp. start_payment sent 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_no and password. 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 from ConfirmationPaymentSelectedPage.

State Updates (on success):

  • user_confirmed = true

  • For PosAs Gift Card: customer_card_no, customer_id, and code are also stored.

  • token may be updated if the gateway returns a new token.

Backward Navigation:

  • When navigating backward, user_confirmed, customer_card_no, customer_id, and code are removed from pre_order.data.

Next Pages:

  • ConfirmationPaymentCompletePage

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

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.

otpstring · min: 4 · max: 4Optional

Paycell only. 4-digit one-time password sent to the user's registered phone number. Required when the active gateway is paycell.

Example: 1234
customer_card_nostring · max: 16Optional

PosAs Gift Card only. The gift card number. Required when the active gateway is posas_giftcard.

Example: 1234567890123456
passwordstringOptional

PosAs Gift Card only. 4-digit PIN for the gift card. Required when the active gateway is posas_giftcard. Must consist of exactly 4 digits.

Example: 1234Pattern: ^\d{4}$
Responses
200

Payment query result

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

""
200

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?