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

Query available campaigns for the selected credit card

Submits the full card number to the payment gateway and retrieves the list of available campaigns. The returned campaign list is stored in the pre-order state and used by the subsequent CampaignSelectionPage to allow the user to choose a campaign.

Required Fields:

  • card_number: The full credit card number. Spaces are stripped before validation. Must pass card number format validation.

Validation:

  • card_number must be a valid card number; all spaces are removed before the check is applied

  • If the card number is invalid, an error is returned and the user remains on CampaignListPage

State Update:

  • On success, campaigns in the pre-order is populated with the list of campaign objects returned by the payment gateway. If the gateway returns no campaigns, campaigns is set to [] (empty array).

Backward Navigation:

  • When navigating backward from this page, campaigns is reset to null, requiring the user to re-submit the card number.

Next Pages:

  • CampaignSelectionPage

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

The full credit card number. Leading, trailing, and internal spaces are stripped before validation is applied. Must be a valid card number.

Example: 5400010000000004
Responses
200

Campaign list retrieved successfully

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

"card_number='5400010000000004'"
200

Campaign list retrieved successfully

{
  "context_list": [
    {
      "page_name": "CampaignSelectionPage",
      "page_slug": "campaignselectionpage",
      "page_context": {
        "campaigns": [
          {
            "code": "CAMP001",
            "name": "3 Installments Campaign"
          },
          {
            "code": "CAMP002",
            "name": "6 Installments Campaign"
          }
        ]
      }
    }
  ],
  "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"
    },
    "campaigns": [
      {
        "code": "CAMP001",
        "name": "3 Installments Campaign"
      },
      {
        "code": "CAMP002",
        "name": "6 Installments Campaign"
      }
    ]
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?