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

Payment Method Selection

Checkout Payment Method Selection

Present available payment methods to the customer and route them into the appropriate payment flow. This section also covers the entry points for cash on delivery, bank transfer (funds transfer), pay later, and external checkout provider shipping confirmation.

Request Format

Include the following header in all checkout requests:

  • x-requested-with: XMLHttpRequest

Authentication

A valid session cookie is required. The checkout URL token mechanism is also supported for external redirect flows.

Dynamic Settings

CHECKOUT_WITH_TOKEN_ALLOW_ANONYMOUS

Controls whether anonymous users may access checkout via token-based URLs. When disabled, only authenticated users can use token checkout links.

Get Payment Option Selection Page context

get

Returns available payment options for the order. Payment options are filtered based on configured rules and user context.

Preconditions:

  • Shipping option must be selected (check_shipping_option_selected)

  • Basket must not be empty

Payment Option Availability:

  • Each payment option has associated rules that determine availability

  • Rules can check basket contents, user status, order amount, and more

  • Unavailable options are returned separately with error codes and messages

Checkout URLs:

  • checkout_url: URL for checkout with token (used for external payment flows)

  • status_url: URL to check checkout status (used for polling payment status)

  • Generated by CheckoutWithTokenService

Payment Types: Payment options can have different types that determine the next page flow:

  • credit_card: Routes to BinNumberPage

  • funds_transfer: Routes to FundsTransferChoicePage

  • bkm_express: Routes to BexSelectionPage

  • loyalty_money: Routes to LoyaltyMoneyPage

  • cash_register: Routes to CashRegisterPage

  • gpay: Routes to GPaySelectionPage

  • redirection: Routes to RedirectionPaymentSelectedPage

  • stored_card: Routes to MobilExpressSelectionPage

  • masterpass: Routes to MasterpassBinNumberPage

  • masterpass_rest: Routes to MasterpassRestBinNumberPage

  • credit_payment: Routes to CreditPaymentSelectionPage

  • pay_later: Routes to PayLaterCompletePage

  • saved_card: Routes to SavedCardSelectionPage

  • confirmation: Routes to ConfirmationPaymentAgreementCheckPage

  • b2b: Routes to B2BPage

  • wallet: Routes to WalletSelectionPage

  • pay_on_delivery: Routes to PayOnDeliveryPaymentChoicePage or PayOnDeliveryPage

  • gift_card: Routes to GiftCardPaymentPage

Gift Card Payment Option: The gift_card payment option appears in the available options list only when all of the following are true:

  • At least one gift card reservation exists on the order

  • The remaining unpaid amount is exactly zero (gift cards fully cover the order)

When gift cards only partially cover the order total, the gift_card payment option is not shown. In this case the user selects a regular payment option (e.g. credit card). During order placement the applied gift card amounts are charged first; the remaining balance is then charged to the selected payment method.

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

Payment option selection page context retrieved

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

Payment option selection page context retrieved

Select Payment Option

post

Sets the selected payment option for the order.

Validation:

  • The selected payment option must be active

  • The selected payment option must pass its availability rules

Payment Option Processing:

  • If payment option is pay-on-delivery type, installment and card_info are cleared

  • Previous MobilExpress data (keys starting with me_) is cleared

  • Payment choice is reset

Next Pages: Based on the selected payment option type, the user is routed to the appropriate page:

  • credit_card: BinNumberPage (enter card bin number)

  • funds_transfer: FundsTransferChoicePage (select bank account)

  • bkm_express: BexSelectionPage (BKM Express flow)

  • loyalty_money: LoyaltyMoneyPage (use loyalty points)

  • cash_register: CashRegisterPage (cash register payment)

  • gpay: GPaySelectionPage (Google Pay flow)

  • redirection: RedirectionPaymentSelectedPage (redirect to payment provider)

  • stored_card: MobilExpressSelectionPage (use stored card)

  • masterpass: MasterpassBinNumberPage (Masterpass flow)

  • masterpass_rest: MasterpassRestBinNumberPage (Masterpass REST API flow)

  • credit_payment: CreditPaymentSelectionPage (credit/installment payment)

  • pay_later: PayLaterCompletePage (buy now pay later)

  • saved_card: SavedCardSelectionPage (use saved card)

  • confirmation: ConfirmationPaymentAgreementCheckPage (confirmation required)

  • b2b: B2BPage (B2B payment)

  • wallet: WalletSelectionPage (digital wallet)

  • pay_on_delivery: If multiple payment choices available: PayOnDeliveryPaymentChoicePage, otherwise: PayOnDeliveryPage

  • gift_card: GiftCardPaymentPage (complete order fully covered by gift cards)

Partial gift card payment: When gift cards are applied but do not fully cover the order, the user selects a regular payment option here. Selecting a non-gift-card payment type does not remove the applied gift card reservations. During order placement, the gift card amounts are charged first; the remaining balance is charged to the selected payment method.

