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

Initiate confirmation payment and obtain a gateway token

Submits the standard checkout order agreement and calls the payment gateway's start_payment method. On success, the gateway returns a token which is stored in pre_order.data['token'] and the flow advances to the query (polling) step.

Required Fields:

  • agreement: Must be true. This is the standard checkout order agreement (same field used across all payment methods via OrderAgreementInputSerializer), not the gateway-specific pre-payment agreement accepted in the preceding ConfirmationPaymentAgreementConfirmPage. Submitting false returns a validation error. The user must also be a registered (non-anonymous) user with a valid phone number.

Gateway Variants:

  • For Apple Pay (checkout_apple_pay gateway): additional Apple Pay payment data fields may be submitted.

  • For all other gateways: only agreement is required.

State Updates:

  • token: set from gateway response

  • user_confirmation_waiting = true

  • context_data: set if gateway response includes a context field

  • Previous token, user_confirmation_waiting, user_confirmed values are cleared before the new payment is initiated

Backward Navigation:

  • When navigating backward, user_confirmation_waiting and token are cleared, and the order number is reset.

Next Pages:

  • ConfirmationPaymentQueryPage

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
agreementbooleanRequired

Must be true to accept the standard checkout order agreement (OrderAgreementInputSerializer) and initiate the confirmation payment via the gateway's start_payment call. This is distinct from the gateway-specific pre-payment agreement accepted in ConfirmationPaymentAgreementConfirmPage. The user must also be a registered (non-anonymous) user with a valid phone number. Submitting false returns a validation error.

Example: true
Responses
200

Payment initiated or error

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=ConfirmationPaymentSelectedPage
POST /orders/checkout/?page=ConfirmationPaymentSelectedPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18

"agreement=true"
200

Payment initiated or error

{
  "context_list": [
    {
      "page_name": "ConfirmationPaymentQueryPage",
      "page_slug": "confirmationpaymentquerypage",
      "page_context": {}
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com",
    "payment_option": {
      "pk": 5,
      "name": "Confirmation Payment",
      "slug": "confirmation-payment",
      "payment_type": "confirmation",
      "payment_type_label": "Confirmation From User"
    }
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?