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

Entry & Address

Checkout Entry & Address

Start a checkout session and collect delivery information from your customers. These endpoints handle session initialization, delivery address selection, order notes, B2B account settings, and the entry point for external checkout providers.

Authentication

These endpoints support both authenticated and anonymous sessions.

  • Authenticated users: Session cookie (sessionid) tracks checkout progress.

  • Anonymous users: Guest checkout is available when the CAN_GUEST_PURCHASE setting is enabled.

Request Format

Include the following header in all checkout requests:

  • x-requested-with: XMLHttpRequest

Dynamic Settings

CAN_GUEST_PURCHASE

Controls whether unauthenticated users can proceed through checkout. When disabled, unauthenticated users are redirected to the login page.

GIFT_BOX_CONFIGURATIONS

Controls whether the gift box option is shown during checkout entry. Set is_active to true and provide a product sku to enable.

DEFAULT_COUNTRY_CODE

Default country used to pre-populate the country field in the address selection form.

REMOTE_PRICE_ATTRIBUTE_KEY

Product attribute key that flags items requiring remote price calculation. When any basket item carries this attribute, the flow redirects to the remote price calculation step after address selection.

IDENTITY_NUMBER_REQUIRED_AMOUNT

When set, orders exceeding this total amount require a valid identity number in the shipping address before proceeding.

USER_PHONE_FORMAT

Display format used as a placeholder for phone number input fields (for example, 05999999999).

Get current checkout state

get

Returns the current checkout state and determines which page should be displayed. The response includes a list of completed pages and the current page context.

If the page query parameter is provided, it forces the display of that specific page. Otherwise, the system automatically determines the appropriate page based on checkout progress.

Query parameters
pagestring · enumOptional

Optional page name to force display a specific page

Possible values:
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

Checkout state retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/

Process checkout step

post

Processes form submission for the current checkout step. The page parameter determines which page's data is being submitted.

Processing Flow:

  1. Validates preconditions for the specified page

  2. Validates submitted data according to page-specific rules

  3. Updates pre-order state if validation succeeds

  4. Recalculates campaigns and discounts

  5. Determines next page and returns updated checkout state

Error Handling:

  • Validation errors are returned in the errors object

  • User remains on the current page when errors occur

  • Previously entered valid data is preserved

Query parameters
pagestring · enumRequired

Page name to process (e.g., "IndexPage", "AddressSelectionPage")

Possible values:
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
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
object · MasterpassOrderNoPageInputOptional

No input fields are required for this step. Submit an empty form body to trigger order number assignment and 3D Secure routing evaluation.

or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
object · GPayRedirectPageInputOptional

No input fields are required for this step. The request body must be empty. Any fields submitted in the body are not processed by this page and will not cause a validation error; however, the Garanti Pay gateway is not involved at this step, so gateway-specific parameters are irrelevant here.

or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
Responses
200

Step processed successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/

Get Index Page context

get

Returns the context for the Index Page, which collects user email and optional phone number. This page is skipped for authenticated users.

Preconditions:

  • Basket must not be empty

  • If CAN_GUEST_PURCHASE is false, user must be authenticated

Skip Conditions:

  • Page is skipped if user is already logged in

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

Index page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=IndexPage
200

Index page context retrieved

Submit Index Page (email and phone)

post

Submits user email and optional phone number for guest checkout. After successful submission, the system routes to the next appropriate page.

Configuration:

  • CAN_GUEST_PURCHASE: Controls whether guest checkout is allowed. If false, user must be authenticated.

  • USER_PHONE_FORMAT: Phone number format used for display hints and validation guidance (default: "05999999999")

Next Pages (determined dynamically):

  • If multiple delivery options exist: DeliveryOptionSelectionPage

  • If scheduled delivery is active: SlotSelectionPage

  • Otherwise: AddressSelectionPage

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
user_emailstring · emailRequired

User email address. Required for guest checkout.

phone_numberstringOptional

Optional phone number. Must match phone regex pattern if provided.

Responses
200

Email submitted successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=IndexPage
200

