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

Check whether a pre-payment agreement is required

Calls the payment gateway's agreement check. Based on the response, the pre-order is updated with agreement_required, payment_enabled, and optionally agreement_id and is_agreement_expired.

Required Fields: (none — submitting with an empty body is sufficient)

State Updates:

  • If no agreement required: agreement_required = false, payment_enabled = true

  • If agreement required:

    • agreement_required = true

    • payment_enabled: set from gateway response

    • agreement_id: set from gateway response (if present)

    • is_agreement_expired: set from gateway response (if present)

Backward Navigation:

  • When navigating backward, agreement_required, agreement_id, is_agreement_expired, and payment_enabled are removed from pre_order.data.

Next Pages:

  • ConfirmationPaymentAgreementConfirmPage — if agreement is required

  • ConfirmationPaymentSelectedPage — if no agreement is required

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
objectOptional
Responses
200

Agreement check completed

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

""
200

Agreement check completed

{
  "context_list": [
    {
      "page_name": "ConfirmationPaymentSelectedPage",
      "page_slug": "confirmationpaymentselectedpage",
      "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?