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

Query available rewards for the selected credit card

Submits the full credit card details to the payment gateway and retrieves the list of available rewards. The returned reward list is stored in pre_order.rewards and used by the subsequent RewardSelectionPage. This is an independent page — submitting it does not advance the checkout flow.

Required Fields:

  • card_number: Full credit card number. Spaces are stripped before validation.

  • card_month: Card expiry month.

  • card_year: Card expiry year (4 digits).

  • card_cvv: Card security code.

Optional Fields:

  • card_holder: Cardholder name.

  • card_name: Alias or label for the card.

Validation:

  • card_number must be a valid card number (spaces stripped before check)

  • card_month must be a valid month value

  • card_year must be a 4-digit valid year

  • card_cvv must be a valid CVV format

  • Card must not be expired

State Update:

  • On success, rewards in the pre-order is populated with the list of reward objects returned by the gateway. If the gateway returns no rewards, rewards may be set to an empty list.

Backward Navigation:

  • When navigating backward from this page, rewards is reset to null.

Next Pages:

  • RewardSelectionPage

post
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>)

Body
card_numberstringRequired

Full credit card number. Leading, trailing, and internal spaces are stripped before validation. Must pass card number format validation.

Example: 5400010000000004
card_monthstringRequired

Card expiry month. Must be a valid month value.

Example: 12
card_yearstring · min: 4 · max: 4Required

Card expiry year (4 digits). Must be a valid future year.

Example: 2027
card_cvvstringRequired

Card security code (CVV/CVC). Must pass CVV format validation.

Example: 123
card_holderstringOptional

Cardholder full name. Optional.

Example: John Doe
card_namestring · nullableOptional

Optional alias or label for the card.

Example: My Main Card
Responses
200

Rewards retrieved or validation error

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=RewardListPage
POST /orders/checkout/?page=RewardListPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 88

"card_number='5400010000000004'&card_month='12'&card_year='2027'&card_cvv='123'"
200

Rewards retrieved or validation error

{
  "context_list": [
    {
      "page_name": "RewardSelectionPage",
      "page_slug": "rewardselectionpage",
      "page_context": {
        "rewards": [
          {
            "amount": "50.00",
            "type": "general"
          },
          {
            "amount": "30.00",
            "type": "special"
          }
        ]
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com",
    "rewards": [
      {
        "amount": "50.00",
        "type": "general"
      },
      {
        "amount": "30.00",
        "type": "special"
      }
    ]
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?