Skip to main content

JikoXpress Pro: Checkout & Order Management Architecture

JikoXpress Pro: Checkout & Order Management Architecture

Document Information

Property Value
Version 1.2.0
Status Draft
Created December 2025
UpdatedJanuary 2026
Purpose Development Guide & Requirements Reference

Executive Summary

This document defines the complete architecture for JikoXpress Pro's checkout and order management system. The system supports multiple sales channels (POS, Kiosk, Mobile App, WhatsApp)WhatsApp, Table QR, Drive-Through), flexible payment methods, configurable kitchen operations, and comprehensive printing workflows.

The architecture prioritizesis built on three core principles:

  1. Single Source of Truth - All channels create Orders through a singleunified sourcemodel
  2. of
  3. Progressive truthFeature whileUnlocking maintaining- flexibilityFrom forhome kitchen to enterprise chain on one platform
  4. Zero-Config Defaults - Works immediately, customize as needed

JikoXpress Pro serves diverse restaurant operation models - from a home chef with a mobile phone to multi-location fast food tochains finewith dining,drive-through from paper tickets to digital kitchen displays.lanes.


Part 1: Platform Tiers & Progressive Unlocking

1.1 The Vision: One Platform, All Scales

JikoXpress Pro is designed to grow with the business. A home chef starts with the simplest possible setup and progressively unlocks features as their operation scales.

STARTER          GROWING           PROFESSIONAL      ENTERPRISE
(Home Chef)      (Small Shop)      (Restaurant)      (Chain)

    📱      →      📱💻      →        💻🖥️      →       🏢🌐

• Mobile app     • + POS access    • + KDS           • + Multi-location
• Basic menu     • + Kiosk         • + Stations      • + Central menu
• Order list     • + Table QR      • + Drive-through • + Analytics
• Accept/Ready   • + Basic stats   • + Staff roles   • + API access
• Mobile money   • + More payments • + Tabs          • + Integrations
                 • + Printer       • + Inventory     • + White-label

1.2 Subscription Plans

STARTER Plan

Tagline: "Perfect for home chefs & small vendors"

Price: Free or minimal fee

Features Included:

  • Basic menu (up to 20 items)
  • Order management (receive, accept, prepare, complete)
  • Mobile app only
  • Mobile money payments (USSD)
  • Operating hours scheduling
  • Order history (30 days)
  • Table QR (1 table/location)
  • Basic push notifications

Limits:

  • 20 menu items
  • 100 orders/month
  • 1 staff account (owner only)
  • 1 location

Ideal For: Home kitchens, street food vendors, side hustle chefs, testing the platform


GROWING Plan

Tagline: "For busy kitchens ready to scale"

Price: Mid-tier monthly fee

Features Included:

  • Everything in STARTER
  • Unlimited menu items
  • POS access (desktop/tablet)
  • Kiosk channel
  • Table QR (unlimited)
  • WhatsApp bot ordering
  • Receipt printer support
  • Kitchen printer support
  • Card payments
  • Cash handling
  • Basic sales reports
  • Order history (1 year)

Limits:

  • 1,000 orders/month
  • 3 staff accounts
  • 1 location

Ideal For: Small restaurants, busy food stalls, cafes, food trucks


PROFESSIONAL Plan

Tagline: "Full-featured restaurant management"

Price: Higher-tier monthly fee

Features Included:

  • Everything in GROWING
  • Kitchen stations
  • KDS (Kitchen Display System)
  • Drive-through support
  • Tabs (pay-later for dine-in)
  • Table management
  • Up to 15 staff accounts
  • Roles & permissions
  • Discount limits by role
  • Advanced reports
  • Customer insights
  • Priority support

Limits:

  • Unlimited orders
  • 15 staff accounts
  • 1 location

Ideal For: Full-service restaurants, fast food outlets, bars & lounges, hotel restaurants


ENTERPRISE Plan

Tagline: "For chains & franchises"

Price: Custom pricing

Features Included:

  • Everything in PROFESSIONAL
  • Multi-location support
  • Central menu management
  • Consolidated cross-location reports
  • API access for integrations
  • Inventory management
  • White-label option
  • Dedicated support
  • Custom integrations
  • SLA guarantees

Limits:

  • Unlimited everything

Ideal For: Restaurant chains, franchises, hotel groups, cloud kitchens with multiple brands


1.3 Smart Onboarding & Segmentation

When a new kitchen signs up, 4 simple questions determine the recommended plan:

Question 1: Business Type

  • Home Kitchen / Catering → Score: 0
  • Food Stall / Vendor → Score: 1
  • Restaurant / Cafe → Score: 2
  • Chain / Multiple Locations → Score: 3

Question 2: Expected Orders Per Day

  • Just starting (1-10/day) → Score: 0
  • Getting busy (10-50/day) → Score: 1
  • High volume (50-200/day) → Score: 2
  • Very high (200+/day) → Score: 3

Question 3: Team Size

  • Just me → Score: 0
  • 2-5 people → Score: 1
  • 6-15 people → Score: 2
  • 15+ people → Score: 3

Question 4: Service Styles (multi-select)

  • Delivery only → Score: 0
  • Pickup only → Score: 0
  • Dine-in → Score: +1
  • Drive-through → Score: +2

Recommendation Logic:

  • Score 0-2: STARTER
  • Score 3-5: GROWING
  • Score 6-8: PROFESSIONAL
  • Score 9+: ENTERPRISE

1.4 Feature Modules (Unlockable)

Each feature is a module that can be toggled on/off based on subscription:

Kitchen Feature Modules:

CORE (Always On - STARTER):
├── basic_menu
├── order_management
├── mobile_notifications
├── basic_payments (mobile money)
├── operating_hours
└── order_history

CHANNELS (GROWING+):
├── pos_access
├── kiosk_channel
├── table_qr
└── whatsapp_bot

PAYMENTS (GROWING+):
├── card_payments
├── kitchen_wallet
├── cash_handling
└── custom_payment_methods

HARDWARE (GROWING+):
├── receipt_printer
├── kitchen_printer
└── cash_drawer

KITCHEN OPS (PROFESSIONAL+):
├── stations
├── kds_display
├── expeditor_mode
└── drive_through

DINE-IN (PROFESSIONAL+):
├── tabs
├── table_management
└── reservations (future)

TEAM (PROFESSIONAL+):
├── staff_accounts
├── roles_permissions
├── discount_limits
└── shift_management

INSIGHTS (PROFESSIONAL+):
├── sales_reports
├── popular_items
├── peak_hours
└── customer_insights

SCALE (ENTERPRISE):
├── multi_location
├── central_menu
├── consolidated_reports
├── api_access
└── white_label

INVENTORY (ENTERPRISE):
├── ingredient_tracking
├── auto_deduction
├── low_stock_alerts
└── supplier_orders

1.5 Usage-Based Upgrade Triggers

The platform monitors usage and suggests upgrades:

STARTER → GROWING Triggers:

  • Orders this month > 80 (approaching 100 limit)
  • Menu items > 15 (approaching 20 limit)
  • Customer requested card payment
  • Multiple login attempts (wants staff accounts)

GROWING → PROFESSIONAL Triggers:

  • Orders this month > 800 (approaching 1,000 limit)
  • Staff accounts maxed at 3
  • Searched for: tabs, dine-in, stations, KDS
  • Average prep time > 15 minutes

PROFESSIONAL → ENTERPRISE Triggers:

  • Asked about second location
  • Searched for: multi-location, franchise, API
  • Orders this month > 5,000

Part 2: Sales Channels

1.2.1 Channel Overview

JikoXpress Pro supports sixseven distinct sales channels, each with unique characteristics and requirements.characteristics.

POS (Point of Sale)

The primary channel for counter staff and waiters.

Characteristics:

  • Staff-operated, requires speed and efficiency
  • Supports both immediate payment and pay-later (tab) scenarios
  • Full access to all payment methods
  • Primary channel for dine-in customers
  • Can lookup existing customers or create new ones
  • Generates QR codes for customer self-payment via app

Availability: GROWING plan and above

Typical Flow:

    1. Staff enters items into cart (local/memory storage)
    2. Identifies customer (optional - lookup or quick create)optional)
    3. Selects fulfillment type (dine-in with table number)
    4. Chooses payment timing: Pay Now or Pay Later (Tab)
    5. Processes payment or opens tab
    6. Kitchen receives order based on configuration

Kiosk

Self-service terminals for customer-driven ordering.

Characteristics:

  • Customer-operated, must be intuitive
  • Session-based cart storage
  • Limited payment options (QR, USSD, Cash, Card Swipe)
  • Primarily for dine-in and pickup customers physically present
  • Anonymous or optional login
  • Prints order stub for customer

Availability: GROWING plan and above

Typical Flow:

    1. Customer browses menu on touchscreen
    2. Adds items to cart with modifications
    3. Proceeds to checkout
    4. Selects payment method
    5. Completes payment (or receives cash payment slip for counter)slip)
    6. Receives printed stub with order number
    7. Waits for number to be called

Table QR

Self-ordering from customer's own device by scanning QR code at table.

Characteristics:

  • Customer scans QR code placed on their table
  • Opens in App (if installed) or Web browser (no app needed)
  • No login required - anonymous ordering
  • Table number automatically identified from QR
  • Session-based cart (browser) or linked to app session
  • Payment: USSD, Cash (pay at counter), App Wallet (if logged in)
  • Dine-in only

TypicalAvailability: Flow:

STARTER
  • Customer sits at table, scans QR code
  • QR contains: kitchen ID + table number
  • System detects: Has app? → Open in app : Open web menu
  • Customer browses menu on their phone
  • Adds items to cart with modifications
  • Proceeds to checkout
  • Table number pre-filledplan (from1 QR)
  • table),
  • Selects payment method:
    • USSD: Receives prompt, confirms payment
    • Cash: Order sent, customer pays at counter
    • App Wallet: If logged into app, can use wallet
  • Order confirmed, sent to kitchen
  • Food delivered to tableGROWING+ (staff knows table number)
unlimited)

QR Code Content:

https://menu.jikoxpress.com/{kitchenSlug}?table=5
or
jikoxpress://menu/{kitchenId}?table=5 (deep link for app)

Web vs App Experience:

Aspect Web (No App) App
Login Not required Optional
Cart Browser session Persistent
Payment USSD, Cash USSD, Cash, Wallet
Order History Not available Available
ReorderNot availableAvailable
Push Notifications Not available Available

Table QR Advantages:

  • No app download required (web fallback)
  • Reduces staff workload (customer self-orders)
  • Table number automatic (no errors)
  • Customer orders at their own pace
  • Can add more items easily (scan again or keep session)

Mobile App

Characteristics:

  • Requires user account
  • Server-side persistent cart
  • Supports delivery, pickup, and dine-in
  • Preferred payment: App Wallet, USSD
  • Push notifications for order status
  • Order history and reordering

TypicalAvailability: Flow:All plans (customer-facing)

  • User browses menu in app
  • Adds items to persistent cart
  • Selects fulfillment (delivery address or pickup location)
  • Proceeds to checkout
  • Pays using saved payment method or new method
  • Receives confirmation and real-time status updates

WhatsApp

Conversational ordering via chatbot integration.

Characteristics:

  • Customer identified by phone number
  • Chatbot-guided ordering process
  • Cart maintained in conversation state
  • Payment via USSD or payment link
  • Supports delivery and pickup only

