Submit agreement acceptance and shipping/address data from checkout provider
Accepts the customer's agreement selection along with shipping option, address, and user data forwarded from the checkout provider's hosted form. Sets the payment option to credit card, assigns the shipping option and amount, and records the selected agreement code on the pre-order.
Required Fields: basket_id, session_token, shipping_option_key, user, code
Optional Fields: shipping_address, billing_address
State Updates:
pre_order.payment_optionset to the first active credit card payment optionpre_order.payment_choiceclearedpre_order.shipping_optionset fromshipping_option_keypre_order.shipping_amountcalculated for the selected shipping optionpre_order.data['selected_agreement']set to the submittedcodepre_order.shipping_address.emailset fromuser.email
Backward Navigation:
Clears
selected_agreement,payment_option,shipping_option, and resetsshipping_amountto0.00.
Next Page: CheckoutProviderNotificationPage
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>)
Payload posted back from the checkout provider's agreement selection step. Includes the selected agreement code, shipping option, address data, and user information. Sets payment option, shipping, and records the agreement on the pre-order.
Primary key of the active basket.
42Session token issued by the checkout provider for this session.
550e8400-e29b-41d4-a716-446655440000Primary key of the selected shipping option. Must be one of the available shipping options for the pre-order's address.
1Agreement type accepted by the customer. info for the preliminary information form; sales for the distance sales agreement.
salesPossible values: Agreement data saved
POST /orders/checkout/?page=CheckoutProviderAgreementListPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 207
"basket_id=42&session_token='550e8400-e29b-41d4-a716-446655440000'&shipping_option_key=1&code='sales'&user={'akinon_user_id':'user-id-123','name':'John','surname':'Doe','email':'user@example.com'}"Agreement data saved
{
"context_list": [
{
"page_name": "CheckoutProviderNotificationPage",
"page_slug": "checkoutprovidernotificationpage",
"page_context": {
"code": "sales",
"text": "Distance Sales Agreement",
"agreement_body": "<p>Agreement content...</p>"
}
}
],
"pre_order": {
"user_email": "user@akinon.com"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

