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

Accept the pre-payment agreement and enable the payment gateway

Submits the user's agreement acceptance and calls the payment gateway's enable_payment method. On success, the payment gateway is enabled and the flow advances to ConfirmationPaymentSelectedPage.

Required Fields:

  • agreement: Must be true. Submitting false returns a validation error.

State Updates:

  • On success: agreement_signed = true, agreement_required = false, agreement_id and is_agreement_expired are cleared from pre_order.data.

  • On gateway failure: agreement_signed = false

Backward Navigation:

  • When navigating backward, agreement_signed is removed from pre_order.data.

Next Pages:

  • ConfirmationPaymentSelectedPage

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 pre-payment terms and conditions and trigger the gateway's enable_payment call. Submitting false returns a validation error.

Example: true
Responses
200

Agreement accepted or error

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

Agreement accepted or error

{
  "context_list": [
    {
      "page_name": "ConfirmationPaymentSelectedPage",
      "page_slug": "confirmationpaymentselectedpage",
      "page_context": {}
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?