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 = trueIf agreement required:
agreement_required = truepayment_enabled: set from gateway responseagreement_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, andpayment_enabledare removed frompre_order.data.
Next Pages:
ConfirmationPaymentAgreementConfirmPage— if agreement is requiredConfirmationPaymentSelectedPage— if no agreement is required
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>)
Agreement check completed
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
""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?