Availability: GROWING plan and above


Drive-Through

Vehicle-based ordering and pickup.

Characteristics:

  • ConfirmationDesigned sentfor viaspeed WhatsApp- messagetime SLA is critical
  • Lane-based queue management
  • Speaker/mic or digital menu board ordering
  • Payment and pickup at windows
  • Vehicle tracking by order number

Availability: PROFESSIONAL plan and above

Typical Flow:

    1. Customer messagesenters kitchen's WhatsApp numberlane
    2. ChatbotPlaces guidesorder throughat menuorder selectionpoint (speaker or screen)
    3. ConfirmsProceeds orderto detailspayment window
    4. SendsProceeds paymentto optionspickup (USSD prompt or payment link)
    5. Customer completes payment externallywindow
    6. Receives confirmation message with order detailsand exits

Direct Counter Service

Simplified model for small operations where counter is kitchen.

Characteristics:

  • Same person takes order and prepares food
  • No kitchen routing needed
  • Immediate handoff to customer
  • May only need receipt, no kitchen ticket

Availability: All plans (default for STARTER)


1.2.2 Channel Comparison Matrix

Number
Aspect POS Kiosk Table QR App WhatsApp Drive-Through
Operator Staff Customer Customer Customer Customer Staff/Screen
Cart Storage Memory/LocalMemory Session Session/App Server-sideServer ConversationMemory
Customer IdentityID Optional/LookupOptional Anonymous/LoginAnonymous Anonymous/LoginAnonymous Required Phone Optional
Pay Later (Tab) Yes No No No No
Kwa Deni (Credit)Yes (hidden)NoNoNoNo
Fulfillment Options All Dine-in, Pickup Dine-in only All Delivery, PickupDrive-Through
Speed Priority Critical High Normal Normal Normal Critical
PaymentTime MethodsSLANormalNormalNormalNormalNormalCritical
Min PlanGROWINGGROWINGSTARTER All LimitedGROWING USSD, Cash, Wallet*App-supportedUSSD, Link
Requires DownloadN/AN/ANo (web fallback)YesNoPROFESSIONAL

*Wallet only available if customer has app and is logged in


Part 2:3: Order & Tab Architecture

2.3.1 Core Concept: Single Source of Truth

All channels ultimately create Orders. The Order is the central entity that:

  • Tracks what was purchased
  • Connects to payment records
  • Drives kitchen operations
  • Generates receipts and reports

Key Principle: Cart is an unpersisted Order draft. Checkout persists the Order and initiates payment.

2.3.2 Order Lifecycle

CREATED → PENDING_PAYMENT → CONFIRMED → PREPARING → READY → COMPLETED
                ↓
            CANCELLED

State Definitions:

Status Description Kitchen Visible Payment Status
CREATED Order recorded but not yet submitted No Not started
PENDING_PAYMENT Awaiting async payment confirmation Depends on config In progress
CONFIRMED Payment complete or tab opened, ready for kitchenopened Yes Paid or Deferred
PREPARING Kitchen actively working on order Yes N/A
READY Order complete, waiting for pickup/deliverypickup Yes N/A
COMPLETED Customer received order No N/A
CANCELLED Order cancelled before completion No Refunded if paid

2.3.3 Payment Status (Separate from Order Status)

Orders track payment independently:

Payment Status Description
UNPAID No payment received (tab scenario)
PENDING Async payment initiated, awaiting confirmation
PARTIAL Some payment received (future feature)
PAID Full payment received
CREDITTaken on credit - Kwa Deni (debt owed)
REFUNDED Payment returned to customer

This separation allows:

  • Kitchen to prepare food while payment is UNPAID (tab scenario)
  • Order to be CONFIRMED but payment PENDING (async payment)
  • Clear tracking for end-of-day reconciliation

2.3.4 Tab System (Pay Later)

Tabs enable the "eat now, pay later" model common in dine-in scenarios.

Availability: PROFESSIONAL plan and above

What is a Tab?

  • A container for one or more orders at a table
  • Remains open until customer is ready to pay
  • Aggregates totals across all orders
  • Single payment closes the entire tab

Tab Lifecycle:

[No Tab] → OPEN → CLOSED
             ↑
    (orders can be added while OPEN)

Tab Creation:

  • Auto-created when first "Pay Later" order placed for a table
  • One open tab per table per day
  • Identified by: Kitchen + Table Number + Date + Status

Tab Rules:

  • Customer can add more orders to open tab (new orders, not modifying existing)
  • Each order goes to kitchen independently
  • Tab shows running total of all orders
  • Discounts can be applied at tab level before closing
  • Single payment closes tab and marks all orders as PAID

Why Multiple Orders per Tab (not modifying single order):Tab:

  • Kitchen already received and is preparing original order
  • New items create new kitchen tickets (clear for kitchen staff)
  • Each order has clean, independent lifecycle
  • Item-level status tracking remains accurate
  • Simplifies kitchen display and ticket management

2.3.5 KwaFulfillment Deni (Credit/Debt System)Types

A controlled feature allowing trusted customers to take food on credit and pay later - days or weeks after consumption.

Important: This is NOT the same as Tab (pay later same day). Kwa Deni is actual debt that extends beyond the restaurant visit.

2.5.1 Feature Characteristics

Availability:

  • POS channel ONLY
  • NOT available on Kiosk, App, or WhatsApp
  • Hidden by default - not visible in standard POS interface
  • Must be explicitly enabled by kitchen admin
  • Requires special permission for staff to use

Security Controls:

  • Kitchen-level setting to enable/disable entirely
  • Staff-level permission required (not all staff can offer credit)
  • Customer must be registered (no anonymous credit)
  • Credit limit per customer (optional)
  • Manager approval option for amounts above threshold

2.5.2 Kwa Deni vs Tab Comparison

(Credit/Debt) without paying +Order
AspectType Tab (Pay Later)Description KwaQueue DeniIdentifier Handoff Point
TimelineDINE_IN SameCustomer visiteats at restaurant Days/weeks/monthsTable NumberTable
Customer leavesPICKUP MustCustomer paycollects firstorder CanOrder leaveNumber Counter
Customer identityDELIVERY OptionalOrder delivered to customer RequiredAddressDoor
Default availabilityDRIVE_THROUGH YesVehicle-based pickup NoLane (hidden)
Staff permission# All POS staffRestricted staff only
Partial paymentNoYes
Risk levelLowHigh
Use caseDine-in convenienceTrusted regulars, corporate accountsWindow

2.5.3
Kwa

Part Deni4: Drive-Through Architecture

4.1 Overview

Drive-through is modeled as both a channel and a fulfillment type, allowing it to integrate seamlessly with the existing order system while supporting its unique requirements.

4.2 Drive-Through Flow

Creating Debt:

1.LANE_ENTRY Customer ordersORDER_POINT food→ PAYMENT_WINDOW → PICKUP_WINDOW → EXIT
     ↓            ↓              ↓               ↓
  (registereddetected)  customer required)
2. Staff completes (order entry
3. At payment, staff selects "Kwa Deni" optioncreated) (if permitted)
4. System checks:
   - Is feature enabled for this kitchen?
   - Does staff have credit permission?
   - Is customer registered?
   - Is customer within credit limit?payment)    (if limits configured)
   - Does amount require manager approval?
5. If manager approval needed:
   - Manager enters PIN or approves
6. Order created with:
   - paymentStatus: CREDIT
   - Linked to customer's debt account
7. Kitchen receives order normally
8. Customer leaves without paying
9. Debt recorded against customerhanded)

Paying Off Debt:

1. Customer returns to pay (or staff initiates)
2. Staff looks up customer's debt balance
3. System shows:
   - Total outstanding debt
   - Individual unpaid orders (optional detail)
   - Oldest debt date

4. Customer can pay: - Full amount (clears all debt) - Partial amount (reduces debt balance) - Specific orders (if itemized payment enabled) 5. Payment processed 6. Debt balance updated 7. Receipt shows: Payment toward credit balance

2.5.4 Debt Tracking

Customer Debt Account:

  • Total outstanding balance
  • List of unpaid orders
  • Payment history
  • Credit limit (if set)
  • Last payment date
  • Oldest unpaid order date

Debt Order Properties:

  • Standard order properties
  • paymentStatus: CREDIT
  • debtCreatedAt: When debt was created
  • debtDueDate: Optional due date
  • debtApprovedBy: Staff/manager who approved

Debt Payment Properties:

  • Amount paid
  • Payment method
  • Applied to which orders (or general balance)
  • Remaining balance after payment

2.5.53 Configuration Options

Kitchen Level:

Kwa DeniDrive-Through Settings:
├──
  enabled: false (defaultdefault)
  numberOfLanes: 1-4
  
  orderPointType:
    - hiddenSPEAKER_MIC        entirely)# ├──Staff requireManagerApproval:takes true/falseorder ├──via approvalThreshold:speaker
    Amount- aboveDIGITAL_MENU_BOARD which# managerCustomer mustself-orders approveon ├──screen
    allowPartialPayment:- true/falseBOTH               ├──# showInPOS:Screen falsewith (evenstaff ifbackup
  
  enabled,windowConfiguration:
    can- beSINGLE_WINDOW      hidden# fromPay mainand UI)pickup ├──at defaultCreditLimit:same 0window
    (no- limit)SEPARATE_WINDOWS   or# amountPayment └──window, debtAgingAlertDays:then 30pickup (alertwindow
  
  forvehicleTracking:
    old- debt)ORDER_NUMBER       # Customer given number, called at window
    - MANUAL             # Staff tracks position manually
    - TIMER_BASED        # System estimates based on avg times

Staff

4.4 Level:

Drive-Through Order Properties

Staff Credit Permission:
├── canOfferCredit: falseOrder (default)when ├──fulfillment maxCreditAmount:= MaximumDRIVE_THROUGH):
  singlelaneNumber: transaction1-4
  └──vehicleDescription: requiresApprovalAbove:"Red AmountToyota" requiring(optional)
  managerorderPointTimestamp: overridewhen order was taken
  paymentWindowTimestamp: when payment completed
  pickupWindowTimestamp: when order handed off

Customer

4.5 Level:

Customer Credit Settings:
├── creditEnabled: true/false (can this customer use credit)
├── creditLimit: Maximum outstanding balance allowed
├── currentBalance: Current debt amount
└── creditStatus: GOOD_STANDING | SUSPENDED | BLOCKED

2.5.6 Business Rules

Who Can Receive Credit:

  • Must be registered customer with verified identity
  • Kitchen admin can whitelist specific customers
  • Optional: Require minimum purchase history
  • Optional: Credit application/approval process

Credit Limits:

  • Global default limit (kitchen setting)
  • Per-customer override (higherTicket for trusted, lower for new)
  • Can be zero (unlimited) for corporate accounts

When Credit is Blocked:

  • Customer exceeds credit limit
  • Customer has debt older than X days
  • Customer status set to SUSPENDED or BLOCKED
  • Staff attempts without permission

Partial Payments:

  • If enabled, customer can pay any amount toward balance
  • Payment applied to oldest debt first (FIFO)
  • Or customer/staff can specify which orders to pay

2.5.7 Reporting & Alerts

Debt Reports:

  • Total outstanding debt (all customers)
  • Debt by customer
  • Aging report (0-30 days, 31-60 days, 60+ days)
  • Debt created today/this week/this month
  • Payments received toward debt

