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 betrue. This is the standard checkout order agreement (same field used across all payment methods viaOrderAgreementInputSerializer), not the gateway-specific pre-payment agreement accepted in the precedingConfirmationPaymentAgreementConfirmPage. Submittingfalsereturns 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_paygateway): additional Apple Pay payment data fields may be submitted.For all other gateways: only
agreementis required.
State Updates:
token: set from gateway responseuser_confirmation_waiting = truecontext_data: set if gateway response includes acontextfieldPrevious
token,user_confirmation_waiting,user_confirmedvalues are cleared before the new payment is initiated
Backward Navigation:
When navigating backward,
user_confirmation_waitingandtokenare cleared, and the order number is reset.
Next Pages:
ConfirmationPaymentQueryPage
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>)
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.
truePayment initiated or error
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"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?

