Commerce
Checkout & POS
Point-of-sale checkout, invoicing, payments, deposits, refunds, and tip handling.
Overview
Checkout is the point where a completed appointment becomes a paid invoice. The front desk initiates checkout when a client is marked as completed; the system pre-populates the invoice with the services from that appointment. Additional retail items, add-ons, and adjustments can be added before payment is captured.
Checkout Flow
- Initiate — From the appointment (mark as completed) or from a manual walk-in sale
- Review cart — Pre-populated from appointment services; add retail products, remove or adjust items
- Apply discounts — Discount codes, loyalty redemption, membership benefits, price overrides
- Capture tip — Optional tip entry; tip attribution to staff is recorded
- Choose payment — Cash, card/UPI, store credit, gift card, or a split across multiple methods
- Confirm — Invoice is created, payment recorded, loyalty points awarded, appointment marked completed
Invoice Structure
| Line item type | Description |
|---|---|
| Service | Each service from the appointment at its price (variant + add-ons) |
| Retail product | Physical products sold at checkout |
| Discount | Applied discount (code, loyalty, membership, manual override) |
| Tip | Tip amount (not taxed) |
| Tax | GST or applicable tax computed per line item |
| Deposit adjustment | Deposit already collected deducted from total due |
Payment Methods
SalonOS uses an adapter pattern for payment providers. The first-party implementation is Razorpay (UPI, cards), with cash always available.
| Method | Notes |
|---|---|
| Cash | Always available; triggers cash drawer open |
| UPI / Card (Razorpay) | Integrated payment link or terminal |
| Store credit / wallet | Deducted from client's balance |
| Gift card | Validated and decremented at checkout |
| Membership benefit | Free or discounted services for active members |
| Split payment | Multiple methods applied to one invoice |
Discounts and Overrides
| Type | Applied by |
|---|---|
| Discount code | Entered by front desk or client (booking widget) |
| Loyalty redemption | Points converted to a discount at checkout |
| Membership discount | Automatic for eligible services |
| Price override | Manual override requiring permission |
| Price list | Applied to a client segment automatically |
| Complimentary | 100% discount with a reason code |
Deposits
Deposits are pre-collected amounts that reduce the balance due at checkout:
- Captured at booking (mandatory or optional per brand policy)
- Types: fixed amount, percentage of total
- Tracked per appointment with state (pending, cleared, forfeited)
- No-show policy: if a client no-shows, the deposit can be forfeited per brand rules
- Late-cancel policy: deposit forfeiture window is configurable
Tip Splitting
Tips entered at checkout are attributed to the staff who performed each service. The split is configurable:
- Even split across all staff on the visit
- Proportional by service amount
- Manual allocation
Tip distributions are recorded and factor into commission and payroll reports.
Refunds
| Refund type | Description |
|---|---|
| Full refund | Entire invoice reversed; reverses payment to original method |
| Partial refund | Specific line items or a partial amount |
| Store credit refund | Refund issued as store credit to the client's wallet |
| Exchange | Swaps one service or product for another at checkout |
Refunds require a reason and the appropriate permission level. All refunds are audited.
Return Items
Retail products returned by clients generate a return record that:
- Credits the client (cash, store credit, or exchange)
- Adjusts inventory stock levels
- Links back to the original invoice
GST and Tax
- Each service and product is assigned a tax category with an applicable GST rate
- Tax is computed per line item at checkout
- GST invoice formatting complies with India's requirements (GSTIN, HSN/SAC codes)
- Tax summaries feed into the accounting module and GST return reports
Invoice Customisation
Brands can configure their invoice format:
- Logo and brand header
- Footer text (terms, policies)
- Show/hide specific line items (e.g. show tip separately or rolled in)
- PDF generation for WhatsApp or email delivery
POS Hardware
SalonOS does not prescribe specific hardware. Any browser-based device (tablet, desktop) runs the checkout interface. Cash drawer integration is via standard printer-triggered drawer commands.
Split Payments
A single invoice can be paid across multiple payment methods in one transaction — e.g.
₹300 cash + ₹200 UPI. This is supported by the payment_splits table (migration 0087).
invoice.payment_methodstill records the primary method for backward-compatible queriespayment_splitsrows hold the full per-method breakdown- Each split row has:
invoice_id,method,amount_minor - RLS: any org member can read splits for their org's invoices
The checkout UI presents method rows that the operator fills in; the system validates that the split total equals the invoice balance before confirming.
Retail Products at Checkout
Physical products can appear as line items on any invoice (migration 0086).
invoice_lines.product_id is a nullable FK to products:
NULL→ service line (existing behaviour unchanged)- Set → product sold at checkout; stock is decremented after confirmation
Key Data Entities
- Invoice — the bill for a visit (lines, tax, status, client, location)
- InvoiceLineItem — each service, product, discount, or adjustment (
product_idnullable) - PaymentSplit — one row per payment method on a split invoice
- TaxLine — tax computation per applicable rate
- Payment — a payment event against an invoice (method, amount, provider reference)
- Deposit — pre-collected amount linked to an appointment
- Refund — full or partial reversal of a payment
- ReturnItem — retail product return
- TipDistribution — tip attribution to staff
Permissions
| Action | org_owner | brand_manager | location_manager | front_desk |
|---|---|---|---|---|
| Process checkout | Yes | Yes | Yes | Yes |
| Apply discount code | Yes | Yes | Yes | Yes |
| Manual price override | Yes | Yes | Yes | If granted |
| Issue refund | Yes | Yes | Yes | If granted |
| Void invoice | Yes | Yes | Yes | No |
| Configure tax rates | Yes | Yes | No | No |
| Configure deposit policies | Yes | Yes | Location subset | No |