Get Pay on Delivery Payment Choice Page context
Returns the available payment choices for a pay-on-delivery payment option. This page allows the user to select how they will pay at the point of delivery (e.g., cash, credit card terminal, etc.).
Preconditions:
Basket must not be empty
Payment option must be selected and must be of pay-on-delivery type
Skip Conditions:
Page is skipped when
is_post_orderistrue(post-order flow)Page is skipped entirely when the selected payment option's
payment_choiceslist is empty (no choices to present). In this case the flow proceeds directly toPayOnDeliveryPage.
Routing from PaymentOptionSelectionPage:
Routes here when
skip_pod_choicesisfalseand there is at least one choice, or when there is more than one choice regardless ofskip_pod_choices.When
skip_pod_choicesistrueand exactly one choice exists, the choice is auto-selected and this page is skipped.
Payment Choice Object: Each item in payment_choices contains:
value: internal identifier string used as the form valuelabel: human-readable display nameprice: additional fee charged for this payment method (as decimal string)
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>)
Pay on delivery payment choice page context retrieved
GET /orders/checkout/?page=PayOnDeliveryPaymentChoicePage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Pay on delivery payment choice page context retrieved
{
"context_list": [
{
"page_name": "PayOnDeliveryPaymentChoicePage",
"page_slug": "payondeliverypaymentchoicepage",
"page_context": {
"payment_choices": [
{
"value": "cash",
"label": "Cash",
"price": "0.00"
},
{
"value": "credit_card_terminal",
"label": "Credit Card Terminal",
"price": "5.00"
}
]
}
}
],
"pre_order": {
"basket": {
"pk": 123,
"total_amount": "150.00"
},
"payment_option": {
"pk": 4,
"name": "Pay on Delivery",
"slug": "pay-on-delivery",
"payment_type": "pay_on_delivery",
"payment_type_label": "Pay on Delivery"
},
"payment_choice": null,
"total_amount": "150.00",
"currency_type_label": "TRY"
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

