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

Select a checkout provider and start a hosted payment session

Selects a checkout provider for the pre-order and calls the provider's session start endpoint. On success, the pre-order receives a remote_redirect_url pointing to the provider's hosted checkout form, along with a transaction_id and conversation_id for subsequent steps.

Required Fields: checkout_provider

State Updates:

  • pre_order.checkout_provider set to the selected provider

  • pre_order.retail_store cleared

  • pre_order.delivery_option set to the first customer delivery option

  • pre_order.loyalty_amount_to_use reset to 0

  • pre_order.data['redirection_started'] = true

  • pre_order.data['remote_redirect_url'] set to the provider's hosted URL

  • pre_order.data['transaction_id'] set

  • pre_order.checkout_provider_data['conversation_id'] set

Backward Navigation:

  • Clears checkout_provider, remote_redirect_url, transaction_id, redirection_started, and checkout_provider_data from the pre-order.

Error Conditions:

  • Returns 400 with non_field_errors if the provider's session start fails.

Next Page: CheckoutProviderAddressSelectionPage

post
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>)

Body

Payload for selecting a checkout provider (e.g. Akifast) to use for the current order. The submitted provider must be available for the pre-order.

checkout_providerintegerRequired

Primary key of the checkout provider to select. Only providers that are currently available for the pre-order are accepted.

Example: 1
Responses
200

Provider selected and session started

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CheckoutProviderSelectionPage
POST /orders/checkout/?page=CheckoutProviderSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 23

"checkout_provider=1"
200

Provider selected and session started

{
  "context_list": [
    {
      "page_name": "CheckoutProviderAddressSelectionPage",
      "page_slug": "checkoutprovideraddressselectionpage",
      "page_context": {
        "redirect_url": "https://akifast.example.com/checkout/abc123",
        "is_iframe": false
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?