Get Reward List Page context
Returns the context for the Reward List Page, which collects the user's full credit card details and queries the payment gateway for available rewards. This page is only reachable when a credit card payment option is selected, card info is present in the pre-order, and the active gateway has rewards enabled. This is an independent page — submitting it does not advance the checkout flow.
Preconditions:
Basket must not be empty
A credit card payment option must be selected (
check_credit_card_selected)Card information must be present in the pre-order (
card_infois populated)The active payment gateway must have
enable_rewards = trueandhas_rewards()returningtrue
Skip Conditions:
Page is skipped if reward data has already been fetched (i.e.,
rewardsis notnullin pre-order)
Next Pages:
RewardSelectionPage— always, after reward data is fetched
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>)
Reward List Page context retrieved
GET /orders/checkout/?page=RewardListPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Reward List Page context retrieved
{
"context_list": [
{
"page_name": "RewardListPage",
"page_slug": "rewardlistpage",
"page_context": {}
}
],
"pre_order": {
"user_email": "user@akinon.com",
"payment_option": {
"pk": 3,
"name": "Credit Card",
"slug": "credit-card",
"payment_type": "credit_card",
"payment_type_label": "Credit Card"
},
"rewards": null
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