Email submitted successfully

Get Address Selection Page context

get

Returns available addresses for selection (billing and shipping). Supports both authenticated users (shows saved addresses) and anonymous users (shows addresses stored in session).

Preconditions:

  • User email must be set

  • Delivery option must be selected and must be customer type (is_customer())

  • Basket must not be empty

Address Sources:

  • Authenticated users: Addresses from their account, ordered by primary status and modification date

  • Anonymous users: Addresses stored in session via AnonymousUserAddressService

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

Address selection page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=AddressSelectionPage
200

Address selection page context retrieved

Send User's Billing and Shipping Addresses

post

Sets the billing and shipping addresses for the order.

Configuration:

  • REMOTE_PRICE_ATTRIBUTE_KEY: Product attribute key (default: "has_remote_price") that indicates a product requires remote price calculation. If any basket item has this attribute set to "true", the checkout flow routes to RemotePriceCalculationPage after address selection.

  • IDENTITY_NUMBER_REQUIRED_AMOUNT: Order amount threshold that requires identity number validation. If set and order total (with interest) exceeds this amount, shipping address must have identity_number field populated, otherwise validation fails.

  • DEFAULT_COUNTRY_CODE: Default country code used to populate country field in address contexts.

Remote Price Detection:

  • Checks if any basket item has REMOTE_PRICE_ATTRIBUTE_KEY attribute set to "true"

  • If detected, routes to RemotePriceCalculationPage next

Next Pages:

  • If remote price calculation needed: RemotePriceCalculationPage

  • Otherwise: Shipping option selection page

Validation:

  • If IDENTITY_NUMBER_REQUIRED_AMOUNT is set and order total exceeds threshold, shipping address must have identity_number populated

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
billing_addressintegerRequired

Primary key of the billing address

shipping_addressintegerRequired

Primary key of the shipping address

Responses
200

Addresses set successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=AddressSelectionPage
200

Addresses set successfully

Get Address Clear Page context

get

A utility page that clears all address-related data from the pre-order. Used internally to reset checkout state. Does not require user interaction.

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

Address clear page context

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=AddressClearPage
200

Address clear page context

Clear Address Data

post

Clears shipping address, billing address, billing_and_shipping_same, and retail_store from the pre-order. Routes to EmptyPage after completion.

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

Address data cleared successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=AddressClearPage
200

Address data cleared successfully

Get Order Selection Page context

get

If additional information needs to be collected from the user during checkout, a custom schema can be defined on the Order model via the admin interface. This page returns that schema so the frontend can render the appropriate form. The submitted value is stored in pre_order.data['extra_field'] and written to the order upon completion. This is an independent page — submitting it does not advance the checkout flow.

Preconditions:

  • None — this page is always reachable regardless of checkout state.

Skip Conditions:

  • Page is skipped if extra_field has already been set in pre_order.data.

Next Pages:

  • No further checkout page from this step (EmptyPage)

Note: This page is only used by projects that have a custom order schema configured in the admin interface.

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

Order Selection Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=OrderSelectionPage
200

Order Selection Page context retrieved

Submit custom extra field value for the order

post

Accepts a JSON value for the extra_field on the order, validates it against the Order model's attribute configuration, and stores it in pre_order.data. This is an independent page — submitting it does not advance the checkout flow.

Fields:

  • extra_field: A JSON value that must conform to the schema defined for the Order model's extra_field attribute. Validated via Order.get_attribute_config('extra_field'). If no attribute config exists, the value is stored as-is.

Validation:

  • If an attribute config for extra_field exists and attribute.validate_value() raises AttributeConfigNotFoundException or AttributeInputTypeNotValidException, a validation error is returned.

State Update:

  • On success, pre_order.data['extra_field'] is set to the validated value.

Backward Navigation:

  • When navigating backward, extra_field is removed from pre_order.data.

Next Pages:

  • No further checkout page (EmptyPage)

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
extra_fieldanyRequired

