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

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_order is true (post-order flow)

  • Page is skipped entirely when the selected payment option's payment_choices list is empty (no choices to present). In this case the flow proceeds directly to PayOnDeliveryPage.

Routing from PaymentOptionSelectionPage:

  • Routes here when skip_pod_choices is false and there is at least one choice, or when there is more than one choice regardless of skip_pod_choices.

  • When skip_pod_choices is true and 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 value

  • label: human-readable display name

  • price: additional fee charged for this payment method (as decimal string)

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

Pay on delivery payment choice page context retrieved

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

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?