MilkGo
/User Guide
User Guide

10. Payments — Recording What Customers Pay

When a customer hands you cash, scans your UPI QR, or transfers to your bank — you record it here. The bill auto-updates and (if WhatsApp is enabled) the customer gets a receipt with the new balance.

Before you start

  1. 09-billing.md — at least one bill exists to receive payment against
  2. Optional: 11-whatsapp.md — for auto WhatsApp receipts

Where payments live

Three places, all wired to the same record:

WhereUse
Billing screen → Pay button on a bill rowQuick collect right from the list
Bill drawer → Record PaymentWhen you opened the bill to review first
Customer profile → KhataView all payments for one customer across months

There's no separate "Payments" main menu — payments live where the bills do.

Recording a payment

  1. Open the bill (or tap Pay on the row).
  2. Quick Collect opens with the balance amount pre-filled.
  3. Adjust if the customer is paying less:
    • Amount — ₹ the customer is handing over
    • Method — Cash · UPI · Bank Transfer · Cheque · Online
    • Reference number — UPI ref, cheque number (optional)
    • Date — defaults to today
    • Notes — anything you want to remember
  4. Tap Save.

What happens next:

  • Bill amount_paid increases.
  • balance_due recomputes.
  • Status flips: Generated → Partial (or → Paid if balance hits 0).
  • A WhatsApp payment receipt is auto-sent if the customer has WhatsApp opt-in.

Payment methods

MethodWhen to use
CashMost common — physical notes
UPIPhonePe, GooglePay, Paytm, BHIM. Capture the UPI ref ID for traceability
Bank TransferNEFT / IMPS / RTGS. Record the bank ref
ChequeWrite the cheque number in reference
OnlineGeneric catch-all (online portals, payment links)

Quick collect from the billing list

The fastest path:

  1. Open Billing screen.
  2. Find the customer (filter by Overdue / Partial works well).
  3. On their row, tap Pay · ₹X (the amount is the standalone bill due).
  4. Inline cash field appears — type the amount, tap ✓.
  5. Done. Status updates, receipt fires.

No drawer, no extra screens. ~3 seconds per customer when you're walking around collecting cash.

Partial payments

A customer hands you ₹500 of a ₹2,000 bill?

  1. Tap Pay.
  2. Type 500.
  3. Save.

Bill becomes:

  • amount_paid = 500
  • balance_due = 1500
  • status = partial

You can record more payments later — one bill can have many payment rows.

Overpayment — going to advance balance

What if the customer hands you ₹2,500 for a ₹2,000 bill?

The system caps payment input at the bill's standalone due to prevent accidental overpay. So you can only enter up to ₹2,000 against this specific bill.

For the extra ₹500:

  • Record it as a separate general payment without a bill_id (no bill_id = goes straight to customers.advance_balance)
  • Or apply it to another unpaid bill of theirs

Auto-overpay handling: if you cancel/edit a delivery on an already-paid bill and the bill amount drops below what was paid, the excess automatically moves to the customer's advance_balance. The bill clamps to clean, and the credit is parked for next month.

Viewing payments per customer

Open any customer → View Khata or the Khata tab. You'll see:

  • Every bill (month-wise)
  • Payments under each bill — date, method, amount, reference
  • Running totals: this month, year-to-date, lifetime
  • Advance balance (if any credit is parked)

This is the customer's full financial relationship with you, on one screen.

Deleting a payment

If you recorded the wrong amount or wrong customer:

  1. Open the bill drawer.
  2. Find the payment in the Payments section.
  3. Tap the delete icon.
  4. Confirm.

The bill recomputes:

  • amount_paid decreases
  • balance_due increases
  • Status flips back if needed

This is a real delete — the row goes from the database. Use it sparingly; for legitimate refunds, prefer recording a new payment with a negative note instead.

WhatsApp payment receipt

(Auto-fires when Payment received owner toggle is on. See 11-whatsapp.md.)

The customer receives a payment_received message with:

  • Business name + customer name
  • Billing month + period range
  • Amount paid
  • Payment method line (e.g. "UPI · Ref 123456 · paid on 30 Apr 2026")
  • This month's bill · Previous pending · Remaining balance
  • Multi-line summary: products bought + deliveries completed + counter purchases

This is the closest thing customers get to a "till receipt" for their dairy account.

Bulk reminder for overdue payments

When you want to nudge everyone who's behind on payment:

  1. Billing screen → Send All Reminders (amber button, top-right).
  2. Modal lists all unpaid bills (across months) with WhatsApp opt-in customers.
  3. Filter by month / minimum due if you want.
  4. Select rows.
  5. Tap Send N Reminders.
  6. Each customer gets a payment_overdue_reminder template with:
    • Bill number
    • Days overdue
    • Pending amount
    • "View Bill" button (deep link to their bill PDF)

Useful at month-end or when a few customers are 10+ days late.

Tips

  • Record payments the moment they happen. Walking around collecting and recording later = you'll forget who paid.
  • Always capture the UPI ref for digital payments. Saves time when reconciling with bank statements.
  • Use Quick Collect when on the move; Bill drawer when you want to review first.
  • Check Advance Balance regularly. Customers who overpay often forget they have credit.

Common mistakes

MistakeFix
Entered ₹5000 instead of ₹500Open the bill, find the payment row, delete, re-enter correctly.
Wrong customerOpen the wrong customer's bill, delete the payment. Then go to the right customer and re-record.
Customer paid for THIS month but you applied to LAST month's billDelete the payment from the wrong bill, record on the correct bill.
Customer says "I paid via UPI yesterday" but you have no recordCheck your UPI app for the ref. Record with that ref + yesterday's date.

What's next?

  • 11-whatsapp.md — auto-receipts and overdue reminders
  • 13-reports.md — collection rate, who pays on time
  • 16-faq.md — answers to "where do payments go?", "what if customer overpays?", etc.

Related upstream