Cascading Invalidation:

  • Selecting a new payment option clears previous payment-related data

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_optionintegerRequired

Primary key of the selected payment option. Must be an active payment option that passes availability rules.

Responses
200

Payment option selected successfully

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

Payment option selected successfully

Get Credit Payment Selection Page context

get

Returns the list of available POS (point-of-sale) options for credit payment. This page is reached when the user selects a payment option whose type is credit_payment.

Preconditions:

  • Basket must not be empty

  • A credit payment option must be selected (check_credit_payment_selected)

Skip Conditions:

  • Page is skipped if a POS option has already been selected (i.e., credit_payment_option is set in pre_order.data)

Next Pages:

  • CreditPaymentConfirmationPage

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

Credit Payment Selection Page context retrieved

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

Credit Payment Selection Page context retrieved

Select a credit POS option

post

Stores the selected POS option in pre_order.data['credit_payment_option']. The submitted PK must belong to one of the available POS options returned in the GET context (payment_option.get_available_poses()).

Required Fields:

  • credit_payment_option: Primary key of the selected Pos object.

Validation:

  • The POS must be present in the available POS options for the current payment option.

State Update:

  • pre_order.data['credit_payment_option'] is set to the selected Pos instance.

Backward Navigation:

  • When navigating backward, credit_payment_option is reset to null.

Next Pages:

  • CreditPaymentConfirmationPage

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
credit_payment_optionintegerRequired

Primary key of the selected Pos object. Must be one of the available POS options returned by payment_option.get_available_poses() for the current credit payment option.

Example: 10
Responses
200

POS option selected or validation error

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

POS option selected or validation error

Get Pay on Delivery Page context

get

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)

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
200

Pay on delivery page context retrieved

Complete Pay on Delivery Order

post

Creates the order for pay-on-delivery after the user accepts the terms and conditions.

Required Fields:

  • agreement: Must be true. Submitting false or omitting this field causes a validation error.

Validation:

  • Basket amount must be greater than zero

Order Creation:

  • Order is created via PaymentPageMixin.process_order

  • After creation: basket is submitted, contracts are saved, confirmation email is sent, order completion SMS is sent

  • pre_order.card_info is reset to null

  • pre_order.installment is reset to null

Order Number:

  • The order number is regenerated at this step unless it was already set

Next Pages:

  • ThankYouPage

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
agreementboolean · enumRequired

User must accept terms and conditions to proceed. Must be true.

Possible values:
Responses
200

Pay on delivery order created successfully

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

Pay on delivery order created successfully

Get Pay on Delivery Payment Choice Page context

get

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)

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
200

Pay on delivery payment choice page context retrieved

Select Pay on Delivery Payment Choice

post

Saves the user's selected payment choice for pay-on-delivery.

Required Fields:

  • payment_choice: The value string of one of the items returned in payment_choices from the GET context. Submitting a value not present in that list causes a validation error.

Validation:

  • Basket amount must be greater than zero

  • payment_choice must match one of the valid values returned by the payment option's choices

State Update:

  • pre_order.payment_choice is set to the selected PaymentChoice object

Next Pages:

  • SendSmsPage — when the payment option's sms_verification configuration is true

  • PayOnDeliveryPage — in all other cases

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_choicestringRequired

The value string of one of the payment choices returned in the payment_choices list from the GET context of PayOnDeliveryPaymentChoicePage. Submitting a value not present in that list causes a validation error.

Example: cash
Responses
200

Payment choice selected successfully

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

Payment choice selected successfully

Get Funds Transfer Page context

get

Returns payment instructions for funds transfer. Displays bank account details and reference code for customer to complete payment.

Preconditions:

  • Payment option must be funds transfer type

  • Bank account must be selected (funds_transfer_bank)

  • Basket must not be empty

Payment Instructions:

  • Bank account details (IBAN, account holder, bank name)

  • Order number for reference

  • Reference code (if gateway supports it)

  • Total amount to transfer

  • Currency information

Reference Code Context:

  • Retrieved from pre_order.data['funds_transfer']

  • Displayed prominently for customer to include in transfer

  • Used by payment reconciliation system to match transfers

Order Status:

  • Order is created in "pending" status

  • Waiting for payment confirmation

  • Payment team manually confirms transfer receipt

  • Order status updated to "confirmed" after verification

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

Funds transfer page context retrieved

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

Funds transfer page context retrieved

Complete Funds Transfer Order

post

Completes the order creation for funds transfer payment. Order is created in pending status, awaiting payment confirmation.

Required Fields:

  • agreement: User must accept terms and conditions (boolean, must be true)

Validation:

  • Basket amount must be greater than or equal to zero

  • Bank account must be selected

  • Payment option must be funds transfer type

Order Creation:

  • Order is created with status "pending_payment" or "awaiting_funds_transfer"

  • Order details include:

    • Selected bank account information

    • Reference code (if applicable)

    • Payment instructions

  • User receives confirmation email with payment details

  • Stock is reserved (depending on configuration)

