# Checkout Flow

```mermaid
flowchart TD
    %% =============================================================================
    %% CHECKOUT PAGES FLOW DIAGRAM
    %% Complete flow between all checkout pages in omnishop/orders/pages folder
    %% 70+ pages covering 18 payment types + independent utility pages
    %% =============================================================================
    
    Start([🛒 START CHECKOUT]) --> IndexPage
    
    %% =============================================================================
    %% ENTRY POINT - INDEX PAGE
    %% Starting point for regular checkout - checks guest purchase permissions
    %% =============================================================================
    
    subgraph EntryPoint["🏁 ENTRY POINT"]
        IndexPage[IndexPage<br/>---<br/>Collects email & phone<br/>Checks guest purchase<br/>permission]
    end
    
    IndexPage -->|"🔀 Multiple delivery<br/>options active"| DeliveryOptionSelectionPage
    IndexPage -->|"📅 Scheduled<br/>delivery active"| SlotSelectionPage
    IndexPage -->|"📍 Default path<br/>(single delivery option)"| AddressSelectionPage
    
    %% =============================================================================
    %% INDEPENDENT: GIFT BOX (Can be accessed from Index)
    %% =============================================================================
    
    subgraph GiftBoxIndependent["🎁 GIFT BOX (INDEPENDENT)"]
        GiftBoxIndexPage[GiftBoxIndexPage<br/>---<br/>Initialize gift box<br/>if active]
        
        GiftBoxPage[GiftBoxPage<br/>---<br/>Configure gift box<br/>Add note & video]
    end
    
    GiftBoxIndexPage -->|"🎁 Gift box<br/>available"| GiftBoxPage
    GiftBoxPage -.->|"↩️ Returns"| EmptyGift[EmptyPage]
    
    %% =============================================================================
    %% DELIVERY OPTION SELECTION
    %% Choose between customer delivery, retail store pickup, or pickup location
    %% =============================================================================
    
    subgraph DeliveryFlow["🚚 DELIVERY OPTION SELECTION"]
        DeliveryOptionSelectionPage[DeliveryOptionSelectionPage<br/>---<br/>Select delivery type:<br/>• Customer Delivery<br/>• Retail Store<br/>• Pickup Location]
    end
    
    DeliveryOptionSelectionPage -->|"📅 Scheduled<br/>delivery"| SlotSelectionPage
    DeliveryOptionSelectionPage -->|"📦 Pickup<br/>Location"| PickupLocationSelectionPage
    DeliveryOptionSelectionPage -->|"🏪 Retail<br/>Store"| RetailStoreSelectionPage
    DeliveryOptionSelectionPage -->|"🏠 Customer<br/>Delivery"| AddressSelectionPage
    
    %% =============================================================================
    %% ADDRESS SELECTION FLOWS
    %% Different address selection based on delivery option
    %% =============================================================================
    
    subgraph AddressFlow["📍 ADDRESS SELECTION"]
        AddressSelectionPage[AddressSelectionPage<br/>---<br/>Select/Create:<br/>• Billing Address<br/>• Shipping Address]
        
        RetailStoreSelectionPage[RetailStoreSelectionPage<br/>---<br/>Select retail store<br/>for pickup<br/>+ Billing address]
        
        PickupLocationSelectionPage[PickupLocationSelectionPage<br/>---<br/>Select pickup location<br/>+ Billing address]
        
        RemotePriceCalculationPage[RemotePriceCalculationPage<br/>---<br/>Calculate prices from<br/>remote source]
        
        SlotSelectionPage[SlotSelectionPage<br/>---<br/>Select delivery<br/>time slot]
    end
    
    AddressSelectionPage -->|"💰 Has items with<br/>remote pricing"| RemotePriceCalculationPage
    AddressSelectionPage -->|"✅ Standard<br/>flow"| ShippingOptions
    RemotePriceCalculationPage --> ShippingOptions
    RetailStoreSelectionPage --> ShippingOptions
    PickupLocationSelectionPage --> ShippingOptions
    SlotSelectionPage --> PaymentOptionSelectionPage
    
    %% =============================================================================
    %% SHIPPING OPTIONS
    %% Four different shipping option calculation methods
    %% =============================================================================
    
    ShippingOptions{🚢 SHIPPING<br/>OPTION TYPE}
    
    subgraph ShippingFlow["🚢 SHIPPING OPTIONS SELECTION"]
        ShippingOptionSelectionPage[ShippingOptionSelectionPage<br/>---<br/>Standard shipping<br/>options selection]
        
        DataSourceShippingOptionSelectionPage[DataSourceShippingOptionSelectionPage<br/>---<br/>Data source based<br/>shipping calculation]
        
        AttributeBasedShippingOptionSelectionPage[AttributeBasedShippingOptionSelectionPage<br/>---<br/>Attribute based<br/>shipping calculation]
        
        RemoteShippingOptionSelectionPage[RemoteShippingOptionSelectionPage<br/>---<br/>Remote API based<br/>shipping options]
    end
    
    ShippingOptions -->|"📦 Standard"| ShippingOptionSelectionPage
    ShippingOptions -->|"🗄️ Data Source"| DataSourceShippingOptionSelectionPage
    ShippingOptions -->|"🏷️ Attribute Based"| AttributeBasedShippingOptionSelectionPage
    ShippingOptions -->|"🌐 Remote API"| RemoteShippingOptionSelectionPage
    
    ShippingOptionSelectionPage --> AfterShipping
    DataSourceShippingOptionSelectionPage --> AfterShipping
    AttributeBasedShippingOptionSelectionPage --> AfterShipping
    RemoteShippingOptionSelectionPage --> AfterShipping
    
    %% =============================================================================
    %% INDEPENDENT: DELIVERY BAGS
    %% Can be called independently to add delivery bags
    %% =============================================================================
    
    subgraph DeliveryBagsIndependent["🛍️ DELIVERY BAGS (INDEPENDENT)"]
        DeliveryBagsPage[DeliveryBagsPage<br/>---<br/>Add paid delivery<br/>bags to order]
    end
    
    DeliveryBagsPage -.->|"↩️ Returns"| EmptyBags[EmptyPage]
    
    %% =============================================================================
    %% OPTIONAL FEATURES
    %% Sample products and reservation selection
    %% =============================================================================
    
    AfterShipping{🎁 Check Optional<br/>Features}
    
    subgraph OptionalFlow["🎁 OPTIONAL FEATURES"]
        SampleProductPage[SampleProductPage<br/>---<br/>Select free<br/>sample products]
        
        ReservationSelectionPage[ReservationSelectionPage<br/>---<br/>Select retail store<br/>reservation slot]
    end
    
    AfterShipping -->|"🎁 Sample products<br/>available"| SampleProductPage
    AfterShipping -->|"📅 Retail store<br/>reservation"| ReservationSelectionPage
    AfterShipping -->|"➡️ Continue"| PaymentOptionSelectionPage
    
    SampleProductPage --> ReservationCheck{📅 Need<br/>Reservation?}
    ReservationCheck -->|"✅ Yes"| ReservationSelectionPage
    ReservationCheck -->|"❌ No"| PaymentOptionSelectionPage
    ReservationSelectionPage --> PaymentOptionSelectionPage
    
    %% =============================================================================
    %% INDEPENDENT: GENERAL UTILITY PAGES
    %% Can be called at any point in checkout
    %% =============================================================================
    
    subgraph GeneralIndependent["🔧 GENERAL UTILITIES (INDEPENDENT)"]
        OrderNotePage[OrderNotePage<br/>---<br/>Add notes to<br/>the order]
        
        OrderSelectionPage[OrderSelectionPage<br/>---<br/>Set extra field<br/>data on order]
        
        CouponSelectionPage[CouponSelectionPage<br/>---<br/>Apply/Remove<br/>coupon codes]
        
        LoyaltyCardPage[LoyaltyCardPage<br/>---<br/>Use loyalty card<br/>points]
        
        LoyaltyMoneyUsagePage[LoyaltyMoneyUsagePage<br/>---<br/>Set loyalty money<br/>usage amount]
    end
    
    OrderNotePage -.->|"↩️ Returns"| EmptyNote[EmptyPage]
    OrderSelectionPage -.->|"↩️ Returns"| EmptySelection[EmptyPage]
    CouponSelectionPage -.->|"↩️ Returns"| EmptyCoupon[EmptyPage]
    LoyaltyCardPage -.->|"↩️ Returns"| EmptyLoyalty[EmptyPage]
    LoyaltyMoneyUsagePage -.->|"↩️ Returns"| EmptyLoyaltyMoney[EmptyPage]

    %% =============================================================================
    %% INDEPENDENT: GIFT CARD MANAGEMENT
    %% Can be called at any point in checkout to manage gift cards
    %% =============================================================================

    subgraph GiftCardIndependent["🎁 GIFT CARD MANAGEMENT (INDEPENDENT)"]
        GiftCardPage[GiftCardPage<br/>---<br/>Enter card number<br/>& check balance]

        GiftCardOtpPage[GiftCardOtpPage<br/>---<br/>Enter OTP code<br/>to verify card]

        GiftCardOtpResendPage[GiftCardOtpResendPage<br/>---<br/>Resend OTP<br/>verification code]

        GiftCardApplyPage[GiftCardApplyPage<br/>---<br/>Set amount &<br/>apply reservation]

        GiftCardRemovePage[GiftCardRemovePage<br/>---<br/>Remove applied<br/>gift card]

        GiftCardUpdateAmountPage[GiftCardUpdateAmountPage<br/>---<br/>Update reserved<br/>gift card amount]
    end

    GiftCardPage -->|"🔐 OTP<br/>required"| GiftCardOtpPage
    GiftCardPage -->|"✅ No OTP<br/>needed"| GiftCardApplyPage
    GiftCardOtpPage --> GiftCardApplyPage
    GiftCardOtpResendPage -.->|"↩️ Returns"| EmptyGCOtp[EmptyPage]
    GiftCardApplyPage -.->|"↩️ Returns"| EmptyGCApply[EmptyPage]
    GiftCardRemovePage -.->|"↩️ Returns"| EmptyGCRemove[EmptyPage]
    GiftCardUpdateAmountPage -.->|"↩️ Returns"| EmptyGCUpdate[EmptyPage]

    %% =============================================================================
    %% PAYMENT OPTION SELECTION - MAIN BRANCH POINT
    %% 17 different payment types supported
    %% =============================================================================
    
    subgraph PaymentSelection["💳 PAYMENT OPTION SELECTION"]
        PaymentOptionSelectionPage[PaymentOptionSelectionPage<br/>---<br/>18 Payment Types:<br/>💳 Credit Card & Saved Card<br/>💵 Pay on Delivery<br/>🏦 Funds Transfer<br/>📱 BKM Express, GPay<br/>💰 Cash Register<br/>🔐 Masterpass variants<br/>📲 MobilExpress<br/>👛 Wallet, Confirmation<br/>💳 Credit Payment<br/>🎁 Loyalty Money, Gift Card<br/>📅 Pay Later<br/>🏢 B2B]
    end
    
    PaymentOptionSelectionPage --> PaymentType{💳 SELECT<br/>PAYMENT TYPE}
    
    %% =============================================================================
    %% CREDIT CARD FLOW
    %% Standard credit card payment with optional 3D Secure
    %% Supports campaigns and rewards
    %% =============================================================================
    
    subgraph CreditCardFlow["💳 CREDIT CARD PAYMENT"]
        BinNumberPage[BinNumberPage<br/>---<br/>Enter card BIN<br/>to get card info]
        
        InstallmentSelectionPage[InstallmentSelectionPage<br/>---<br/>Select installment<br/>plan]
        
        CreditCardConfirmationPage[CreditCardConfirmationPage<br/>---<br/>Enter card details<br/>& confirm payment]
        
        CreditCardThreeDSecurePage[CreditCardThreeDSecurePage<br/>---<br/>3D Secure<br/>verification]
    end
    
    PaymentType -->|"💳 Credit Card"| BinNumberPage
    BinNumberPage --> InstallmentSelectionPage
    InstallmentSelectionPage --> CreditCardConfirmationPage
    CreditCardConfirmationPage -->|"🔒 3D Secure<br/>required"| CreditCardThreeDSecurePage
    CreditCardConfirmationPage -->|"✅ Direct<br/>payment"| ThankYouPage
    CreditCardThreeDSecurePage --> ThankYouPage
    
    %% =============================================================================
    %% INDEPENDENT: CAMPAIGNS & REWARDS (for Credit Card)
    %% Can be accessed after selecting credit card and entering BIN
    %% =============================================================================
    
    subgraph CreditCardIndependent["🎯 CAMPAIGNS & REWARDS (INDEPENDENT)"]
        CampaignListPage[CampaignListPage<br/>---<br/>Query available<br/>bank campaigns]
        
        CampaignSelectionPage[CampaignSelectionPage<br/>---<br/>Select campaign<br/>to apply]
        
        RewardListPage[RewardListPage<br/>---<br/>Query available<br/>card rewards]
        
        RewardSelectionPage[RewardSelectionPage<br/>---<br/>Select rewards<br/>to redeem]
    end
    
    CampaignListPage -->|"📋 Campaigns<br/>available"| CampaignSelectionPage
    CampaignSelectionPage -.->|"↩️ Returns"| EmptyCampaign[EmptyPage]
    RewardListPage -->|"🎁 Rewards<br/>available"| RewardSelectionPage
    RewardSelectionPage -.->|"↩️ Returns"| EmptyReward[EmptyPage]
    
    %% =============================================================================
    %% SAVED CARD FLOW
    %% Use previously saved card with optional 3D Secure
    %% =============================================================================
    
    subgraph SavedCardFlow["💾 SAVED CARD PAYMENT"]
        SavedCardSelectionPage[SavedCardSelectionPage<br/>---<br/>Select from<br/>saved cards]
        
        SavedCardInstallmentSelectionPage[SavedCardInstallmentSelectionPage<br/>---<br/>Select installment<br/>for saved card]
        
        SavedCardConfirmationPage[SavedCardConfirmationPage<br/>---<br/>Confirm payment<br/>with saved card]
        
        SavedCardThreeDSecurePage[SavedCardThreeDSecurePage<br/>---<br/>3D Secure for<br/>saved card]
    end
    
    PaymentType -->|"💾 Saved Card"| SavedCardSelectionPage
    SavedCardSelectionPage --> SavedCardInstallmentSelectionPage
    SavedCardInstallmentSelectionPage --> SavedCardConfirmationPage
    SavedCardConfirmationPage -->|"🔒 3D Secure"| SavedCardThreeDSecurePage
    SavedCardConfirmationPage -->|"✅ Direct"| ThankYouPage
    SavedCardThreeDSecurePage --> ThankYouPage
    
    %% =============================================================================
    %% PAY ON DELIVERY FLOW
    %% Cash/card on delivery with optional SMS verification
    %% =============================================================================
    
    subgraph PODFlow["💵 PAY ON DELIVERY"]
        PayOnDeliveryPaymentChoicePage[PayOnDeliveryPaymentChoicePage<br/>---<br/>Select payment method:<br/>• Cash<br/>• Card on delivery]
        
        SendSmsPage[SendSmsPage<br/>---<br/>Send SMS verification<br/>code to phone]
        
        VerifySmsPage[VerifySmsPage<br/>---<br/>Enter SMS<br/>verification code]
        
        PayOnDeliveryPage[PayOnDeliveryPage<br/>---<br/>Confirm pay<br/>on delivery order]
    end
    
    PaymentType -->|"💵 Pay on<br/>Delivery"| PODCheck{💵 Multiple<br/>Choices?}
    PODCheck -->|"✅ Yes"| PayOnDeliveryPaymentChoicePage
    PODCheck -->|"❌ No"| PODSmsCheck
    PayOnDeliveryPaymentChoicePage -->|"📱 SMS<br/>enabled"| SendSmsPage
    PayOnDeliveryPaymentChoicePage -->|"➡️ No SMS"| PayOnDeliveryPage
    PODSmsCheck{📱 SMS<br/>Verification?}
    PODSmsCheck -->|"✅ Yes"| SendSmsPage
    PODSmsCheck -->|"❌ No"| PayOnDeliveryPage
    SendSmsPage --> VerifySmsPage
    VerifySmsPage --> PayOnDeliveryPage
    PayOnDeliveryPage --> ThankYouPage
    
    %% =============================================================================
    %% FUNDS TRANSFER FLOW
    %% Bank transfer payment method
    %% =============================================================================
    
    subgraph FundsTransferFlow["🏦 FUNDS TRANSFER"]
        FundsTransferChoicePage[FundsTransferChoicePage<br/>---<br/>Select bank account<br/>for transfer]
        
        FundsTransferPage[FundsTransferPage<br/>---<br/>Get transfer details<br/>& complete order]
    end
    
    PaymentType -->|"🏦 Funds<br/>Transfer"| FundsTransferChoicePage
    FundsTransferChoicePage --> FundsTransferPage
    FundsTransferPage --> ThankYouPage
    
    %% =============================================================================
    %% BKM EXPRESS FLOW
    %% Turkish BKM Express payment system
    %% =============================================================================
    
    subgraph BKMFlow["📱 BKM EXPRESS"]
        BexSelectionPage[BexSelectionPage<br/>---<br/>Initialize BKM<br/>Express payment]
        
        BexBinNumberPage[BexBinNumberPage<br/>---<br/>Enter card BIN<br/>for BKM]
        
        BexInstallmentSelectionPage[BexInstallmentSelectionPage<br/>---<br/>Select installment<br/>for BKM]
        
        BexNoncePage[BexNoncePage<br/>---<br/>Generate payment<br/>nonce]
        
        BexCompletePage[BexCompletePage<br/>---<br/>Complete BKM<br/>payment]
    end
    
    PaymentType -->|"📱 BKM<br/>Express"| BexSelectionPage
    BexSelectionPage --> BexBinNumberPage
    BexBinNumberPage --> BexInstallmentSelectionPage
    BexInstallmentSelectionPage --> BexNoncePage
    BexNoncePage --> BexCompletePage
    BexCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% CASH REGISTER FLOW
    %% In-store payment at cash register with barcode
    %% =============================================================================
    
    subgraph CashRegisterFlow["💰 CASH REGISTER (IN-STORE)"]
        CashRegisterPage[CashRegisterPage<br/>---<br/>Generate barcode<br/>for in-store payment]
        
        CashRegisterInstallmentSelectionPage[CashRegisterInstallmentSelectionPage<br/>---<br/>Select installment<br/>at register]
        
        CashRegisterCompletePage[CashRegisterCompletePage<br/>---<br/>Show barcode<br/>& wait for payment]
    end
    
    PaymentType -->|"💰 Cash<br/>Register"| CashRegisterPage
    CashRegisterPage -->|"💳 Installment<br/>active"| CashRegisterInstallmentSelectionPage
    CashRegisterPage -->|"➡️ No<br/>installment"| CashRegisterCompletePage
    CashRegisterInstallmentSelectionPage --> CashRegisterCompletePage
    CashRegisterCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% INDEPENDENT: CASH REGISTER SMS (In-Store Only)
    %% =============================================================================
    
    subgraph CashRegisterIndependent["📱 CASH REGISTER SMS (INDEPENDENT)"]
        SendBarcodeSmsPage[SendBarcodeSmsPage<br/>---<br/>Send order barcode<br/>via SMS]
        
        SendCheckoutUrlSmsPage[SendCheckoutUrlSmsPage<br/>---<br/>Send checkout URL<br/>via SMS]
    end
    
    SendBarcodeSmsPage -.->|"↩️ Returns"| EmptyBarcode[EmptyPage]
    SendCheckoutUrlSmsPage -.->|"↩️ Returns"| EmptyUrl[EmptyPage]
    
    %% =============================================================================
    %% GPAY FLOW
    %% Garanti Pay payment system
    %% =============================================================================
    
    subgraph GPayFlow["📲 GARANTI PAY"]
        GPaySelectionPage[GPaySelectionPage<br/>---<br/>Initialize GPay<br/>payment]
        
        GPayRedirectPage[GPayRedirectPage<br/>---<br/>Redirect to GPay<br/>gateway]
        
        GPayCompletePage[GPayCompletePage<br/>---<br/>Complete GPay<br/>payment]
    end
    
    PaymentType -->|"📲 GPay"| GPaySelectionPage
    GPaySelectionPage --> GPayRedirectPage
    GPayRedirectPage --> GPayCompletePage
    GPayCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% REDIRECTION PAYMENT FLOW
    %% Generic redirection to payment gateway
    %% =============================================================================
    
    subgraph RedirectionFlow["🔄 REDIRECTION PAYMENT"]
        RedirectionPaymentSelectedPage[RedirectionPaymentSelectedPage<br/>---<br/>Initialize redirect<br/>to payment gateway]
        
        RedirectionPageCompletePage[RedirectionPageCompletePage<br/>---<br/>Complete after<br/>gateway redirect]
    end
    
    PaymentType -->|"🔄 Redirection"| RedirectionPaymentSelectedPage
    RedirectionPaymentSelectedPage --> RedirectionPageCompletePage
    RedirectionPageCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% MASTERPASS FLOW
    %% Masterpass digital wallet payment
    %% =============================================================================
    
    subgraph MasterpassFlow["🔐 MASTERPASS"]
        MasterpassBinNumberPage[MasterpassBinNumberPage<br/>---<br/>Enter card BIN<br/>for Masterpass]
        
        MasterpassInstallmentPage[MasterpassInstallmentPage<br/>---<br/>Select installment<br/>for Masterpass]
        
        MasterpassOrderNoPage[MasterpassOrderNoPage<br/>---<br/>Generate order number<br/>& check 3D]
        
        MasterpassCompletePage[MasterpassCompletePage<br/>---<br/>Complete Masterpass<br/>payment]
    end
    
    PaymentType -->|"🔐 Masterpass"| MasterpassBinNumberPage
    MasterpassBinNumberPage --> MasterpassInstallmentPage
    MasterpassInstallmentPage --> MasterpassOrderNoPage
    MasterpassOrderNoPage --> MasterpassCompletePage
    MasterpassCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% MASTERPASS REST FLOW
    %% Masterpass REST API variant with remote installments
    %% =============================================================================
    
    subgraph MasterpassRestFlow["🔐 MASTERPASS REST"]
        MasterpassRestBinNumberPage[MasterpassRestBinNumberPage<br/>---<br/>Enter card BIN<br/>for Masterpass REST]
        
        MasterpassRemoteInstallmentPage[MasterpassRemoteInstallmentPage<br/>---<br/>Get remote<br/>installment options]
        
        MasterpassRestInstallmentPage[MasterpassRestInstallmentPage<br/>---<br/>Local installment<br/>options]
        
        MasterpassRestOrderNoPage[MasterpassRestOrderNoPage<br/>---<br/>Generate order &<br/>check 3D]
        
        MasterpassRestCompletePage[MasterpassRestCompletePage<br/>---<br/>Complete Masterpass<br/>REST payment]
    end
    
    PaymentType -->|"🔐 Masterpass<br/>REST"| MasterpassRestBinNumberPage
    MasterpassRestBinNumberPage -->|"🌐 Remote<br/>installment"| MasterpassRemoteInstallmentPage
    MasterpassRestBinNumberPage -->|"💾 Local<br/>installment"| MasterpassRestInstallmentPage
    MasterpassRemoteInstallmentPage --> MasterpassRestOrderNoPage
    MasterpassRestInstallmentPage --> MasterpassRestOrderNoPage
    MasterpassRestOrderNoPage --> MasterpassRestCompletePage
    MasterpassRestCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% CREDIT PAYMENT FLOW
    %% Credit/loan based payment options (e.g., ComPay, Garanti Credit)
    %% =============================================================================
    
    subgraph CreditPaymentFlow["💳 CREDIT/LOAN PAYMENT"]
        CreditPaymentSelectionPage[CreditPaymentSelectionPage<br/>---<br/>Select credit<br/>provider]
        
        CreditPaymentConfirmationPage[CreditPaymentConfirmationPage<br/>---<br/>Confirm credit<br/>application]
        
        CreditPaymentCompletePage[CreditPaymentCompletePage<br/>---<br/>Complete after<br/>credit approval]
    end
    
    PaymentType -->|"💳 Credit<br/>Payment"| CreditPaymentSelectionPage
    CreditPaymentSelectionPage --> CreditPaymentConfirmationPage
    CreditPaymentConfirmationPage --> CreditPaymentCompletePage
    CreditPaymentCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% MOBILEXPRESS FLOW
    %% Complex stored card payment with multiple verification methods
    %% OTP, CVV, and 3D Secure support
    %% =============================================================================
    
    subgraph MobilExpressFlow["📲 MOBILEXPRESS (STORED CARD)"]
        MobilExpressSelectionPage[MobilExpressSelectionPage<br/>---<br/>Check user &<br/>initialize]
        
        MobilExpressCardFoundOtpRequiredPhonePage[MobilExpressCardFoundOtpRequiredPhonePage<br/>---<br/>Enter phone for<br/>OTP verification]
        
        MobilExpressCardFoundOtpRequiredOtpPage[MobilExpressCardFoundOtpRequiredOtpPage<br/>---<br/>Enter OTP<br/>code]
        
        MobilExpressCardListPage[MobilExpressCardListPage<br/>---<br/>Select from<br/>stored cards]
        
        MobilExpressInstallmentSelectionPage[MobilExpressInstallmentSelectionPage<br/>---<br/>Select installment<br/>for MobilExpress]
        
        MobilExpressTryPaymentPage[MobilExpressTryPaymentPage<br/>---<br/>Try payment<br/>execution]
        
        MobilExpressPaymentThreeDPage[MobilExpressPaymentThreeDPage<br/>---<br/>3D Secure<br/>verification]
        
        MobilExpressPaymentCompleteOtpPage[MobilExpressPaymentCompleteOtpPage<br/>---<br/>Complete with<br/>OTP]
        
        MobilExpressPaymentCompleteCvvPage[MobilExpressPaymentCompleteCvvPage<br/>---<br/>Complete with<br/>CVV]
        
        MobilExpressPaymentCompleteCvvAndOtpPage[MobilExpressPaymentCompleteCvvAndOtpPage<br/>---<br/>Complete with<br/>CVV & OTP]
    end
    
    PaymentType -->|"📲 MobilExpress"| MobilExpressSelectionPage
    MobilExpressSelectionPage -->|"📱 Needs<br/>OTP"| MobilExpressCardFoundOtpRequiredPhonePage
    MobilExpressSelectionPage -->|"✅ Direct<br/>access"| MobilExpressCardListPage
    MobilExpressCardFoundOtpRequiredPhonePage --> MobilExpressCardFoundOtpRequiredOtpPage
    MobilExpressCardFoundOtpRequiredOtpPage --> MobilExpressCardListPage
    MobilExpressCardListPage --> MobilExpressInstallmentSelectionPage
    MobilExpressInstallmentSelectionPage --> MobilExpressTryPaymentPage
    MobilExpressTryPaymentPage -->|"✅ Success"| ThankYouPage
    MobilExpressTryPaymentPage -->|"🔒 3D<br/>Required"| MobilExpressPaymentThreeDPage
    MobilExpressTryPaymentPage -->|"📱 OTP<br/>Required"| MobilExpressPaymentCompleteOtpPage
    MobilExpressTryPaymentPage -->|"🔢 CVV<br/>Required"| MobilExpressPaymentCompleteCvvPage
    MobilExpressTryPaymentPage -->|"🔐 CVV+OTP<br/>Required"| MobilExpressPaymentCompleteCvvAndOtpPage
    MobilExpressPaymentThreeDPage --> ThankYouPage
    MobilExpressPaymentCompleteOtpPage --> ThankYouPage
    MobilExpressPaymentCompleteCvvPage --> ThankYouPage
    MobilExpressPaymentCompleteCvvAndOtpPage --> ThankYouPage
    
    %% =============================================================================
    %% WALLET FLOW
    %% Digital wallet payments (Apple Pay, Google Pay, etc.)
    %% =============================================================================
    
    subgraph WalletFlow["👛 WALLET PAYMENT"]
        WalletSelectionPage[WalletSelectionPage<br/>---<br/>Select wallet type<br/>Apple/Google Pay]
        
        WalletPaymentPage[WalletPaymentPage<br/>---<br/>Initialize wallet<br/>payment]
        
        WalletCompletePage[WalletCompletePage<br/>---<br/>Complete direct<br/>wallet payment]
        
        WalletRedirectCompletePage[WalletRedirectCompletePage<br/>---<br/>Complete after<br/>wallet redirect]
    end
    
    PaymentType -->|"👛 Wallet"| WalletSelectionPage
    WalletSelectionPage --> WalletPaymentPage
    WalletPaymentPage -->|"🔄 Redirect<br/>required"| WalletRedirectCompletePage
    WalletPaymentPage -->|"✅ Direct"| WalletCompletePage
    WalletCompletePage --> ThankYouPage
    WalletRedirectCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% CONFIRMATION PAYMENT FLOW
    %% Payment requiring user confirmation (e.g., Paycell, TomPay)
    %% =============================================================================
    
    subgraph ConfirmationFlow["✅ CONFIRMATION PAYMENT"]
        ConfirmationPaymentAgreementCheckPage[ConfirmationPaymentAgreementCheckPage<br/>---<br/>Check if agreement<br/>required]
        
        ConfirmationPaymentAgreementConfirmPage[ConfirmationPaymentAgreementConfirmPage<br/>---<br/>Accept terms<br/>& conditions]
        
        ConfirmationPaymentSelectedPage[ConfirmationPaymentSelectedPage<br/>---<br/>Start payment<br/>request]
        
        ConfirmationPaymentQueryPage[ConfirmationPaymentQueryPage<br/>---<br/>Query payment<br/>status]
        
        ConfirmationPaymentCompletePage[ConfirmationPaymentCompletePage<br/>---<br/>Complete confirmed<br/>payment]
    end
    
    PaymentType -->|"✅ Confirmation"| ConfirmationPaymentAgreementCheckPage
    ConfirmationPaymentAgreementCheckPage -->|"📄 Agreement<br/>needed"| ConfirmationPaymentAgreementConfirmPage
    ConfirmationPaymentAgreementCheckPage -->|"➡️ No<br/>agreement"| ConfirmationPaymentSelectedPage
    ConfirmationPaymentAgreementConfirmPage --> ConfirmationPaymentSelectedPage
    ConfirmationPaymentSelectedPage --> ConfirmationPaymentQueryPage
    ConfirmationPaymentQueryPage --> ConfirmationPaymentCompletePage
    ConfirmationPaymentCompletePage --> ThankYouPage
    
    %% =============================================================================
    %% SIMPLE PAYMENT FLOWS
    %% Direct payment methods without complex flows
    %% =============================================================================
    
    subgraph SimplePayments["💰 SIMPLE PAYMENTS"]
        LoyaltyMoneyPage[LoyaltyMoneyPage<br/>---<br/>Pay with loyalty<br/>points/money]
        
        PayLaterCompletePage[PayLaterCompletePage<br/>---<br/>Pay later option<br/>Direct to order]
        
        B2BPage[B2BPage<br/>---<br/>B2B payment<br/>Business account]

        GiftCardPaymentPage[GiftCardPaymentPage<br/>---<br/>Complete payment<br/>with gift cards]
    end

    PaymentType -->|"🎁 Loyalty<br/>Money"| LoyaltyMoneyPage
    PaymentType -->|"📅 Pay<br/>Later"| PayLaterCompletePage
    PaymentType -->|"🏢 B2B"| B2BPage
    PaymentType -->|"🎁 Gift Card<br/>(full coverage)"| GiftCardPaymentPage
    LoyaltyMoneyPage --> ThankYouPage
    PayLaterCompletePage --> ThankYouPage
    B2BPage --> ThankYouPage
    GiftCardPaymentPage --> ThankYouPage
    
    %% =============================================================================
    %% CHECKOUT PROVIDER FLOW (INDEPENDENT)
    %% Complete separate flow for third-party checkout providers (e.g., Akifast)
    %% Handles entire checkout process through external provider
    %% =============================================================================
    
    subgraph CheckoutProviderFlow["🔗 CHECKOUT PROVIDER (INDEPENDENT FLOW)"]
        CheckoutProviderIndexPage[CheckoutProviderIndexPage<br/>---<br/>Start provider<br/>checkout process]
        
        CheckoutProviderSelectionPage[CheckoutProviderSelectionPage<br/>---<br/>Select checkout<br/>provider]
        
        CheckoutProviderAddressSelectionPage[CheckoutProviderAddressSelectionPage<br/>---<br/>Provider address<br/>selection]
        
        CheckoutProviderShippingOptionPage[CheckoutProviderShippingOptionPage<br/>---<br/>Provider shipping<br/>options]
        
        CheckoutProviderAgreementListPage[CheckoutProviderAgreementListPage<br/>---<br/>Show agreements<br/>& terms]
        
        CheckoutProviderNotificationPage[CheckoutProviderNotificationPage<br/>---<br/>Handle provider<br/>notification]
        
        CheckoutProviderThankYouPage[CheckoutProviderThankYouPage<br/>---<br/>Provider checkout<br/>complete]
    end
    
    CheckoutProviderIndexPage -->|"🔗 Provider<br/>available"| CheckoutProviderSelectionPage
    CheckoutProviderSelectionPage --> CheckoutProviderAddressSelectionPage
    CheckoutProviderAddressSelectionPage --> CheckoutProviderShippingOptionPage
    CheckoutProviderShippingOptionPage --> CheckoutProviderAgreementListPage
    CheckoutProviderAgreementListPage --> CheckoutProviderNotificationPage
    CheckoutProviderNotificationPage --> CheckoutProviderThankYouPage
    
    %% =============================================================================
    %% FINAL PAGES
    %% =============================================================================
    
    subgraph FinalPages["✅ COMPLETION"]
        ThankYouPage[ThankYouPage<br/>---<br/>Order completed<br/>Show order details<br/>Redirect to success]
    end
    
    ThankYouPage --> End([🎉 CHECKOUT<br/>COMPLETE])
    CheckoutProviderThankYouPage --> End
    
    %% =============================================================================
    %% STYLING
    %% =============================================================================
    
    classDef startEndStyle fill:#9c27b0,stroke:#7b1fa2,stroke-width:3px,color:#fff
    classDef entryStyle fill:#2196f3,stroke:#1976d2,stroke-width:2px,color:#fff
    classDef deliveryStyle fill:#ff9800,stroke:#f57c00,stroke-width:2px,color:#fff
    classDef addressStyle fill:#ffc107,stroke:#ffa000,stroke-width:2px,color:#000
    classDef shippingStyle fill:#4caf50,stroke:#388e3c,stroke-width:2px,color:#fff
    classDef optionalStyle fill:#00bcd4,stroke:#0097a7,stroke-width:2px,color:#fff
    classDef paymentStyle fill:#e91e63,stroke:#c2185b,stroke-width:2px,color:#fff
    classDef independentStyle fill:#9e9e9e,stroke:#616161,stroke-width:2px,stroke-dasharray:5 5,color:#fff
    classDef finalStyle fill:#4caf50,stroke:#2e7d32,stroke-width:3px,color:#fff
    
    class Start,End startEndStyle
    class IndexPage entryStyle
    class DeliveryOptionSelectionPage deliveryStyle
    class AddressSelectionPage,RetailStoreSelectionPage,PickupLocationSelectionPage,RemotePriceCalculationPage,SlotSelectionPage addressStyle
    class ShippingOptionSelectionPage,DataSourceShippingOptionSelectionPage,AttributeBasedShippingOptionSelectionPage,RemoteShippingOptionSelectionPage shippingStyle
    class SampleProductPage,ReservationSelectionPage optionalStyle
    class PaymentOptionSelectionPage,BinNumberPage,InstallmentSelectionPage,CreditCardConfirmationPage,CreditCardThreeDSecurePage paymentStyle
    class SavedCardSelectionPage,SavedCardInstallmentSelectionPage,SavedCardConfirmationPage,SavedCardThreeDSecurePage paymentStyle
    class PayOnDeliveryPaymentChoicePage,SendSmsPage,VerifySmsPage,PayOnDeliveryPage paymentStyle
    class FundsTransferChoicePage,FundsTransferPage paymentStyle
    class BexSelectionPage,BexBinNumberPage,BexInstallmentSelectionPage,BexNoncePage,BexCompletePage paymentStyle
    class CashRegisterPage,CashRegisterInstallmentSelectionPage,CashRegisterCompletePage paymentStyle
    class GPaySelectionPage,GPayRedirectPage,GPayCompletePage paymentStyle
    class RedirectionPaymentSelectedPage,RedirectionPageCompletePage paymentStyle
    class MasterpassBinNumberPage,MasterpassInstallmentPage,MasterpassOrderNoPage,MasterpassCompletePage paymentStyle
    class MasterpassRestBinNumberPage,MasterpassRemoteInstallmentPage,MasterpassRestInstallmentPage,MasterpassRestOrderNoPage,MasterpassRestCompletePage paymentStyle
    class CreditPaymentSelectionPage,CreditPaymentConfirmationPage,CreditPaymentCompletePage paymentStyle
    class MobilExpressSelectionPage,MobilExpressCardFoundOtpRequiredPhonePage,MobilExpressCardFoundOtpRequiredOtpPage paymentStyle
    class MobilExpressCardListPage,MobilExpressInstallmentSelectionPage,MobilExpressTryPaymentPage paymentStyle
    class MobilExpressPaymentThreeDPage,MobilExpressPaymentCompleteOtpPage,MobilExpressPaymentCompleteCvvPage,MobilExpressPaymentCompleteCvvAndOtpPage paymentStyle
    class WalletSelectionPage,WalletPaymentPage,WalletCompletePage,WalletRedirectCompletePage paymentStyle
    class ConfirmationPaymentAgreementCheckPage,ConfirmationPaymentAgreementConfirmPage,ConfirmationPaymentSelectedPage paymentStyle
    class ConfirmationPaymentQueryPage,ConfirmationPaymentCompletePage paymentStyle
    class LoyaltyMoneyPage,PayLaterCompletePage,B2BPage,GiftCardPaymentPage paymentStyle
    class CheckoutProviderIndexPage,CheckoutProviderSelectionPage,CheckoutProviderAddressSelectionPage independentStyle
    class CheckoutProviderShippingOptionPage,CheckoutProviderAgreementListPage,CheckoutProviderNotificationPage independentStyle
    class CheckoutProviderThankYouPage independentStyle
    class GiftBoxIndexPage,GiftBoxPage independentStyle
    class DeliveryBagsPage independentStyle
    class OrderNotePage,OrderSelectionPage,CouponSelectionPage,LoyaltyCardPage,LoyaltyMoneyUsagePage independentStyle
    class CampaignListPage,CampaignSelectionPage,RewardListPage,RewardSelectionPage independentStyle
    class SendBarcodeSmsPage,SendCheckoutUrlSmsPage independentStyle
    class GiftCardPage,GiftCardOtpPage,GiftCardOtpResendPage,GiftCardApplyPage,GiftCardRemovePage,GiftCardUpdateAmountPage independentStyle
    class ThankYouPage finalStyle

```

{% file src="/files/JGh4MMhrAxoHEEcq4pYl" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/checkout/checkout-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