Alerts:

  • Customer approaching credit limit
  • Customer exceeding credit limit
  • Debt aging past threshold
  • Large credit transaction (above threshold)

2.5.8 UI Considerations

Hidden by Default:

  • Kwa Deni option NOT visible in standard payment screen
  • Access via: Settings menu, long-press, or special navigation
  • Prevents accidental use
  • Prevents customer seeing and requesting it

When Visible:

  • Only shown after admin enables AND staff has permission
  • Clear visual distinction from regular payment
  • Warning/confirmation before proceeding
  • Shows customer's current balance before adding more

2.5.9 Receipt for Credit Transaction

Drive-Through
================================
        JIKOXPRESSORDER KITCHEN#47
     ================================Lane Receipt2 #:| R-20241229-0052DRIVE-THROUGH
   Date:12:34 29-Dec-2024PM 14:30| Customer: John Doe03-Jan-2026
--------------------------------
ITEMS:>> HOT LINE <<

1x Burger
   12,000- 1xNo onions
   - Extra cheese

2x Fries
   5,000- Large

--------------------------------
TOTAL: 17,000
================================
PAYMENT: CREDIT (Kwa Deni)
Approved by: Manager Jane

Previous Balance:      25,000
This Order:            17,000DRIVE-THROUGH -------------------------------- NEWSPEED BALANCE DUE:       42,000
================================
   Payment due upon request
================================

2.5.10 Receipt for Debt Payment

================================
       JIKOXPRESS KITCHEN
================================
Receipt #: R-20241229-0067
Date: 29-Dec-2024 16:45
Customer: John Doe
--------------------------------
PAYMENT TOWARD CREDIT BALANCE

Previous Balance:      42,000
Payment (Cash):       -20,000
--------------------------------
REMAINING BALANCE:     22,000
================================
      Thank you!PRIORITY
================================

2.4.6 OrderDrive-Through vs Tab vs Kwa Deni Decision FlowMetrics

Which channel?
├── POS: How will customer pay?
│   ├── Pay Now: Create Order, process payment immediately
│   ├── Pay Later (Tab): Find/create Tab, Order linked

Due to Tabthe critical nature └──of Customerspeed MUSTin paydrive-through:

before

Tracked leavingMetrics:

    └──
  • Average Kwatime Deniper vehicle
  • Time at each station (Credit): │ ├── Check: Feature enabled? Staff permitted? Customer registered? │ ├── If all yes: Create Order with paymentStatus: CREDIT │ └── Customer can leave, pays another day │ ├── Kiosk: Create Order, require payment (no Tab, no Kwa Deni) │ └── Cash option: Kitchen timing configurable │ ├── Table QR: Create Order, require payment (no Tab, no Kwa Deni) │ ├── USSD/Wallet: Processorder, payment, confirmpickup)
  • order
  • Orders per └──hour Cashper option:lane
  • Kitchen
  • Peak timinghour configurableanalysis
├──

Alerts:

App:
    Create
  • Order Order,taking require> immediate2 paymentminutes
  • Payment └──processing WhatsApp:> Create1 Order,minute
  • require
  • Pickup immediatewait payment>