A JSON value for the Order model's extra_field attribute. Must conform to the schema defined by the Order model's attribute configuration (accessible via the schema key in the GET page context). Validated via Order.get_attribute_config('extra_field'). If no attribute config is registered, the value is stored as-is without additional validation.

Example: {"preference":"gift"}
Responses
200

Extra field saved or validation error

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=OrderSelectionPage
200

Extra field saved or validation error

Get Order Note Page context

get

Returns the current order note stored in the pre-order. This page allows the user to add or update a free-text note attached to their order. This is an independent page — submitting it does not advance the checkout flow.

Preconditions:

  • Basket must not be empty

Skip Conditions:

  • Page is skipped if a note has already been entered (i.e., notes is set in pre_order.data)

Next Pages:

  • No further checkout page from this step (EmptyPage)

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

Order Note Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=OrderNotePage
200

Order Note Page context retrieved

Save or clear the order note

post

Accepts an optional note for the order and stores it in pre_order.data['notes']. Submitting a blank or null value removes any previously stored note. This is an independent page — submitting it does not advance the checkout flow.

Fields:

  • notes: Free-text note for the order. Maximum 320 characters. null or empty string clears the note.

State Update:

  • If notes is a non-empty string: stored in pre_order.data['notes'].

  • If notes is null or empty: notes key is removed from pre_order.data.

Backward Navigation:

  • When navigating backward, notes is removed from pre_order.data.

Next Pages:

  • No further checkout page (EmptyPage)

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
notesstring · max: 320 · nullableRequired

Free-text note to attach to the order. Maximum 320 characters. Submitting null or an empty string clears any previously stored note.

Example: Please leave at the door.
Responses
200

Note saved or cleared

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=OrderNotePage
200

Note saved or cleared

Get B2B Page context

get

Returns the context for the B2B (Business-to-Business) payment step. No additional data is needed at this stage; the page serves as the final agreement confirmation before the B2B order is placed.

Preconditions:

  • Basket must not be empty.

  • The selected payment option must be of B2B type.

Page Context:

  • Empty object {}. All required data was collected at the payment option selection step.

Step Completion: This page is considered already completed when the selected payment option is of B2B type and the order has been finalised.

available_for_post_order: false

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

B2B page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=B2BPage
200

B2B page context retrieved

Confirm and place B2B order

post

Accepts the terms and conditions agreement and places the B2B order. Once accepted, the order is finalised and an invoice-based payment record is created. Card and installment information are cleared since B2B does not use card payment.

Required Fields:

  • agreement: Must be true.

Backward Navigation:

  • No state is reset on backward navigation.

Next Page:

  • ThankYouPage

available_for_post_order: false

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

Input for B2BPage. Accepts the terms and conditions agreement to finalise the B2B (Business-to-Business) order.

agreementboolean · enumRequired

Acceptance of the terms and conditions. Must be true to place the B2B order.

Possible values:
Responses
200

B2B order placed — routes to ThankYouPage

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=B2BPage
200

B2B order placed — routes to ThankYouPage

Get Checkout Provider Index Page context

get

Entry point for the hosted checkout provider flow. This page appears when the basket is eligible for a checkout provider (e.g. Akifast). It has no visible context data; its purpose is to confirm that at least one checkout provider is available before the customer proceeds to select one.

Preconditions:

  • At least one checkout provider must be available for the current pre-order

Skip Conditions:

  • Page is skipped if checkout_provider_process_started is already true in the pre-order data

Page Context: (empty)

Previous Page: (none — independent start page)

Next Page: CheckoutProviderSelectionPage

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

Checkout Provider Index Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=CheckoutProviderIndexPage
200

Checkout Provider Index Page context retrieved

Start the checkout provider flow

post

Marks the checkout provider process as started on the pre-order. No input data is required. After submission the flow advances to CheckoutProviderSelectionPage.

Required Fields: (none — submitting with an empty body is sufficient)

State Updates:

  • pre_order.data['checkout_provider_process_started'] = true

  • If the user is not yet associated with the pre-order and is authenticated, the user is attached to the pre-order.

