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

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 be true.

Validation:

  • agreement must be true.

  • Basket amount must be greater than zero.

State Update:

  • pre_order.data['redirection_started'] is set to true.

  • pre_order.data['is_redirected'] is set to false.

  • pre_order.data['redirect_url'] is set to the gateway redirect URL.

  • pre_order.data['remote_redirect_url'] and pre_order.data['token'] may also be set.

Backward Navigation:

  • When navigating backward, redirection_started, is_redirected, redirect_url, and token are removed from pre_order.data.

Next Pages:

  • CreditPaymentCompletePage

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
agreementboolean · enumRequired

User must accept the terms and conditions to initiate the payment redirect. Must be true.

Possible values:
Responses
200

Redirect initiated or error

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

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?