For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Loyalty Money Usage Page context

Returns the user's available loyalty money balance and a breakdown of account groups by label, enabling the user to specify how much loyalty money to apply toward the current order. This page runs as an independent step, meaning it does not reset or block other checkout steps and can be submitted at any point once the precondition is satisfied.

Preconditions:

  • The LOYALTY_MONEY_ENABLED dynamic setting must be true

Skip Conditions:

  • None

Configuration:

  • LOYALTY_MONEY_ENABLED: Controls whether the loyalty money feature is active during checkout. Defaults to false. When false, this page is excluded from the checkout flow entirely.

Next Pages:

  • This is an independent step and does not determine the next checkout page. The checkout flow proceeds based on the current checkout state.

get
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Responses
200

Loyalty Money Usage Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=LoyaltyMoneyUsagePage
GET /orders/checkout/?page=LoyaltyMoneyUsagePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
200

Loyalty Money Usage Page context retrieved

{
  "context_list": [
    {
      "page_name": "LoyaltyMoneyUsagePage",
      "page_slug": "loyaltymoneyusagepage",
      "page_context": {
        "balance": "85.00",
        "accounts": [
          {
            "label_id": 1,
            "label": "Welcome Bonus",
            "balance": "25.00",
            "currency": "try"
          },
          {
            "label_id": 2,
            "label": "Birthday Bonus",
            "balance": "20.00",
            "currency": "try"
          },
          {
            "label_id": null,
            "label": null,
            "balance": "40.00",
            "currency": "try"
          }
        ]
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com",
    "loyalty_amount_to_use": null
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?