Get Loyalty Card Page context
Returns the user's loyalty card balance and redeemable points information, enabling the user to select how many loyalty card points to apply toward the current order. This page runs as an independent step and is also available after order placement (available_for_post_order: true).
The redeemable amount displayed to the user is automatically capped so that the remaining order total does not fall below the MINIMUM_ORDER_AMOUNT threshold. The total available points on the card (loyalty_total_amount) and the effective redeemable amount after cap (loyalty_amount) may therefore differ.
If the user has no active loyalty card, all amount fields return 0 or null and card_number is null.
Preconditions:
User must be authenticated and have an active loyalty card associated with their account
Skip Conditions:
None
Configuration:
CUSTOMER_LOYALTY_CARD_SERVICE: Object — configures the custom service implementation that retrieves available loyalty card points and the optionalminimum_basket_amount_for_redeemthreshold.MINIMUM_ORDER_AMOUNT: Decimal — the minimum order amount that must remain after loyalty card redemption. The redeemable points are capped atbasket_total - MINIMUM_ORDER_AMOUNT.
Next Pages:
This is an independent step and does not determine the next checkout page.
available_for_post_order: true
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>)
Loyalty Card Page context retrieved
GET /orders/checkout/?page=LoyaltyCardPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Loyalty Card Page context retrieved
{
"context_list": [
{
"page_name": "LoyaltyCardPage",
"page_slug": "loyaltycardpage",
"page_context": {
"loyalty_total_amount": "50.00",
"loyalty_amount": "40.00",
"card_number": "1231234",
"applied_amount": "0.00",
"minimum_basket_amount": "50.00"
}
}
],
"pre_order": {
"user_email": "user@akinon.com"
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