Backward Navigation:

  • When navigating backward, checkout_provider_process_started is removed from pre_order.data.

Next Page: CheckoutProviderSelectionPage

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
objectOptional
Responses
200

Checkout provider flow started

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CheckoutProviderIndexPage
200

Checkout provider flow started

Get Checkout Provider Selection Page context

get

Returns the list of checkout providers available for the current pre-order. The customer selects one to initiate a hosted payment session with that provider.

Preconditions:

  • checkout_provider_process_started must be true in pre-order data

Skip Conditions:

  • Page is skipped if a checkout provider is already selected, redirection_started = true, and remote_redirect_url is set

Page Context:

  • checkout_providers — list of available providers, each with pk, name, slug

Previous Page: CheckoutProviderIndexPage

Next Page: CheckoutProviderAddressSelectionPage

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

Checkout Provider Selection Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=CheckoutProviderSelectionPage
200

Checkout Provider Selection Page context retrieved

Select a checkout provider and start a hosted payment session

post

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

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
200

Provider selected and session started

Get Checkout Provider Address Selection Page context

get

Returns the redirect URL for the checkout provider's hosted address selection form. The customer is redirected to or shown the provider's form to enter their shipping and billing addresses.

Preconditions:

  • Basket must not be empty

  • A checkout provider must be selected

  • redirection_started must be true in pre-order data

Skip Conditions:

  • Page is skipped if both billing_address and shipping_address are already set on the pre-order

Page Context:

  • redirect_url — URL of the provider's hosted address form

  • is_iframe — optional boolean indicating if the form should be embedded as an iframe

Previous Page: CheckoutProviderSelectionPage

Next Page: CheckoutProviderShippingOptionPage

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

Address Selection Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=CheckoutProviderAddressSelectionPage
200

Address Selection Page context retrieved

Submit address data received from the checkout provider's hosted form

post

Accepts address data sent by the checkout provider's hosted page (via callback or iframe postback) and saves it as the shipping and billing addresses on the pre-order. The address fields use the provider's format and are mapped to internal address structures.

Required Fields: basket_id, session_token, shipping_address, billing_address

State Updates:

  • pre_order.shipping_address set from shipping_address payload

  • pre_order.billing_address set from billing_address payload

Backward Navigation:

  • Clears billing_address and shipping_address from the pre-order.

Next Page: CheckoutProviderShippingOptionPage

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

Address data posted back from the checkout provider's hosted address form. Both shipping and billing addresses must be provided in the provider's format.

basket_idintegerRequired

Primary key of the active basket.

Example: 42
session_tokenstring · uuidRequired

Session token issued by the checkout provider for this session.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Address data saved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CheckoutProviderAddressSelectionPage
200

Address data saved

Get Checkout Provider Agreement List Page context

get

Returns the list of agreements (e.g. Preliminary Information Form, Distance Sales Agreement) that the customer must accept via the checkout provider's hosted form.

Preconditions:

  • Basket must not be empty

  • A checkout provider must be selected

Skip Conditions:

  • Page is skipped if selected_agreement is already set in pre-order data

Page Context:

  • agreements — list of agreement objects, each with code and text (available codes: info, sales)

Previous Page: CheckoutProviderShippingOptionPage

Next Page: CheckoutProviderNotificationPage

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

Agreement List Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=CheckoutProviderAgreementListPage
200

Agreement List Page context retrieved

Submit agreement acceptance and shipping/address data from checkout provider

post

Accepts the customer's agreement selection along with shipping option, address, and user data forwarded from the checkout provider's hosted form. Sets the payment option to credit card, assigns the shipping option and amount, and records the selected agreement code on the pre-order.

Required Fields: basket_id, session_token, shipping_option_key, user, code

Optional Fields: shipping_address, billing_address

State Updates:

  • pre_order.payment_option set to the first active credit card payment option

  • pre_order.payment_choice cleared

  • pre_order.shipping_option set from shipping_option_key

  • pre_order.shipping_amount calculated for the selected shipping option

  • pre_order.data['selected_agreement'] set to the submitted code

  • pre_order.shipping_address.email set from user.email

