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

Get Payment Option Selection Page context

Returns available payment options for the order. Payment options are filtered based on configured rules and user context.

Preconditions:

  • Shipping option must be selected (check_shipping_option_selected)

  • Basket must not be empty

Payment Option Availability:

  • Each payment option has associated rules that determine availability

  • Rules can check basket contents, user status, order amount, and more

  • Unavailable options are returned separately with error codes and messages

Checkout URLs:

  • checkout_url: URL for checkout with token (used for external payment flows)

  • status_url: URL to check checkout status (used for polling payment status)

  • Generated by CheckoutWithTokenService

Payment Types: Payment options can have different types that determine the next page flow:

  • credit_card: Routes to BinNumberPage

  • funds_transfer: Routes to FundsTransferChoicePage

  • bkm_express: Routes to BexSelectionPage

  • loyalty_money: Routes to LoyaltyMoneyPage

  • cash_register: Routes to CashRegisterPage

  • gpay: Routes to GPaySelectionPage

  • redirection: Routes to RedirectionPaymentSelectedPage

  • stored_card: Routes to MobilExpressSelectionPage

  • masterpass: Routes to MasterpassBinNumberPage

  • masterpass_rest: Routes to MasterpassRestBinNumberPage

  • credit_payment: Routes to CreditPaymentSelectionPage

  • pay_later: Routes to PayLaterCompletePage

  • saved_card: Routes to SavedCardSelectionPage

  • confirmation: Routes to ConfirmationPaymentAgreementCheckPage

  • b2b: Routes to B2BPage

  • wallet: Routes to WalletSelectionPage

  • pay_on_delivery: Routes to PayOnDeliveryPaymentChoicePage or PayOnDeliveryPage

  • gift_card: Routes to GiftCardPaymentPage

Gift Card Payment Option: The gift_card payment option appears in the available options list only when all of the following are true:

  • At least one gift card reservation exists on the order

  • The remaining unpaid amount is exactly zero (gift cards fully cover the order)

When gift cards only partially cover the order total, the gift_card payment option is not shown. In this case the user selects a regular payment option (e.g. credit card). During order placement the applied gift card amounts are charged first; the remaining balance is then charged to the selected payment method.

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

Payment option selection page context retrieved

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

Payment option selection page context retrieved

{
  "context_list": [
    {
      "page_name": "PaymentOptionSelectionPage",
      "page_slug": "paymentoptionselectionpage",
      "page_context": {
        "checkout_url": "https://sandbox.akinon.com/orders/checkout/?token=abc123def456",
        "status_url": "https://sandbox.akinon.com/orders/checkout/status/?token=abc123def456",
        "payment_options": [
          {
            "pk": 1,
            "name": "Credit Card",
            "slug": "credit-card",
            "payment_type": "credit_card",
            "payment_type_label": "Credit Card"
          },
          {
            "pk": 2,
            "name": "Pay on Delivery",
            "slug": "pay-on-delivery",
            "payment_type": "pay_on_delivery",
            "payment_type_label": "Pay on Delivery"
          },
          {
            "pk": 3,
            "name": "Bank Transfer",
            "slug": "bank-transfer",
            "payment_type": "funds_transfer",
            "payment_type_label": "Bank Transfer"
          }
        ],
        "unavailable_options": [
          {
            "name": "Loyalty Points",
            "slug": "loyalty-points",
            "payment_type": "loyalty_money",
            "payment_type_label": "Loyalty Points",
            "error_code": "insufficient_balance",
            "error_message": "Insufficient loyalty points balance"
          }
        ]
      }
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "150.00"
    },
    "shipping_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@akinon.com",
      "phone_number": "+15551234567",
      "line": "123 Main St",
      "country": {
        "pk": 1,
        "code": "US",
        "name": "United States"
      },
      "city": {
        "pk": 1,
        "name": "New York"
      },
      "township": {
        "pk": 1,
        "name": "Manhattan"
      }
    },
    "billing_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe"
    },
    "billing_and_shipping_same": true,
    "delivery_option": {
      "pk": 1,
      "name": "Home Delivery",
      "slug": "home-delivery",
      "delivery_option_type": "customer",
      "sort_order": 1
    },
    "shipping_option": {
      "pk": 1,
      "name": "Standard Shipping",
      "slug": "standard-shipping",
      "logo": "https://cdn.akinon.com/logos/standard.png",
      "shipping_amount": "9.99",
      "description": "Delivery in 3-5 business days",
      "kwargs": {}
    },
    "shipping_amount": "9.99",
    "payment_option": null,
    "notifications": [],
    "total_amount": "159.99",
    "unpaid_amount": "159.99",
    "loyalty_money": null,
    "currency_type_label": "USD",
    "installment": null,
    "redirect_to_three_d": null,
    "retail_store": null,
    "payment_choice": null,
    "user_email": "john@akinon.com",
    "phone_number": "+15551234567",
    "user_phone_number": "+15551234567",
    "gift_box": null,
    "delivery_range": null,
    "total_amount_with_interest": "159.99",
    "is_guest": false,
    "is_post_order": false,
    "data_source_shipping_options": null,
    "attribute_based_shipping_options": null
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?