Confirm credit payment and initiate gateway redirect
Accepts the user's agreement and initiates the payment redirect via payment_strategy.start_redirect(). On success, a redirect_url is stored in the pre-order for the frontend to redirect the user to the payment gateway.
Required Fields:
agreement: User must accept the terms and conditions. Must betrue.
Validation:
agreementmust betrue.Basket amount must be greater than zero.
State Update:
pre_order.data['redirection_started']is set totrue.pre_order.data['is_redirected']is set tofalse.pre_order.data['redirect_url']is set to the gateway redirect URL.pre_order.data['remote_redirect_url']andpre_order.data['token']may also be set.
Backward Navigation:
When navigating backward,
redirection_started,is_redirected,redirect_url, andtokenare removed frompre_order.data.
Next Pages:
CreditPaymentCompletePage
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>)
User must accept the terms and conditions to initiate the payment redirect. Must be true.
Redirect initiated or error
POST /orders/checkout/?page=CreditPaymentConfirmationPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18
"agreement=true"Redirect initiated or error
{
"context_list": [
{
"page_name": "CreditPaymentCompletePage",
"page_slug": "creditpaymentcompletepage",
"page_context": {
"redirect_url": "https://payment.gateway.com/pay?token=abc123",
"is_iframe": false
}
}
],
"pre_order": {
"user_email": "user@akinon.com"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

