Submit address data received from the checkout provider's hosted form
Accepts address data sent by the checkout provider's hosted page (via callback or iframe postback) and saves it as the shipping and billing addresses on the pre-order. The address fields use the provider's format and are mapped to internal address structures.
Required Fields: basket_id, session_token, shipping_address, billing_address
State Updates:
pre_order.shipping_addressset fromshipping_addresspayloadpre_order.billing_addressset frombilling_addresspayload
Backward Navigation:
Clears
billing_addressandshipping_addressfrom the pre-order.
Next Page: CheckoutProviderShippingOptionPage
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>)
Address data posted back from the checkout provider's hosted address form. Both shipping and billing addresses must be provided in the provider's format.
Primary key of the active basket.
42Session token issued by the checkout provider for this session.
550e8400-e29b-41d4-a716-446655440000Address data saved
POST /orders/checkout/?page=CheckoutProviderAddressSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 718
"basket_id=42&session_token='550e8400-e29b-41d4-a716-446655440000'&shipping_address={'name':'John','surname':'Doe','phone_number':'+905551234567','address_title':'Home','line':'123 Main Street','hash_data':'abc123hash','country':{'name':'Turkey','code':'TR'},'city':{'name':'Istanbul','code':'34'},'town':{'name':'Besiktas','code':'34022'},'district':{'name':'Levent','code':'340220001'}}&billing_address={'name':'John','surname':'Doe','phone_number':'+905551234567','address_title':'Home','line':'123 Main Street','hash_data':'def456hash','country':{'name':'Turkey','code':'TR'},'city':{'name':'Istanbul','code':'34'},'town':{'name':'Besiktas','code':'34022'},'district':{'name':'Levent','code':'340220001'}}"Address data saved
{
"context_list": [
{
"page_name": "CheckoutProviderShippingOptionPage",
"page_slug": "checkoutprovidershippingoptionpage",
"page_context": {
"shipping_options": [
{
"name": "Standard Shipping",
"slug": "standard-shipping",
"logo_url": "https://cdn.example.com/shipping-logo.png",
"shipping_amount": "9.90",
"description": "Delivery in 3-5 days",
"key": 1
}
]
}
}
],
"pre_order": {
"user_email": "user@akinon.com"
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