Order Number:

  • Order number is NOT regenerated at this step

  • Uses existing pre-order number assigned in previous step

Payment Confirmation Flow:

  1. User completes bank transfer using provided details

  2. Payment team receives transfer notification

  3. Payment team matches transfer using reference code/order number

  4. Order status updated to "confirmed"

  5. Fulfillment process begins

Next Pages:

  • ThankYouPage (order completed, awaiting payment)

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
agreementboolean · enumRequired

User must accept terms and conditions to proceed. Must be true.

Possible values:
Responses
200

Funds transfer order completed successfully

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

Funds transfer order completed successfully

Get Funds Transfer Choice Page context

get

Returns available bank accounts for funds transfer (wire transfer/EFT) payment. User selects which bank account to transfer money to.

Preconditions:

  • Payment option must be selected and must be funds transfer type (is_funds_transfer())

  • Basket must not be empty

Bank Account Selection:

  • Lists all active bank accounts configured in the system

  • Each bank account includes: bank name, account holder, IBAN, currency

  • User selects one bank account for payment instructions

Auto-selection:

  • If only one bank account is available and no POS slug configured:

    • Bank account is automatically selected

    • Page is skipped

    • Routes directly to FundsTransferPage

Reference Code Generation:

  • Some payment gateways support reference codes for tracking

  • If gateway has has_reference_code capability:

    • Reference code is generated when bank account is selected

    • Reference code is stored in pre_order.data['funds_transfer']

    • Used to match customer payment with order

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

Funds transfer choice page context retrieved

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

Funds transfer choice page context retrieved

Select Bank Account for Funds Transfer

post

Sets the selected bank account for funds transfer payment.

Validation:

  • Selected bank account must be active

  • Basket amount must be greater than or equal to zero

Reference Code Generation:

  • If payment gateway supports reference codes (has_reference_code):

    • Generates unique reference code for the order

    • Uses order number, amount, currency as input

    • Includes user email, addresses, and site domain

    • Stores reference code in pre_order.data['funds_transfer']['reference_code']

  • Reference code is displayed to user on next page for payment matching

Order Number Assignment:

  • Pre-order number is assigned at this step (if not already assigned)

  • Order number used in reference code generation

Bank Account Change Handling:

  • If user changes bank account selection:

    • Reference code is regenerated

    • Previous reference code is invalidated

Next Pages:

  • FundsTransferPage (display payment instructions)

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
bank_accountintegerRequired

Primary key of the selected bank account. Must be an active bank account configured in the system.

Responses
200

Bank account selected successfully

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

Bank account selected successfully

Get Pay Later Complete Page context

get

Returns the context for the pay-later order completion step. No additional data is required at this stage; the page serves as the final agreement confirmation before the pay-later order is placed.

Preconditions:

  • Basket must not be empty.

  • The selected payment option must be of pay-later type.

Page Context:

  • Returns an 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 pay-later 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

Pay later complete page context retrieved

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

Pay later complete page context retrieved

Confirm and place pay-later order

post

Submits the final agreement and places the pay-later order. The customer must accept the terms and conditions; once accepted, the order is finalised immediately without a payment transaction.

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
agreementboolean · enumRequired

Acceptance of the terms and conditions. Must be true to place the pay-later order.

Possible values:
Responses
200

Pay-later order placed

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

Pay-later order placed

Get Checkout Provider Shipping Option Page context

get

Returns the available shipping options for the delivery address provided by the checkout provider. The customer's device (via the provider's hosted form) selects a shipping option and submits it back.

Preconditions:

  • Basket must not be empty

  • A checkout provider must be selected

Skip Conditions:

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

Page Context:

  • shipping_options — list of available options, each with name, slug, logo_url, shipping_amount, description, key

Previous Page: CheckoutProviderAddressSelectionPage

Next Page: CheckoutProviderAgreementListPage

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

Shipping Option Page context retrieved

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

Shipping Option Page context retrieved

Submit shipping option selection from checkout provider

post

Accepts the shipping option selection forwarded from the checkout provider's hosted form along with the basket and conversation identifiers. Verifies the conversation_id against the one stored in the pre-order to ensure the response belongs to the active session.

Required Fields: basket_id, conversation_id

Optional Fields: language

Validation:

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

Next Page: CheckoutProviderAgreementListPage

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 forwarded by the checkout provider after the customer selects a shipping option on the hosted form. The conversation_id is validated against the active session to prevent replay.

basket_idintegerRequired

Primary key of the active basket.

Example: 42
conversation_idstringRequired

Provider conversation identifier. Must match the value stored in pre_order.checkout_provider_data['conversation_id'].

Example: conv-abc-123
languagestring · nullableOptional

Optional language code forwarded by the provider (e.g. "tr", "en").

Example: tr
Responses
200

Shipping option step processed

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

Shipping option step processed

Last updated

Was this helpful?