Backward Navigation:

  • Clears selected_agreement, payment_option, shipping_option, and resets shipping_amount to 0.00.

Next Page: CheckoutProviderNotificationPage

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 posted back from the checkout provider's agreement selection step. Includes the selected agreement code, shipping option, address data, and user information. Sets payment option, shipping, and records the agreement on the pre-order.

basket_idintegerRequired

Primary key of the active basket.

Example: 42
session_tokenstring · uuidRequired

Session token issued by the checkout provider for this session.

Example: 550e8400-e29b-41d4-a716-446655440000
shipping_option_keyintegerRequired

Primary key of the selected shipping option. Must be one of the available shipping options for the pre-order's address.

Example: 1
codestring · enumRequired

Agreement type accepted by the customer. info for the preliminary information form; sales for the distance sales agreement.

Example: salesPossible values:
Responses
200

Agreement data saved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CheckoutProviderAgreementListPage
200

Agreement data saved

Get Checkout Provider Notification Page context

get

Returns the agreement text body for the selected agreement. This page is typically the callback target for the checkout provider's payment notification. It handles order creation after the provider completes the payment.

Preconditions:

  • Basket must not be empty

  • A checkout provider must be selected

Skip Conditions:

  • Page is skipped if the order is already finalized

Page Context:

  • code — the selected agreement code (e.g. "sales", "info")

  • text — human-readable agreement name

  • agreement_body — rendered HTML content of the agreement

Previous Page: CheckoutProviderAgreementListPage

Next Page: CheckoutProviderThankYouPage

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

Notification Page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=CheckoutProviderNotificationPage
200

Notification Page context retrieved

Process checkout provider payment notification and create the order

post

Receives the payment notification from the checkout provider and creates the order. This endpoint is called as a callback by the provider after the customer completes the payment on the hosted form. It validates the conversation ID, resolves or creates the customer account, saves addresses, sets the shipping option, configures installment data, and finalizes the pre-order into a completed order.

Required Fields: agreements, conversation_id, payment_info, transaction, card_info, akifast_user, is_successful

Optional Fields: shipping_address, billing_address

Validation:

  • agreements must be true (agreement acceptance required)

  • conversation_id must match the one stored in pre_order.checkout_provider_data

  • is_successful must be true (transaction must have succeeded)

  • transaction.installment_count must be between 1 and 12

  • transaction.conversation_id must match pre_order.checkout_provider_data['conversation_id']

State Updates:

  • User account is resolved or created via social account login

  • Shipping and billing addresses are set and saved

  • pre_order.shipping_option set from transaction.shipping_option_key

  • pre_order.shipping_amount calculated for the selected option

  • pre_order.payment_option set to the first active credit card option

  • pre_order.pos_alt set from payment_info.payment_system_code

  • pre_order.card_info populated with the card BIN number

  • pre_order.checkout_provider_data['installment_alt'] set with installment_count and interest_amount

  • pre_order.checkout_provider_data['checkout_provider_purchase_raw_response'] set

  • pre_order.checkout_provider_data['use_three_d_secure'] set from transaction.is_threed

  • Order is finalized (pre-order converted to completed order)

Error Handling:

  • If is_successful or agreements is false, a validation error is returned and the order number is reset.

Next Page: CheckoutProviderThankYouPage

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

Payment notification payload sent by the checkout provider after the customer completes payment on the hosted form. Used to create the order, set shipping, link the customer account, and finalize the pre-order.

agreementsboolean · enumRequired

Customer's acceptance of the agreement. Must be true; any other value returns a validation error.

Example: truePossible values:
is_successfulboolean · enumRequired

Payment success flag from the provider. Must be true; any other value returns a validation error.

Example: truePossible values:
conversation_idstringRequired

Provider conversation identifier. Must match pre_order.checkout_provider_data['conversation_id'].

Example: conv-abc-123
Responses
200

Order created

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=CheckoutProviderNotificationPage
200

Order created

Last updated

Was this helpful?