3 minutes
  • Lane backup detected

  • Part 3:5: Checkout Flow

    3.5.1 Universal Checkout Principles

    Regardless of channel, checkout always involves:

    1. Identify Items - What is being ordered
    2. Identify Customer - Who is ordering (optional for some channels)
    3. Identify Fulfillment - How order will be fulfilled
    4. Calculate Totals - Items + taxes + fees - discounts
    5. Select Payment - How customer will pay
    6. Process Payment - Execute payment or defer
    7. Create/Confirm Order - Finalize and notify kitchen

    5.2 Default Flow (Zero Configuration)

    If a kitchen sets nothing, this is what happens:

    Default Configuration:
      fulfillmentTypes: [PICKUP]
      paymentTiming: ON_PAYMENT_COMPLETE
      orderRouting: DISPLAY_ONLY
      kitchenNotification: DISPLAY
      printOnConfirm: true
      customerStub: true
      tabsEnabled: false
    

    Default Experience:

    1. Kitchen signs up
    2. Sets their menu
    3. Immediately can take orders via mobile app
    4. Customer pays → Kitchen sees order on screen → Prepares → Calls number → Customer picks up

    No stations, no tabs, no printers required. Just works.

    5.3 Channel-Specific Checkout Flows

    POS Checkout (Pay Now)

    1. Staff finalizes cart
    2. System creates checkout session
    3.2 Staff selects customer (optional) and fulfillment
    4. System calculates totals
    5. Staff selects payment method
    6. System processes payment
    7. Order created with status CONFIRMED
    8. Kitchen notified
    9. Receipt printed
    

    POS Checkout (Pay Later / Tab)

    1. Staff finalizes cart
    2. Staff selects "Pay Later" and enters table number
    3. System finds/creates Tab for table
    4. Order created with status CONFIRMED, paymentStatus UNPAID
    5. Order linked to Tab
    6. Kitchen notified immediately
    7. Tab remains open for additional orders
    
    [Later, when customer ready to pay]
    8. Staff retrieves Tab for table
    9. Staff applies discounts if needed
    10. Staff processes payment
    11. Tab closed, all orders marked PAID
    12. Receipt printed
    

    Drive-Through Checkout

    1. Customer arrives at order point (lane assigned)
    2. Staff/screen takes order
    3. Order created with fulfillment DRIVE_THROUGH
    4. Customer proceeds to payment window
    5. Payment processed
    6. Order status → CONFIRMED, sent to kitchen
    7. Customer proceeds to pickup window
    8. Kitchen prepares (priority queue)
    9. Order handed to customer
    10. Order status → COMPLETED
    

    Kiosk / Table QR Checkout

    1. Customer finalizes cart
    2. System creates checkout session
    3. Customer selects fulfillment
    4. Customer selects payment method:
       - USSD: Receives prompt, confirms
       - Cash: "Pay at counter" displayed
    5. On payment confirmation:
       - Order confirmed
       - Kitchen notified
       - Stub printed (kiosk) or shown on screen (Table QR)
    

    5.4 Checkout Session

    A checkout session provides:

    • Temporary holding state during checkout process
    • Protection against abandoned checkouts
    • Support for async payment flows
    • Prevention of race conditions

    Session Properties:

    • Expires after configured time (e.g., 15 minutes)
    • Contains cart snapshot at checkout initiation
    • Links to Order once created
    • Tracks payment attempts and status

    Session States:

    Status Description
    ACTIVE Checkout in progress
    COMPLETED Payment successful, order created
    EXPIRED Session timed out (15 min default)
    CANCELLED User or system cancelled

    3.3 Channel-Specific Checkout Flows

    POS Checkout (Pay Now)

    1. Staff finalizes cart
    2. System creates checkout session
    3. Staff selects customer (optional) and fulfillment
    4. System calculates totals and shows available payment methods
    5. Staff selects payment method
    6. System processes payment
    7. Order created with status CONFIRMED, paymentStatus PAID
    8. Kitchen notified (based on configuration)
    9. Receipt printed
    

    POS Checkout (Pay Later / Tab)

    1. Staff finalizes cart
    2. Staff selects "Pay Later" and enters table number
    3. System finds existing open Tab for table OR creates new Tab
    4. Order created with status CONFIRMED, paymentStatus UNPAID
    5. Order linked to Tab
    6. Kitchen notified immediately
    7. Customer stub printed (optional)
    8. Tab remains open for additional orders
    
    [Later, when customer ready to pay]
    9. Staff retrieves Tab for table
    10. System shows all orders and total
    11. Staff applies discounts if needed
    12. Staff processes payment
    13. Tab closed, all orders marked PAID
    14. Receipt printed
    

    Kiosk Checkout

    1. Customer finalizes cart on screen
    2. System creates checkout session
    3. Customer selects fulfillment (dine-in table or pickup)
    4. System shows available payment methods (QR, USSD, Cash, Card)
    5. Customer selects payment method:
       - QR: Display QR code, wait for app scan confirmation
       - USSD: Customer enters phone, receives prompt, confirms
       - Cash: Print "pay at counter" slip, staff confirms manually
       - Card: Process via terminal integration
    6. On payment confirmation:
       - Order created with status based on kitchen config
       - Kitchen notified (based on configuration)
       - Order stub printed for customer
    

    App Checkout

    1. User reviews cart in app
    2. User initiates checkout
    3. System creates checkout session
    4. User selects/confirms delivery address or pickup
    5. System calculates totals including delivery fee if applicable
    6. User selects payment method (Wallet, USSD, saved methods)
    7. User confirms payment
    8. On payment confirmation:
       - Order created with status CONFIRMED
       - Kitchen notified
       - Push notification sent to user
       - User sees order tracking screen
    

    WhatsApp Checkout

    1. Chatbot summarizes order and total
    2. Chatbot asks for fulfillment preference (delivery/pickup)
    3. If delivery: Chatbot collects/confirms address
    4. Chatbot presents payment options:
       - USSD: Sends prompt to customer's phone
       - Payment Link: Sends clickable payment link
    5. Customer completes payment externally
    6. Webhook receives payment confirmation
    7. Order created with status CONFIRMED
    8. Chatbot sends confirmation message with order details
    9. Kitchen notified
    

    Table QR Checkout (Web)

    1. Customer scans QR code at table
    2. Web menu opens in browser (no app needed)
    3. Customer browses and adds items to cart
    4. Customer taps checkout
    5. System creates checkout session
    6. Table number pre-filled from QR data
    7. Customer selects payment method:
       - USSD: Enter phone number, receive prompt, confirm
       - Cash: Select "Pay at Counter"
    8. For USSD:
       - Payment initiated
       - Wait for confirmation
       - Order confirmed, sent to kitchen
       - Customer sees confirmation with order number
    9. For Cash:
       - Order created with paymentStatus PENDING_CASH
       - Kitchen notified (based on config: before or after cash confirmed)
       - Customer shown: "Please pay [amount] at counter"
       - Staff confirms cash received
       - Order fully confirmed
    10. Food delivered to table (staff knows table from order)
    

    Table QR Checkout (App)

    1. Customer scans QR code at table
    2. Deep link opens app (if installed)
    3. Table number passed to app session
    4. Customer browses menu in app
    5. Adds items to cart (app cart, persistent if logged in)
    6. Customer taps checkout
    7. Table number pre-filled from QR
    8. Customer selects payment method:
       - App Wallet (if logged in and has balance)
       - USSD
       - Cash (pay at counter)
    9. Payment processed or cash selected
    10. Order confirmed, sent to kitchen
    11. Push notification when ready (if logged in)
    12. Food delivered to table
    

    3.4 Checkout Session API Concept

    Create Session:

    Input:
      - items (menuId, quantity, modifiers, notes)
      - channel (POS, KIOSK, APP, WHATSAPP)
      - customerId (optional)
      - fulfillmentType (DINE_IN, PICKUP, DELIVERY)
      - tableNumber (for dine-in)
      - deliveryAddress (for delivery)
    
    Output:
      - sessionId
      - summary (items, subtotal, taxes, fees, total)
      - availablePaymentMethods (filtered by channel and kitchen config)
      - expiresAt
    

    Process Payment:

    Input:
      - paymentMethod
      - paymentDetails (method-specific data)
      - payLater (boolean, POS only)
      - tabId (if adding to existing tab)
    
    Output:
      - status (COMPLETED, PENDING, DEFERRED)
      - orderId
      - tabId (if tab created or used)
      - paymentInstructions (for async: QR data, USSD prompt, link)
    

    Part 4:6: Payment Architecture

    4.6.1 Payment Method Categories

    Immediate Settlement

    Payment completes instantly within the transaction.

    Method Description Channels
    Cash Physical currency, staff confirms receiptcurrency POS, Kiosk
    Card Swipe Card terminal processes immediately POS, Kiosk
    Kitchen Wallet Deduct from customer's kitchen-Kitchen-issued balance POS
    App Wallet Deduct from customer's platformPlatform wallet POS (via QR), App

    Asynchronous Settlement

    Payment initiated but confirmation arrives later via callback/webhook.

    Method Description Channels
    Mobile Money (USSD) Customer receives prompt, confirms on phone All
    QR Scan (App Wallet) POS displays QR, customer scans with appQR POS
    Payment Link Customer clicks link, pays in browserlink WhatsApp
    Custom MethodsLipa Number, bank transfer, etc.POS

    Deferred Settlement

    No payment now, to be collected later.

    Method Description Channels
    Pay Later (Tab) Opens tab, payment collectedpay before leaving POS only

    6.2 Payment Method by Plan

    only restricted)
    MethodSTARTERGROWINGPROFESSIONALENTERPRISE
    KwaMobile DeniMoney (Credit)USSD) Debt recorded, payment collected days/weeks later POS
    Cash-
    Card-
    Kitchen Wallet-
    App Wallet
    Pay Later (hidden,Tab) --
    Custom Methods--

    4.2 Payment Method Configuration

    Each kitchen configures which payment methods are available and for which channels.

    Configuration Properties:

    • Method type and name
    • Enabled/disabled status
    • Which channels can use this method
    • Whether manual confirmation is required
    • Method-specific configuration (Lipa number, bank details, etc.)

    Example Configurations:

    Fast Food Restaurant:

    • Cash: POS, Kiosk
    • Card: POS, Kiosk
    • Mobile Money: All channels
    • App Wallet: POS (QR), App
    • Pay Later: Disabled

    Fine Dining Restaurant:

    • Cash: POS
    • Card: POS
    • Kitchen Wallet: POS (for regulars)
    • Pay Later: POS (enabled)
    • Mobile Money: Disabled

    4.6.3 Payment Processing Flow

    Immediate Payment Flow

    1. Customer/staff selects payment method
    2. System validates method is available for channel
    3. For Wallet: Check sufficient balance
    4. Process payment:
       - Wallet: Deduct balance, record transaction
       - Cash: Mark as received, staff confirms
       - Card: Send to terminal, await response
    5. On success: Update payment status to COMPLETED
    6. Create payment record
    7. Proceed with order confirmation
    

    Async Payment Flow

    1. Customer/staff selects async payment method
    2. System creates payment record with status PENDING
    3. System generates payment instructions:
       - QR: Generate QR code data
       - USSD: Initiate USSD push to customer phone
       - Link: Generate unique payment URL
    4. Return instructions to client for display
    5. Customer completes payment externally
    6. Payment provider sends webhook/callback
    7. System validates callback authenticity
    8. Update payment status to COMPLETED
    9. Update order status to CONFIRMED
    10. Trigger kitchen notification
    

    Deferred Payment Flow (Tab)

    1. Staff selects "Pay Later"
    2. System creates/finds Tab for table
    3. Order created with paymentStatus UNPAID
    4. Order linked to Tab
    5. Kitchen proceeds with preparation
    6. [Customer adds more orders - repeat steps 2-5]
    7. When ready to close:
       - Staff retrieves Tab
       - System calculates total across all orders
       - Staff applies discounts if needed
       - Staff processes payment (any immediate method)
       - Tab status set to CLOSED
       - All linked orders set to paymentStatus PAID
    

    4.4 Kitchen Wallet

    A prepaid balance system for loyal customers, managed by the kitchen.customers.

    Characteristics:

    • Issued and managed by individual kitchen
    • Not platform-wide (unlike App Wallet)
    • Can be topped up via cash at counter
    • Used for quick payment without cash handling
    • Balance visible to POS staff during checkout

    Use Cases:

    • Regular customers with running credit
    • Corporate accounts
    • Staff meals
    • VIP customers

    4.5 Partial Payments

    Current Recommendation: Not supported in V1

    Rationale:

    • Adds significant complexity to payment tracking
    • Edge cases around partial failures
    • Reconciliation becomes more difficult
    • Rare in actual restaurant operations

    Future Consideration:

    • Schema should support multiple payment records per order/tab
    • UI restricts to single payment method initially
    • Can be enabled for POS dine-in scenarios later

    4.66.4 Discount Handling

    Discounts can be applied at checkout to reduce the total.

    Discount Types:

    • Percentage: Reduce total by X%
    • Fixed Amount: Reduce total by fixed value

    Discount Application Points:

    • Item level: Discount on specific menu item
    • Order level: Discount on order subtotal
    • Tab level: Discount on tab total (before final payment)

    Staff Discount Limits:Limits (PROFESSIONAL+):

    • Each staff role has maximum discount percentage allowed
    • Exceeding limit requires manager approval (PIN or override)PIN)
    • All discounts recorded with who applied and who approved

    Example Discount Flow:

    Tab total: 50,000
    Staff applies 10% discount (within their 10% limit)
    New total: 45,000
    Customer pays: 45,000 ✓
    
    Tab total: 50,000
    Staff needs 20% discount (exceeds their 10% limit)
    System prompts for manager PIN
    Manager enters PIN
    Discount approved and recorded
    New total: 40,000
    Customer pays: 40,000 ✓
    

    Part 5:7: Kitchen Operations

    5.7.1 Operation Models

    Model A: Direct Counter Service (Default for STARTER)

    Order Confirmed → Same person prepares → Immediate handoff
    

    RestaurantsNo operatekitchen differently.routing, Theno systemprinters, mustno support multiple models.complexity.

    Model A:B: Paper Ticket Kitchen

    Traditional model with physical tickets.

    Order Confirmed → Print ticket → Hand-carry to kitchen →
    Kitchen works from paper
    → Calls out order number
    

    Characteristics:

    Traditional,
    • Reliable,reliable, no technology dependency in kitchen
    • Kitchen staff familiar with paper workflow
    • Requires physical ticket transport
    • Limited real-time status visibility
    kitchen.

    Model B:C: Kitchen Display System (KDS)

    Modern paperless kitchen.

    Order Confirmed → Appears on kitchen screen →
    Kitchen marks items done on screen → Customer notified
    

    Characteristics:

    • Real-time order visibility
    • Item-level status tracking
    • No paper waste
    • Requires reliable network and hardware

    Model C: Hybrid

    Kitchen uses both screens and paper.

    Order Confirmed → Appears on screen AND prints ticket ScreenKitchen formarks overview, paper for line cooksdone
    

    Characteristics:Real-time visibility, paperless, item-level tracking.

    • Best of both worlds
    • Redundancy if one system fails
    • Higher operational cost

    Model D: Expeditor ControlledHybrid

    Expeditor (senior staff) controls kitchen flow.

    Order Confirmed → GoesScreen toAND expeditorpaper
    

    Best of both, redundancy if one fails.

    Model E: Expeditor Controlled (Fine Dining)

    Order Confirmed → Expeditor screen → Expeditor "fires"fires items when ready →
    Station receives items in controlled sequence
    

    Characteristics:

    • Pacing control for multi-course meals
    • Prevents kitchen overwhelm
    • Requires trained expeditor
    • Best for fine dining

    Model E: Direct Counter Service

    No kitchen routing needed.meals.

    Order Confirmed → Same person prepares and serves →
    Immediate handoff to customer
    

    Characteristics:

    • Simplest model
    • For small operations
    • Counter person sees order on POS screen

    5.7.2 Kitchen Stations (PROFESSIONAL+)

    Larger kitchens have multiple stations, each responsible for certain menu items.stations:

    Common Stations:

    • Hot Line: Grills, fryers, sauté
    • Cold Line: Salads, desserts, cold appetizersdesserts
    • Bar: Beverages, cocktails
    • Bakery: Bread, pastries
    • Expeditor: Final assembly, quality checkassembly

    Station Routing:

    Routing
    • Each menu item assigned to a station
    • When order confirmed, items grouped by station
    • Each station receives only their items
    • Supports parallel preparation

    Example Order Routing:Example:

    Order #47:
    ├── Burger → Hot Line
    ├── Caesar Salad → Cold Line
    ├── Beer → Bar
    └── Cheesecake → Cold Line
    Hot Line receives: 1x Burger
    Cold Line receives: 1x Caesar Salad, 1x Cheesecake
    Bar receives: 1x Beer
    

    5.7.3 Kitchen Timing Configuration

    Critical Decision: When does kitchen receive the order?

    Setting Description Use Case
    ON_ORDER_CREATED Before payment Trusted dine-in, speed priorityin
    ON_PAYMENT_COMPLETE After payment Kiosk, delivery, fraud preventiondelivery
    MANUAL Staff triggers Special events, controlled pacingevents

    ConfigurationDefault by Channel:

    Kitchen can set different timing for different channels:

    • POS Dine-in: ON_ORDER_CREATED (trusted customers)
    • POS Pickup: ON_PAYMENT_COMPLETE (ensure payment)
    • Kiosk: ON_PAYMENT_COMPLETE or configurable
    • Table QR: ON_PAYMENT_COMPLETE or configurable (like Kiosk)
    • App: ON_PAYMENT_COMPLETE
    • WhatsApp: ON_PAYMENT_COMPLETE
  • Drive-Through:

    Table QR Cash Special Case:

    Similar to Kiosk, when Table QR customer selects cash payment:

    • KITCHEN_FIRST: Order goes to kitchen, customer pays at counter
    • PAYMENT_FIRST: Order waits until staff confirms cash receivedON_PAYMENT_COMPLETE

    Kitchen configures based on trust model. Since table is known, KITCHEN_FIRST is often acceptable.

    Kiosk Cash Special Case:

    When kiosk customer selects cash payment:

    • KITCHEN_FIRST: Order goes to kitchen, customer pays at counter
    • PAYMENT_FIRST: Order waits until staff confirms cash received

    This is kitchen-configurable based on their trust model and layout.

    5.7.4 Kitchen Configuration Summary

    Kitchen Operation Settings:
      ├──orderRouting:
        Order Routing Mode
    │   ├──- DIRECT_TO_STATIONS
        (items go directly to assigned stations)
    │   ├──- EXPEDITOR_CONTROLLED
        (expeditor fires items)
    │   ├──- DISPLAY_ONLY
        (no auto-print, screen only)
    │   └──- NONE (counter service,service no- kitchendefault)
      
      routing)notificationMethod:
        │
    ├── Notification Method
    │   ├──- DISPLAY (KDSKDS)
        screens)
    │   ├──- PRINTER
        (paper tickets)
    │   ├──- BOTH
        (screen and paper)
    │   └──- NONE (counter service)service - ├──default)
      
      TimingtimingByChannel:
        by Channel
    │   ├── POS Dine-in:pos_dine_in: ON_ORDER_CREATED | ON_PAYMENT_COMPLETE
        │   ├── POS Pickup: ON_ORDER_CREATED |pos_pickup: ON_PAYMENT_COMPLETE
        │   ├── Kiosk:kiosk: ON_PAYMENT_COMPLETE
        | configurable
    │   ├── Table QR:table_qr: ON_PAYMENT_COMPLETE
        | configurable
    │   ├── App:app: ON_PAYMENT_COMPLETE
        │   └── WhatsApp:whatsapp: ON_PAYMENT_COMPLETE
        drive_through: ├──ON_PAYMENT_COMPLETE
      
      KioskkioskCashFlow:
        Cash Flow
    │   ├──- KITCHEN_FIRST (prepare before paymentcash confirmed)
        │   └──- PAYMENT_FIRST (wait for cash confirmation)- │
    └── Table QR Cash Flow
        ├── KITCHEN_FIRST (prepare before payment confirmed)
        └── PAYMENT_FIRST (wait for cash confirmation)default)
    

    5.5 Kitchen Display System (KDS)

    For kitchens using digital displays.

    Display Features:

    • Shows pending orders for station
    • Color coding by age (green → yellow → red)
    • Touch to mark item/order complete
    • Sound alerts for new orders
    • Filter by station
    • Priority flagging for rush orders

    Display Layout Example:

    ┌─────────────────────────────────────────────────────────────┐
    │  HOT LINE                                      2:34 PM      │
    ├─────────────────────────────────────────────────────────────┤
    │  #47        │  #48         │  #49         │  #51           │
    │  Table 5    │  Pickup      │  Table 2     │  Delivery      │
    │  2 min ago  │  5 min ago   │  1 min ago   │  Just now      │
    │─────────────│──────────────│──────────────│────────────────│
    │  1x Burger  │  2x Wings    │  1x Steak    │  3x Burger     │
    │   -no onion │  1x Burger   │  1x Fish     │  2x Wings      │
    │  2x Fish    │              │              │  1x Salad      │
    │             │              │              │                │
    │  [START]    │  [WORKING]   │  [START]     │  [START]       │
    └─────────────────────────────────────────────────────────────┘
    

    KDS Configuration:

    • Which stations to show on this display
    • Alert thresholds (warning at X minutes, critical at Y minutes)
    • Sort order (oldest first, priority first)
    • Sound settings

    5.6 Customer Facing Display

    Shows customers their order status.

    ┌─────────────────────────────────────────────────────────────┐
    │                    NOW SERVING                              │
    │                                                             │
    │     #45      #46                                           │
    ├─────────────────────────────────────────────────────────────┤
    │                    PREPARING                                │
    │                                                             │
    │     #47      #48      #49      #50      #51                │
    └─────────────────────────────────────────────────────────────┘
    

    Features:

    • Shows orders ready for pickup
    • Shows orders being prepared
    • Optional voice announcement
    • Updates in real-time

    Part 6:8: Printing Architecture

    6.8.1 Print Types

    Print Type When Where Purpose
    Kitchen Ticket Order sent to kitchen Kitchen printer(s)printer Tell kitchen whatWhat to prepare
    Customer Receipt Payment completed POS printer Proof of purchase
    Bill/Check Customer requests POS printer Show amountAmount due before payment
    Order Stub Kiosk/pickupKiosk order Kiosk/counterKiosk printer Customer's orderOrder number reference
    Void Notice Item voided Kitchen printer NotifyCancel kitchen of cancellationnotification

    6.8.2 Kitchen Ticket Example

    Sent to kitchen when order is ready for preparation.

    Content:

    • Order number (large, prominent)
    • Table number or pickup/delivery indicator
    • Fulfillment type
    • Timestamp
    • Station name (if station-specific)
    • Items with quantities
    • Modifiers and special instructions
    • Server/staff name

    Example Kitchen Ticket:

    ================================
            ORDER #47
         Table 5 | Dine-in
       12:34 PM | 29-Dec-202403-Jan-2026
    --------------------------------
    >> HOT LINE <<
    
    1x Burger
       - No onions
       - Extra cheese
    
    2x Fish & Chips
       - One mild spice
    
    --------------------------------
    Server: John
    ================================
    

    Station-Specific Printing:

    When kitchen has multiple stations:

    • Items grouped by assigned station
    • Each station gets ticket with only their items
    • Same order number on all tickets for coordination

    Add-On Ticket (for tab additional orders):

    ================================
          ** ADD TO #47 **
         Table 5 | Dine-in
       12:52 PM | 29-Dec-2024
    --------------------------------
    >> HOT LINE <<
    
    1x Chicken Wings
    
    --------------------------------
    ================================
    

    Void Ticket:

    ================================
         ** VOID FROM #47 **
         Table 5
    --------------------------------
    >> HOT LINE <<
    
    VOID: 1x Burger
    
    Reason: Customer changed mind
    Approved: Manager Jane
    ================================
    

    6.8.3 Customer Receipt Example

    Printed after payment completion.

    Content:

    • Business information (name, address, tax ID)
    • Receipt number (for accounting)
    • Date and time
    • Staff who processed
    • Itemized list with prices
    • Modifiers shown with items
    • Subtotal
    • Discounts (shown separately)
    • Tax breakdown
    • Total
    • Payment method and amount
    • Change given (for cash)
    • Footer message (customizable)

    Example Receipt:

    ================================
           JIKOXPRESS KITCHEN
        123 Main Street, Dar
          Tel: +255 123 456
    
          TAX ID: 12345678
    ================================
    Receipt #: R-20241229-20260103-0047
    Date: 29-Dec-202403-Jan-2026 13:45
    Table: 5
    Server: John
    Cashier: Mary
    --------------------------------
    ITEMS:
    1x Burger              12,000
       Extra cheese         1,500
    2x Fish & Chips        30,000
    1x Chicken Wings        8,000
    1x Caesar Salad         7,500
    2x Beer                 8,000
    --------------------------------
    Subtotal:              67,00043,500
    Discount (10%):        -6,700
    --------------------------------4,350
    VAT (18%):              10,8547,047
    --------------------------------
    TOTAL:                 71,15446,197
    ================================
    PAYMENT:
    CashMobile 75,000Money           Change:46,197
    3,846Ref: MP12345678
    ================================
          Thank you!
    Please come again
    
      ** WiFi: kitchen2025 **
    ================================
    

    6.8.4 Bill/Check (Pre-Payment)

    Given to customer before payment when they ask "Can I have the bill?"

    Content:

    • Business name
    • Table identifier
    • Date/time
    • Items and prices
    • Subtotal
    • Tax
    • Total due
    • Note: "This is not a receipt"

    Example Bill:

    ================================
           JIKOXPRESS KITCHEN
    ================================
           TABLE 5 - BILL
       29-Dec-2024 13:30
    --------------------------------
    1x Burger              12,000
       Extra cheese         1,500
    2x Fish & Chips        30,000
    1x Chicken Wings        8,000
    1x Caesar Salad         7,500
    2x Beer                 8,000
    --------------------------------
    Subtotal:              67,000
    VAT (18%):             12,060
    --------------------------------
    TOTAL DUE:             79,060
    ================================
       Please pay at counter
    
       This is not a receipt
    ================================
    

    6.5 Order Stub

    Given to customer at kiosk or counter for pickup reference.

    Content:

    • Order number (large)
    • Items summary (optional based on config)
    • Pickup location
    • Estimated wait time (optional)

    Example Stub:

    ================================
          ORDER #47
    ================================
       Your order is being
          prepared!
    --------------------------------
    1x Burger
    2x Fish & Chips
    
    Pickup at: COUNTER A
    Wait time: ~10 mins
    --------------------------------
    Show this stub when your
    number is called
    
    #47
    ================================
    

    6.6 Print Trigger Configuration

    Kitchens configure what prints when.

    Configurable Triggers:

    EventPossible Actions
    ORDER_CONFIRMEDPrint kitchen ticket, print customer stub, notify KDS
    PAYMENT_COMPLETEPrint kitchen ticket, print receipt, print stub
    BILL_REQUESTEDPrint bill
    ORDER_READYNotify customer display, send SMS
    ITEM_VOIDEDPrint void notice

    Configuration allows:

    • Different triggers for different channels
    • Different triggers for different fulfillment types
    • Enable/disable specific prints

    Example Configurations:

    Fast Food:

    ON PAYMENT_COMPLETE for KIOSK:
      → Print kitchen ticket
      → Print customer stub
      → Notify KDS
    
    ON PAYMENT_COMPLETE for POS:
      → Print kitchen ticket
      → Print receipt
      → Notify KDS
    

    Fine Dining:

    ON ORDER_CONFIRMED for POS (dine-in):
      → Print kitchen ticket (payment comes later)
    
    ON TAB_CLOSED for POS:
      → Print receipt
    
    ON BILL_REQUESTED:
      → Print bill
    

    6.7 Print Job ManagementArchitecture

    Print Job Lifecycle:

    PENDING → CLAIMED → PRINTED
                  ↓
               FAILED
    

    Print Job Properties:

    • Order/Tab reference
    • Print type (ticket, receipt, stub, etc.)
    • Target printer or printer type
    • Content (structured data)
    • Status
    • Claimed by (which device)
    • Timestamps

    Print Delivery Models:

    Model A: Backend Direct Print

    • Backend sends directly to network printers
    • Works for cloud-connected printers
    • Harder for local USB/Bluetooth printers

    Model B:Model: Client Pull (Recommended)

    • Backend creates print jobs with content
    • POS/Kiosk app polls for pending jobs
    • App prints locally
    • App updates job status
    • Works with local printers
    • Supports offline queuing

    Client Pull Flow:

    1. Order confirmed
    2. Backend creates PrintJob (status: PENDING)
    3. POS app polls: GET /print-jobs?status=PENDING
    4. POS app claims job: POST /print-jobs/{id}/claimjob
    5. POS app formatsprints content for local printerlocally
    6. POS app printsmarks 7. POS app updates: POST /print-jobs/{id}/complete
    

    6.8

    Works Printwith Contentlocal Structure

    USB/Bluetooth

    Printprinters, jobssupports containoffline structured data, not pre-formatted text. Client renders based on printer capabilities.queuing.

    Example Kitchen Ticket Content:

    {
      "type": "KITCHEN_TICKET",
      "orderNumber": 47,
      "orderType": "DINE_IN",
      "tableNumber": "5",
      "station": "Hot Line",
      "timestamp": "2024-12-29T12:34:00",
      "server": "John",
      "isAddition": false,
      "isVoid": false,
      "items": [
        {
          "name": "Burger",
          "quantity": 1,
          "modifiers": ["No onions", "Extra cheese"],
          "notes": null
        },
        {
          "name": "Fish & Chips",
          "quantity": 2,
          "modifiers": ["One mild spice"],
          "notes": null
        }
      ]
    }
    

    Client app uses kitchen's print template settings to render this appropriately for their printer.

    6.9 Print Template Configuration

    Each kitchen can customize print appearance.

    Template Settings:

    • Header text (business name, address)
    • Footer text (thank you message, WiFi password)
    • Show/hide logo
    • Paper width (58mm or 80mm)
    • Font size preferences
    • Content options (show prices on kitchen ticket, etc.)

    Part 7:9: Numbering Systems

    7.9.1 Order Number

    • Purpose: Kitchen identification, customer reference,reference
    • display screens

    • Format: Simple integer, resets daily

    • Example: #47

      Properties:

      • Sequential within kitchen within day
      • Resets to 1 each day
      • Used on kitchen tickets, stubs, display screens
      • Easy to call out verbally

      Generation:

      • On order creation
      • Per kitchen, per date sequence
      • Must handle concurrent orders (proper locking)

      7.9.2 Receipt Number

      • Purpose: Accounting, tax compliance,compliance
      • audit trail

      • Format: Prefix-Date-Sequence

      • Example: R-20241229-20260103-0047 or JKX-20241229-0047

        Properties:

        • Never resets (continuous or daily with date prefix)
        • Generated only when payment completes
        • One tab with multiple orders = one receipt
        • Used for refunds, reports, tax filings

        Generation:

        • On payment completion
        • Not on order creation (order might be cancelled)
        • Tab payment generates single receipt for all orders

        7.9.3 Tab Identifier

        Purpose: Internal tracking, staff reference

        Format: Can use table number as identifier

        Display: "Table 5's tab" or "Tab #12"

        Properties:

        • One open tab per table per day
        • Closed tabs retained for history

        7.4 Internal IDs

        • All entities have UUID primary keys for:

          • Database relationships
          • Used for database relationships and API references
          • Integration stability

          Display numbers (order #, receipt #) are separate from internal IDs.


          Part 8: Event-Driven Architecture

          8.1 Order Events

          The system generates events at key moments. Actions are triggered based on kitchen configuration.

          Event Types:

          EventDescription
          ORDER_CREATEDOrder record created
          ORDER_CONFIRMEDOrder submitted and ready for processing
          PAYMENT_INITIATEDPayment process started
          PAYMENT_COMPLETEPayment successful
          PAYMENT_FAILEDPayment unsuccessful
          SENT_TO_KITCHENKitchen notified of order
          ITEM_STARTEDKitchen started preparing item
          ITEM_READYItem preparation complete
          ORDER_READYAll items ready for customer
          ORDER_PICKED_UPCustomer received order
          ORDER_COMPLETEDOrder fully closed
          ORDER_CANCELLEDOrder cancelled
          ITEM_VOIDEDItem removed from order

          8.2 Event-Action Mapping

          Kitchens configure what happens when events occur.

          Configuration Structure:

          Event Action:
            - Trigger Event (which event fires this)
            - Action (what to do)
            - Conditions (when to apply)
            - Enabled (on/off)
          

          Example Mappings:

          When: PAYMENT_COMPLETE
          Conditions: channel = KIOSK
          Actions:
            - Print kitchen ticket
            - Print customer stub
            - Notify KDS
            - Update customer display
          
          When: ORDER_READY
          Conditions: fulfillment = PICKUP
          Actions:
            - Show on customer display
            - Send SMS notification
          
          When: ORDER_CONFIRMED
          Conditions: channel = POS, fulfillment = DINE_IN
          Actions:
            - Print kitchen ticket (payment comes later for tabs)
            - Notify KDS
          

          8.3 Benefits of Event-Driven Approach

          • Flexibility: Kitchen customizes workflow without code changes
          • Decoupling: Core logic separated from notification/printing
          • Auditability: Event log shows exactly what happened when
          • Extensibility: New actions added without changing core flowIDs

          Part 9:10: Configuration Presets

          9.10.1 Purpose

          Not all kitchens want to configure every setting. Presets provide sensible defaults for common operation types.

          9.2 Available Presets

          Home Kitchen Preset (STARTER Default)

          orderRouting: NONE
          kitchenNotification: NONE
          sendToKitchen: immediate (same person)
          customerStub: false
          customerDisplay: false
          tabsEnabled: false
          

          Fast Food Preset

          Order Routing:orderRouting: DIRECT_TO_STATIONS
          Kitchen Notification:kitchenNotification: DISPLAY
          (KDS)
          Send to Kitchen:sendToKitchen: ON_PAYMENT_COMPLETE
          CustomercustomerStub: Stub:true
          Yes,customerDisplay: ontrue
          paymenttabsEnabled: complete
          Customer Display: Enabled
          Kiosk Cash Flow: KITCHEN_FIRST
          Pay Later (Tab): Disabledfalse
          

          Casual Dining Preset

          Order Routing:orderRouting: DIRECT_TO_STATIONS
          Kitchen Notification:kitchenNotification: PRINTER
          Send to Kitchen:sendToKitchen: ON_PAYMENT_COMPLETE
          CustomercustomerStub: Stub:optional
          OptionalcustomerDisplay: Customerfalse
          Display:tabsEnabled: Disabled (server delivers)
          Kiosk Cash Flow: PAYMENT_FIRST
          Pay Later (Tab): Enabledtrue
          

          Fine Dining Preset

          Order Routing:orderRouting: EXPEDITOR_CONTROLLED
          Kitchen Notification:kitchenNotification: BOTH
          (screen + paper)
          Send to Kitchen:sendToKitchen: ON_ORDER_CONFIRMED
          (trustcustomerStub: dine-in)false
          CustomercustomerDisplay: Stub:false
          DisabledtabsEnabled: true (waiter service)
          Customer Display: Disabled
          Kiosk: Not used
          Pay Later (Tab): Enabled, default for dine-inin)
          

          Cafe/Coffee ShopDrive-Through Preset

          OrderorderRouting: Routing:DIRECT_TO_STATIONS
          NONEkitchenNotification: DISPLAY
          sendToKitchen: ON_PAYMENT_COMPLETE
          customerStub: false
          customerDisplay: true (countershows service)order Kitchennumbers)
          Notification:tabsEnabled: NONEfalse
          (baristadriveThrough:
            seesenabled: POS)true
            Sendlanes: to1
            Kitchen:combinedWindows: Immediate (same person)
          Customer Stub: Simple (name + number)
          Customer Display: Optional
          Pay Later (Tab): Disabledtrue
          

          Food Truck Preset

          Order Routing:orderRouting: DISPLAY_ONLY
          Kitchen Notification:kitchenNotification: DISPLAY
          (single screen)
          Send to Kitchen:sendToKitchen: ON_PAYMENT_COMPLETE
          CustomercustomerStub: Stub:true
          YescustomerDisplay: Customer Display: Singlesingle screen
          PaytabsEnabled: Later (Tab): Disabledfalse
          

          9.3 Preset Customization

          Kitchen selects preset, then can override any individual setting. Preset just provides starting point.


          Part 10:11: Data Model Overview

          This section provides conceptual entity definitions. Not database schemas - just the key entities and their relationships.

          10.11.1 Core Entities

          Kitchen

          The restaurant or food service establishment.

          • Has many staff members
          • Has many menu items
          • Has configuration settings
          • Has subscription tier and enabled features
          • Has many orders, tabs, customers

          Customer

          A person who orders from a kitchen.

          • Can have App Wallet (platform-wide)
          • Can have Kitchen Wallet (specific to kitchen)kitchen-specific)
          • Can have order history
          • Identified by phone number or account

          Tab (PROFESSIONAL+)

          A container for dine-in orders that will be paid together.

          • Belongs to a kitchen
          • Associated with a table number
          • Has many orders
          • Has status (OPEN, CLOSED)
          • Can have tab-level discounts

          Order

          A single order transaction.

          • Belongs to a kitchen
          • Optionally belongs to a tab
          • Optionally linked to a customer
          • Has many order items
          • Has order status (lifecycle)
          • Hasand payment status
          • Has channel source
          • Has fulfillment type
          • Has order number (daily reset)

          Order Item

          A line item within an order.

          • Belongs to an order
          • References a menu item
          • Has quantity
          • quantity,
          • Has modifiers
          • Hasmodifiers, notes
          • Has item status (for kitchen tracking)
          • Has line total

          Payment

          A payment transaction.

          • Can be linkedLinked to an order or tab
          • Has payment method
          • Has amount
          • Hasand status (PENDING, COMPLETED, FAILED, etc.)
          • Has reference/confirmation code
          • Records who received (for cash)

          Receipt

          An immutable record of a completed transaction.

          • Generated on payment completion
          • Has unique receipt number
          • Contains snapshot of items, prices, totalstransaction
          • Records discounts and tax
          • Records payment method(s)
          • Cannot be modifiedImmutable (only voided)
          • voided,
          not

          Customer Debt Account

          Tracks credit/debt (Kwa Deni) for customers.

          • Belongs to a kitchen and customer
          • Has total outstanding balance
          • Has credit limit (optional)
          • Has status (GOOD_STANDING, SUSPENDED, BLOCKED)
          • Links to unpaid credit orders
          • Links to debt payments made

          Debt Payment

          A payment made toward outstanding credit balance.

          • Belongs to customer debt account
          • Has amount paid
          • Has payment method
          • Records which orders were paid (optional)
          • Has remaining balance after payment

          Checkout Session

          Temporary state during checkout process.

          • Contains cart snapshot
          • Has expiration time
          • Links to created order
          • Tracks session status

          Table QR Code

          QR code configuration for a table.

          • Belongs to a kitchen
          • Has table number/identifier
          • Has QR code data (URL with kitchen + table)
          • Has generated image (for printing)
          • Enabled/disabled status
          • Created/updated timestampsmodified)

          10.11.2 ConfigurationSubscription Entities& Features

          Kitchen
          Kitchen:
            Settings

          id:

          Operationaluuid configurationname: forstring asubscription: kitchen.

          plan:
            STARTER
          • Order| routingGROWING mode
          • |
          • KitchenPROFESSIONAL notification| method
          • ENTERPRISE
          • Timingstatus: settingsACTIVE by| channel
          • TRIAL
          • Kiosk| cashPAST_DUE flow| setting
          • CANCELLED
          • Kwastarted_at: Denidatetime enabled/disabledcurrent_period_end: (hiddendatetime byusage: default)
          • orders_this_month:
          • Kwainteger Denimenu_items_count: approvalinteger thresholds
          • staff_accounts_count:
          integer

          Paymentlocations_count: Method

          integer

          Configuredfeatures: payment# optionsDerived forfrom aplan kitchen.

          pos_enabled:
            boolean
          • Methodkiosk_enabled: typeboolean andtable_qr_enabled: name
          • boolean
          • Enabledwhatsapp_enabled: channels
          • boolean
          • Requirestabs_enabled: confirmationboolean flag
          • stations_enabled:
          • Method-specificboolean configuration
          • kds_enabled:
          boolean

          Kitchendrive_through_enabled: Station

          boolean

          Ateam_enabled: preparationboolean stationmulti_location_enabled: withinboolean theprofile: kitchen.

          #
            From
          • Nameonboarding andbusiness_type: description
          • HOME_KITCHEN
          • Assigned| printer
          • FOOD_STALL
          • Display| configuration
          • RESTAURANT
          |

          KitchenCHAIN Printer

          expected_orders_per_day:

          Astring printerteam_size: devicestring forservice_styles: the[DELIVERY, kitchen.

          PICKUP,
            DINE_IN,
          • NameDRIVE_THROUGH] and type (kitchen, receipt, kiosk)
          • Connection details
          • Assigned station (for kitchen printers)

          Print Template

          Customizable print formatting.

          • Print type (ticket, receipt, stub, bill)
          • Header and footer text
          • Content options

          Event Action

          Configured action triggered by events.

          • Trigger event
          • Action type
          • Conditions (channel, fulfillment)
          • Enabled status

          Staff Discount Limit

          Discount permissions by role.

          • Role
          • Maximum discount percentage
          • Requires approval flag

          10.11.3 Entity Relationships

          Kitchen
          ├── has many → Staff
          ├── has many → Menu Items
          ├── has many → Customers (Kitchen Wallets)
          ├── has many → Orders
          ├── has many → Tabs
          ├── has many → Payments
          ├── has many → Receipts
          ├── has one → Kitchen Settings
          ├── has one → Subscription
          ├── has many → Payment Methods
          ├── has many → Kitchen Stations
          ── has many → Kitchen Printers
          ├── has many → Print Templates
          └── has many → Event Actions
          
          Tab
          ├── belongs to → Kitchen
          ├── has many → Orders
          ├── has many → Tab Discounts
          └── has one → Payment (on close)
          
          Order
          ├── belongs to → Kitchen
          ├── belongs to → Tab (optional)
          ├── belongs to → Customer (optional)
          ├── has many → Order Items
          ├── has many → Payments
          ├── has many → Print Jobs
          └── generates → Receipt
          (on payment)
          
          Order Item
          ├── belongs to → Order
          ├── references → Menu Item
          └── assigned to → Kitchen Station
          
          Payment
          ├── belongs to → Kitchen
          ├── belongs to → Order or Tab
          └── references → Payment Method
          
          Receipt
          ├── belongs to → Kitchen
          ├── belongs to → Order or Tab
          ├── belongs to → Customer (optional)
          └── records → Payment details (snapshot)
          
          Print Job
          ├── belongs to → Kitchen
          ├── references → Order or Tab
          ├── targets → Kitchen Printer
          └── uses → Print Template
          

          Part 11:12: APIDelivery StructureIntegration Overview(Future)

          This section outlines the conceptual API structure. Not detailed specifications - just the key endpoint groups and their purposes.

          11.12.1 CheckoutMultiple APIsDelivery Providers

          JikoXpress Pro will support multiple delivery providers:

          SessionPlanned Management:Providers:

          • CreateJIKOXPRESS_DASHERS checkout(own session from cartfleet)
          • Get session status and detailsBOLT_FOOD
          • Process payment for sessionUBER_DIRECT
          • Cancel session

          Tab Management:

          • Find or create tab for table
          • Get tab details with all orders
          • Apply discount to tab
          • Remove discount from tab
          • Get tab summary for payment
          • Close and pay tab

          11.2 Order APIs

          Order Operations:

          • Create orderSAFEBODA (direct,East withoutAfrica tab)
          • Get order details
          • Update order status
          • Cancel order

          Order Items:

          • Add item to unpaid order (rare, usually new order on tab)
          • Void item from order

          11.3 Table QR APIs

          QR Code Management:

          • Generate QR code for table
          • List all table QR codes for kitchen
          • Regenerate QR code (if compromised)
          • Enable/disable QR code
          • Download QR code image for printing

          Web Menu:

          • Get kitchen menu by slug (public, no auth)
          • Get kitchen info for display (name, logo, hours)
          • Validate table number from QR
          • Create order from web session

          11.3 Payment APIs

          Payment Processing:

          • Get payment status
          • Confirm manual payment (cash, custom)
          • Handle payment webhook callbacks
          • Request refund

          Payment Methods:

          • List available methods for channel
          • Get method configuration

          11.4 Kwa Deni (Credit/Debt) APIs

          Debt Management:

          • Get customer debt balance
          • Get customer debt history (orders on credit)
          • Create credit order (with permission checks)
          • Record debt payment (full or partial)
          • Get debt payment history

          Debt Administration:

          • List all customers with outstanding debt
          • Get aging report
          • Update customer credit limit
          • Update customer credit status (suspend, block)
          • Get debt summary reports

          11.4 Kitchen APIs

          Kitchen Display:

          • Get pending orders for station
          • Update item status
          • Update order status
          • Get order details

          Order Routing:

          • Fire order to station (expeditor control)
          • Bump order (mark complete)

          11.5 Print APIs

          Print Job Management:

          • Get pending print jobs for device
          • Claim print job
          • Complete print job
          • Fail print job with reason

          Manual Print Triggers:

          • Reprint kitchen ticket
          • Print bill for table
          • Reprint receipt

          11.6 Configuration APIs

          Kitchen Settings:

          • Get operation settings
          • Update operation settings
          • Apply preset

          Payment Method Config:

          • List payment methods
          • Enable/disable method
          • Update method configuration

          Print Configuration:

          • List printers
          • Configure printer
          • List templates
          • Update template

          Event Actions:

          • List configured actions
          • Create/update action
          • Enable/disable action

          Part 12: Integration Points

          12.1 Payment Provider Integration

          Mobile Money (USSD):

          • Initiate payment request
          • Receive webhook on completion
          • Query payment status

          Card Terminals:

          • Send payment request
          • Receive response
          • Handle terminal errors

          Payment Links:

          • Generate unique payment URL
          • Track link status
          • Receive completion webhookspecific)

          12.2 NotificationKitchen IntegrationConfiguration

          SMS:

          deliverySettings:
            
            enabledProviders:
          • Order[JIKOXPRESS_DASHERS, confirmation
          • BOLT_FOOD]
          • OrderpreferredProvider: readyJIKOXPRESS_DASHERS notification
          • fallbackProvider:
          • DeliveryBOLT_FOOD updates
          • autoAssign:
          true

          Push| Notificationsfalse (App):

          • Order status updates
          • Ready for pickup
          • Delivery arriving

          WhatsApp:

          • Order confirmation message
          • Status updates
          • Payment instructions

          12.3 ExternalOrder SystemsDelivery Properties

          Accounting

          Order Integration:

          (when
            fulfillment
          • Export= dailyDELIVERY): sales
          • deliveryProvider:
          • Receiptstring data(nullable) fordeliveryExternalId: bookkeeping
          • string
          • Tax reporting

          Inventory Integration:

          • Deduct ingredients on(provider's order
          • LowID) stockdeliveryStatus: alerts
          • FINDING_DRIVER
          • Menu| itemASSIGNED availability
          • |
          PICKED_UP

          Loyalty| Programs:

          DELIVERING
            |
          • PointsDELIVERED accumulation
          • driverInfo:
          • Rewardname: redemption
          • string
          • Customerphone: tierstring tracking
          • vehicle:
          string eta: datetime

          Part 13: Operational Scenarios

          13.1 Scenario:Home BusyChef Lunch RushScenario (Fast Food)STARTER)

          Context: FastMama foodLishe restaurant,cooking highfrom volume,home, kioskdelivery andonly
          
          counterSetup:
          orders- Downloaded mobile app
          - Added 10 dishes with photos
          - Set operating hours: 11am - 8pm
          - Enabled mobile money payments
          
          Daily Flow:
          1. MultipleCustomer kioskfinds customersMama orderingLishe simultaneouslyon JikoXpress app
          2. Counter staff handling walk-upCustomer orders Ugali + Samaki
          3. KitchenCustomer receivingpays continuousvia order streamM-Pesa
          4. KDSMama showingLishe allgets orders,push sortednotification by time📱
          5. CustomerMama displayLishe callingtaps numbers as ready"Accept" 
          6. StaffMama managingLishe cashcooks, paymentstaps from"Ready"
          kiosk7. KeyCustomer Requirements:picks -up Handle(or concurrentdelivery checkoutarranged sessionsseparately)
          -8. EfficientOrder kitchencompleted
          
          ticketNo printingPOS, -no Clearprinter, orderno numbercomplexity. visibilityJust -phone Quickand cash confirmation workflowcooking.
          

          13.2 Scenario:Busy DinnerFood ServiceStall Scenario (Fine Dining)GROWING)

          13.3 Restaurant with Dine-In (PROFESSIONAL)

          Context: Full restaurant, tables, bar
          
          Setup:
          - POS terminals
          - KDS in kitchen
          - Multiple stations (hot line, cold line, bar)
          - Table QR codes on all tables
          Flow:- Tabs enabled
          
          Scenario A - Waiter Service:
          1. ServerCustomers opensseated tabat whenTable seating guests7
          2. ServerWaiter enters first coursetakes order on POS
          3. KitchenSelects prepares,"Pay expeditorLater" controls timingTab created
          4. GuestsOrders requestsplit to stations on KDS
          5. Customers order more drinks (added to tab)
          5. Main course ordered and added
          6. DessertCustomers orderedrequest and addedbill
          7. GuestWaiter requestsprints bill
          (print bill, not receipt)
          8. GuestCustomers pays (card or cash)pay
          9. Tab closed, receipt printed
          
          KeyScenario Requirements:B - Tab management for multiple courses
          - Expeditor control of kitchen flow
          - Bill vs receipt distinction
          - Graceful discount application if needed
          

          13.3 Scenario: App Delivery Order

          Context: Customer ordering via app for delivery
          
          Flow:
          1. Customer browses menu in app
          2. Adds items to persistent cart
          3. Proceeds to checkout
          4. Enters/confirms delivery address
          5. Sees delivery fee added
          6. Selects wallet payment
          7. Confirms order
          8. Receives confirmation with estimated time
          9. Kitchen prepares
          10. Driver picks up
          11. Customer receives push notification
          12. Order delivered
          
          Key Requirements:
          - Server-side cart persistence
          - Address validation
          - Delivery fee calculation
          - Push notification integration
          - Driver handoff tracking
          

          13.4 Scenario: WhatsApp Order (Pickup)

          Context: Customer ordering via WhatsApp for pickup
          
          Flow:
          1. Customer messages kitchen number
          2. Chatbot greets, shows menu
          3. Customer specifies items
          4. Chatbot confirms order and total
          5. Customer selects USSD payment
          6. Chatbot sends USSD instructions
          7. Customer completes payment on phone
          8. Webhook confirms payment
          9. Chatbot confirms with estimated time
          10. Kitchen prepares
          11. Customer arrives and picks up
          
          Key Requirements:
          - Chatbot conversation management
          - USSD payment initiation
          - Webhook handling
          - WhatsApp message confirmation
          

          13.5 Scenario: Voiding Items

          Context: Customer changes mind after ordering
          
          Flow:
          1. Order placed and sent to kitchen
          2. Customer says "Actually, no burger"
          3. Server voids burger from order
          4. System checks: Is discount needed? Does void need approval?
          5. Manager approves void (if required)
          6. Void ticket printed to kitchen
          7. Kitchen stops/discards burger preparation
          8. Order total updated
          9. When paying, adjusted total used
          
          Key Requirements:
          - Void permission by role
          - Manager approval workflow
          - Void ticket to kitchen
          - Order total recalculation
          - Audit trail of void
          

          13.5 Scenario: Table QR Self-Ordering

          Context: Customer at table orders via QR code on their phone
          
          Flow - Web (No App):
          1. Customer sits at Table 7
          2. Scans QR code on table tent
          3. Browser opens: menu.jikoxpress.com/mamalishe?table=7
          4. Sees Mama Lishe's menu (no login needed)
          5. Browses, adds: 1x Ugali + Samaki, 1x Juice
          6. Taps "View Cart" → sees items and total: 18,500
          7. Taps "Checkout"
          8. Table number shown: "Table 7" (from QR, read-only)
          9. Payment options: USSD or Cash
          10. Selects USSD, enters phone: 0754xxxxxx
          11. Receives USSD prompt on phone
          12. Confirms payment
          13. Browser shows: "Order #34 Confirmed! Your food will be delivered to Table 7"
          14. Kitchen receives order with Table 7 clearly marked
          15. Staff delivers food to Table 7
          
          Flow - App User:QR:
          1. Customer scans QR at Table 7table
          2. HasOrders on phone (no app installed → app opens with table=7needed)
          3. CustomerPays alreadyvia logged inUSSD
          4. Browses menu, adds items
          5. Checkout shows Table 7
          6. Payment options include: Wallet (12,500 balance), USSD, Cash
          7. Selects Wallet
          8. Instant payment from balance
          9. Order confirmed, push notification enabled
          10. When ready: Push notification "Your order #34 is ready!"
          11. Staff delivers to Table 7
          
          Flow - Cash Payment:
          1. Customer scans QR, orders via web
          2. Selects "Pay at Counter"
          3. Order created (status based on kitchen config)
          4. Screen shows: "Please pay 18,500 TZS at counter. Order #34"
          5. Customer walks to counter, pays cash
          6. Staff sees pending cash order, confirms payment
          7. If KITCHEN_FIRST: Food already preparing
          8. If PAYMENT_FIRST: Kitchen now receives order 9.with "Table 7"
          5. Food delivered to table
          Key
          Requirements:

          13.4 Drive-Through Scenario (PROFESSIONAL)

          Context: Fast food with drive-through
          
          Setup:
          - QRSpeaker/mic containsat kitchenorder IDpoint
          - POS at order window
          - KDS showing drive-through orders with priority
          - Single window (pay + tablepickup)
          
          numberFlow:
          1. Car enters Lane 1
          2. Customer orders via speaker
          3. Staff enters on POS: "Lane 1, Order #23"
          4. Customer drives to window
          5. Staff processes payment
          6. Kitchen already preparing (priority queue)
          7. Order ready, handed to customer
          8. Car exits, time logged
          
          Metrics tracked:
          - WebOrder menutime: works45 without app or loginseconds
          - TablePayment numbertime: locked30 (customer can't change)seconds
          - USSDPickup andwait: Cash2 always availableminutes
          - WalletTotal onlytime: if3:15 app +(target: logged< in4 - Kitchen ticket clearly shows table numbermin)
          

          13.65 Scenario:Multi-Location Kwa DeniChain (Credit Customer)ENTERPRISE)

          Context: Regular5 trustedrestaurant customerlocations
          
          wants to take food on credit
          
          FlowSetup:
          - CreatingCentral Debt:menu 1. Regular customer (registered) orders lunch
          2. Customer says "Nitalipia kesho" (I'll pay tomorrow)
          3. Staff checks customer is registered in system
          4. Staff navigates to hidden Kwa Deni option
          5. System checks:management
          - KwaEach Denilocation enabledhas forown thisPOS, kitchenKDS, printers
          - Consolidated reporting dashboard
          - Staff hasmanaged creditper permissionlocation with central oversight
          
          Daily Operations:
          - CustomerMenu registeredupdate pushed to all 5 locations
          - CustomerEach withinlocation creditoperates limitindependently
          - 6.HQ Ordersees total:real-time 15,000sales 7.across Customerall currentlocations
          balance:- 10,000
          8. New balance would be: 25,000 (within limitEnd of 50,000)day: consolidated 9.report Staff confirms credit transaction
          10. Order created, kitchen prepares food
          11. Customer receives food and leaves
          12. Debt of 15,000 added to customer account
          
          Flowgenerated
          - PayingInventory Debtsynced (partial):across 1. Same customer returns 3 days later
          2. Customer: "Nataka kulipa 20,000" (I want to pay 20,000)
          3. Staff looks up customer, sees balance: 25,000
          4. Customer pays 20,000 cash
          5. System records debt payment
          6. New balance: 5,000
          7. Receipt printed showing payment toward credit
          
          Flow - Paying Debt (full):
          1. Customer returns next week
          2. Wants to clear balance completely
          3. Staff shows remaining balance: 5,000
          4. Customer pays 5,000
          5. Balance now: 0
          6. Customer in good standing for future credit
          
          Key Requirements:
          - Hidden UI (not visible to regular staff or customers)
          - Permission checks at multiple levels
          - Clear balance tracking
          - Partial payment support
          - Receipt differentiation (credit vs regular)
          

          13.7 Scenario: Split Table (Edge Case)

          Context: Two friends at one table want separate bills
          
          Options:
          
          Option A: Separate Tabs
          1. Create two tabs for same table (e.g., Table 5A, Table 5B)
          2. Each person's orders on their tab
          3. Close tabs separately
          
          Option B: Manual Split at Payment
          1. Single tab with all orders
          2. At payment, staff calculates each portion manually
          3. Process two payments against same tab
          4. Close tab when fully paid
          
          Recommendation: Start with Option B (manual) for V1, as true split adds significant complexity.locations
          

          Part 14: Non-Functional Requirements

          14.1 Performance

          • Checkout session creation: < 200ms
          • Kitchen notification: < 500ms from trigger
          • Print job creation: < 200ms
          • Payment processing: Depends on provider, show progress
          • KDS refresh: Real-time (websocket< or2s)
          • Drive-through order entry: < 2s30 polling)seconds target

          14.2 Reliability

          • Print job retry on failure
          • Payment webhook idempotency
          • Offline POS capability (queue and sync)
          • KDS fallback to printer if display fails

          14.3 Scalability

          • Support 100+ concurrent orders per kitchen
          • Support 1000+10,000+ orders per day per kitchen (enterprise)
          • Support multi-location100+ kitchenslocations (future)per enterprise account

          14.4 Security

          • Payment data encryption
          • Staff authentication for POS
          • Manager PIN for sensitive operations
          • Audit log for all transactions
          • Receipt data immutability

          14.5 Compliance

          • Tax calculation accuracy
          • Receipt format compliance (local regulations)
          • Payment provider compliance
          • Data retention policies

          Part 15: FutureAPI ConsiderationsStructure Overview

          15.1 PlannedCheckout for Later VersionsAPIs

          Partial Payments:

          • AllowCreate splitcheckout payments (50% wallet, 50% cash)session
          • Track multipleProcess payment records per transaction

          Table Management:

          • Table entity with capacity, zone, status
          • ReservationCancel integrationsession
          • TableTab transfermanagement (movefind, tabcreate, to different table)

          Inventory Integration:

          • Ingredient deduction on order
          • Menu item availability based on stock
          • Low stock alerts

          Loyalty Program:

          • Points earning on purchase
          • Points redemption
          • Customer tiers and benefits

          Multi-Location:

          • Kitchen groups/chains
          • Centralized menu management
          • Cross-location reportingclose)

          15.2 OutOrder of Scope for Current PhaseAPIs

          • Third-partyCreate delivery integration (Uber Eats, etc.)order
          • AdvancedGet reservationorder systemdetails
          • KitchenUpdate videoorder displaystatus
          • CustomerCancel feedback/rating systemorder
          • AdvancedVoid analyticsitem
          • dashboard

          15.3 Kitchen APIs

          • Get pending orders (by station)
          • Update item/order status
          • Fire order (expeditor)

          15.4 Payment APIs

          • Get payment status
          • Confirm manual payment
          • Handle webhooks
          • Request refund

          15.5 Print APIs

          • Get pending print jobs
          • Claim/complete/fail print job
          • Manual reprint triggers

          15.6 Subscription APIs

          • Get current plan
          • Get feature flags
          • Get usage stats
          • Upgrade/downgrade plan
          • Unlock feature module

          Appendix A: Glossary

          Term Definition
          Tab A containerContainer for unpaid orders at a dine-in table
          Kwa DeniCredit/debt system - customer takes food and pays days/weeks later
          Table QRQR code at table that customers scan to self-order via phone
          Stub Small printed slip with order number for customer
          KDS Kitchen Display System - digital order screens showing orders
          Expeditor Senior kitchen staff who controlscontrolling order flow
          Station A specificSpecific preparation area in the kitchen
          Bump Mark an order as complete on KDS
          Fire Send order to kitchen for preparation
          Void Cancel an item from an order
          Kitchen Wallet Prepaid balance issued by kitchen to loyal customers
          App Wallet Platform-wide customer wallet
          Deep LinkLane URLDrive-through thatvehicle opens directly in mobile app if installedqueue

          Appendix B: Configuration Checklist

          When

          STARTER setting up a new kitchen, configure:

          Setup

          • BasicDownload Informationmobile (name, address, tax ID)app
          • OperationSet Presetbusiness (orname customand settings)logo
          • KitchenAdd Stationsmenu items (up to 20)
          • MenuSet Itemsoperating with station assignmentshours
          • PaymentEnable Methodsmobile andmoney
          • channel
          availability

          GROWING Setup (+ STARTER)

          •  Set up POS on tablet/desktop
          • PrintersConfigure (kitchen,kitchen receipt, kiosk)printer
          • PrintConfigure Templatesreceipt (headers, footers)printer
          • StaffAdd Accountsstaff accounts (up to 3)
          •  Enable additional payment methods
          •  Generate Table QR codes

          PROFESSIONAL Setup (+ GROWING)

          •  Define kitchen stations
          •  Set up KDS displays
          •  Configure station assignments for menu items
          •  Enable tabs
          •  Set staff roles and discount limits
          • StaffConfigure Credit Permissionsdrive-through (if Kwaapplicable)
          • Deni
          used)

          ENTERPRISE Setup (+ PROFESSIONAL)

          •  Add additional locations
          • CustomerConfigure Displaycentral (if used)menu
          • EventSet Actionsup (ifconsolidated customizing from preset)reporting
          • KwaConfigure DeniAPI Settings (disabled by default, enable only if needed)access
          • TableSet QRup Codesinventory (generate and print for each table)
          •  Table QR Cash Flow setting (kitchen first or payment first)tracking

          Appendix C: Decision Log

          Key architectural decisions made during design:

          APIs,featureflags
          Decision Choice Rationale
          TabCredit system (Kwa Deni)RemovedComplexity vs modifyV1 orderMultiple orders per tabCleaner for kitchen, independent lifecyclesscope
          Tab creation Auto-createAuto on first pay-later order Less friction for staff
          Partial payments Defer to V2 Complexity vs actual need
          Kwa Deni visibilityDrive-through HiddenChannel by+ defaultFulfillment High-riskUnified feature,model, preventsame misuseorder entity
          KwaFeature Deni partial paymentunlocking SupportedSubscription-based Real-worldClear needvalue fortiers, debtsimple repaymentUX
          Default configZero-config worksReduce onboarding friction
          Print architecture Client pull model WorksLocal withprinter local printers,support, offline support
          Order number Daily reset Easier for kitchen communication
          ReceiptPlatform numberscale NeverOne resetcodebase all tiers Accounting/complianceSame requirement
          Kitchengate timingConfigurable per channelDifferent trust models for different channelsaccess

          Document History

          Version Date AuthorChanges
          1.0 December 2024Architecture Team2025 Initial document
          2.0January 2026Removed Kwa Deni, added Drive-Through, added Progressive Feature Unlocking, added Subscription Tiers, added Default Configuration, noted Multi-Provider Delivery

          End of Document