Send User's Billing and Shipping Addresses
Sets the billing and shipping addresses for the order.
Configuration:
REMOTE_PRICE_ATTRIBUTE_KEY: Product attribute key (default:"has_remote_price") that indicates a product requires remote price calculation. If any basket item has this attribute set to"true", the checkout flow routes toRemotePriceCalculationPageafter address selection.IDENTITY_NUMBER_REQUIRED_AMOUNT: Order amount threshold that requires identity number validation. If set and order total (with interest) exceeds this amount, shipping address must haveidentity_numberfield populated, otherwise validation fails.DEFAULT_COUNTRY_CODE: Default country code used to populate country field in address contexts.
Remote Price Detection:
Checks if any basket item has
REMOTE_PRICE_ATTRIBUTE_KEYattribute set to"true"If detected, routes to
RemotePriceCalculationPagenext
Next Pages:
If remote price calculation needed:
RemotePriceCalculationPageOtherwise: Shipping option selection page
Validation:
If
IDENTITY_NUMBER_REQUIRED_AMOUNTis set and order total exceeds threshold, shipping address must haveidentity_numberpopulated
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>)
Primary key of the billing address
Primary key of the shipping address
Addresses set successfully
POST /orders/checkout/?page=AddressSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 44
"billing_address=10&shipping_address=10"Addresses set successfully
{
"context_list": [
{
"page_name": "ShippingOptionSelectionPage",
"page_slug": "shippingoptionselectionpage",
"page_context": {
"shipping_options": [
{
"pk": 1,
"name": "Standard Shipping"
}
]
}
}
],
"pre_order": {
"shipping_address": {
"pk": 10,
"first_name": "John",
"last_name": "Doe"
},
"billing_address": {
"pk": 10
},
"billing_and_shipping_same": true,
"delivery_option": {
"pk": 1,
"name": "Home Delivery"
}
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

