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

Get Pay on Delivery Page context

Returns the confirmation page for a pay-on-delivery order. The user reviews the order and accepts the terms and conditions before the order is created.

Preconditions:

  • Basket must not be empty

  • Payment option must be pay-on-delivery type

  • If the payment option has payment_choices configured, a choice must already have been selected (via PayOnDeliveryPaymentChoicePage)

  • If the payment option has sms_verification: true in its configuration, the user must have completed SMS verification (phone number entered, code sent and entered correctly)

Page Context:

  • Returns an empty object {}. All order summary information is available in the pre_order field of the response.

Skip Conditions:

  • Page is skipped when is_post_order is true (post-order flow)

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 page context retrieved

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

Pay on delivery page context retrieved

{
  "context_list": [
    {
      "page_name": "PayOnDeliveryPage",
      "page_slug": "payondeliverypage",
      "page_context": {}
    }
  ],
  "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",
      "delivery_option_type": "customer"
    },
    "shipping_option": {
      "pk": 2,
      "name": "Standard Shipping",
      "slug": "standard-shipping",
      "shipping_amount": "9.99",
      "logo": null,
      "description": null,
      "kwargs": {}
    },
    "shipping_amount": "9.99",
    "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": {
      "value": "cash",
      "label": "Cash",
      "price": "0.00"
    },
    "total_amount": "159.99",
    "unpaid_amount": "159.99",
    "total_amount_with_interest": "159.99",
    "currency_type_label": "TRY",
    "installment": null,
    "card_info": null
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?