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 toBinNumberPagefunds_transfer: Routes toFundsTransferChoicePagebkm_express: Routes toBexSelectionPageloyalty_money: Routes toLoyaltyMoneyPagecash_register: Routes toCashRegisterPagegpay: Routes toGPaySelectionPageredirection: Routes toRedirectionPaymentSelectedPagestored_card: Routes toMobilExpressSelectionPagemasterpass: Routes toMasterpassBinNumberPagemasterpass_rest: Routes toMasterpassRestBinNumberPagecredit_payment: Routes toCreditPaymentSelectionPagepay_later: Routes toPayLaterCompletePagesaved_card: Routes toSavedCardSelectionPageconfirmation: Routes toConfirmationPaymentAgreementCheckPageb2b: Routes toB2BPagewallet: Routes toWalletSelectionPagepay_on_delivery: Routes toPayOnDeliveryPaymentChoicePageorPayOnDeliveryPagegift_card: Routes toGiftCardPaymentPage
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.
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>)
Payment option selection page context retrieved
GET /orders/checkout/?page=PaymentOptionSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
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?

