Test Plan: Billing & Invoicing

♻️ Reconciled against current code — 2026-07-01. Key corrections carried forward: invoices live under a Finance sidebar group (not "Billing"); list filters are Outstanding / Overdue / Paid / Cancelled; TraxionPay is fully removed (Paynamics + OTC + manual only); API base is /api/billing (PDF at /api/statements) — there is no /api/invoices top-level; the UI still says "Invoice" (the planned "Statement" rename hasn't reached the frontend). New this pass: "Simulate Payment" is removed — testers use Record Payment for manual payments; one non-compliant status-label surface remains: components/InvoiceTable.tsx still renders the raw inv.status enum directly (does not go through the new humanized-status util — #502 gap). See the green banner below for everything new on stage since Jun 19. Trust this page + the code over child TC pages.
🆕 New on stage — 2026-07-08 (payment/billing sweep, !283). See the Jul 8 release note for full test steps.
🆕 New on stage — 2026-06-19 → 2026-07-01. See TC-BIL-007 — Discounts, Adjustments & Void and TC-BIL-008 — Total Parity & Payment Reconciliation for full coverage of the above.

1. Invoice model

InvoiceStatus: DRAFT · ISSUED · PARTIALLY_PAID · PAID · OVERDUE · VOID · FAILED. Invoice source (free-text): DUES / EVENT / DONATION / OTHER. Invoice numbers: RCME-DUES-0001, RCME-EVT-0001, RCME-DON-0001, RCME-OTH-0001. Balance is computed from Allocation records (no stored balanceCents).

2. Routes & nav

AreaRoute / how to reach
Admin invoices/admin/invoices (split-view). Sidebar group Finance → Invoices. Page title "Invoices".
Admin payments/admin/payments — sidebar Finance → Payments.
Finance dashboard/admin/finance — sidebar Finance → Dashboard.
Member "My Invoices"/invoices (page "My Invoices & Payments") · detail /invoices/:id · pay /invoices/:id/pay.
Member payment history/payments.
Invoice/payment settingsFinance & Billing settings: /admin/settings/finance; payment channels + bank accounts under Finance.

3. Invoice list filters (exact)

4. Key API endpoints (mounted at /api/billing)

ActionEndpointGuard
List invoices (admin)GET /api/billing/invoices/tenantFINANCE:VIEW:invoices
Invoice detail (admin)GET /api/billing/admin/invoices/:idFINANCE:VIEW:invoices
Create invoicePOST /api/billing/invoicesFINANCE:CREATE:invoices
Void invoicePOST /api/billing/admin/invoices/:invoiceId/voidFINANCE:EDIT:invoices
Mark paidPOST /api/billing/invoices/:id/mark-paidFINANCE:EDIT:invoices
Record manual paymentPOST /api/billing/admin/payments/manual (multipart, proof file)FINANCE:CREATE:payments
Approve / reject manual paymentPOST /api/billing/admin/payments/:id/approve · /rejectFINANCE:EDIT:payments
Member: own invoicesGET /api/billing/invoicesrequireMemberId
Member: pay invoicePOST /api/billing/member/invoices/:invoiceId/pay/paynamics · multi-invoice POST /api/billing/member/invoices/bulk-pay/paynamics (#149 — GCash/Maya only, CREDITCARD deferred)requireLoggedInAuth
Invoice PDFGET /api/statements/:id/pdf (A-010 canonical) · legacy /api/billing/invoices/:id/pdfrequireMemberId
DonationsPOST /api/billing/donations · report GET /api/billing/admin/donations/reportrequireMemberId / FINANCE:VIEW:donations
Public invoice pay (guest token)GET/POST /api/public/:tenantSlug/invoices/:invoiceNumbertoken / publicActionLimiter

5. Payment channels / gateway

TraxionPay is fully removed. Sole gateway is Paynamics. Member-selectable channel codes: GCASH, MAYA, CREDITCARD, OTC_7ELEVEN, OTC_MLHUILLIER, OTC_CEBUANA, OTC_PALAWAN, OTC_BAYAD. Admin-recorded payment channels: MANUAL_CASH, MANUAL_BANK, MANUAL_OTHER, SIMULATED. Do not test for BDO/BPI/TraxionPay/Cash channel codes — they don't exist.
⏸ Live Paynamics payment is PARKED (no prod creds). You can exercise invoice creation, manual-payment recording/approval, and member "Pay Now" up to the gateway hand-off, but completing a real online payment is not testable on stage.

6. Test data (RCME seed)

7. Now on stage — accounting milestone (was mile/accounting)

Updated 2026-06-15: invoice discount (#152), the late-fee engine (#153/#158), and line items (#213) have landed on dev/stage via the accounting milestone (!136) — the discount/late-fee/line-item schema and fields now exist on dev and are testable. See the Jun 15 release note for scope & the #213 update-path caveat. The payment gateway is still inert (no live online checkout/webhooks).

8. Test Cases

TCTopicDetailed
TC-BIL-001Invoice Creationdetailed
TC-BIL-002Invoice Listing & Filteringdetailed
TC-BIL-003Invoice Status / Detailsdetailed
TC-BIL-004Invoice Actions (void/send/PDF)detailed
TC-BIL-005Notifications / Remindersdetailed
TC-BIL-006Bulk / Export / Donationsdetailed
TC-BIL-007🆕 Discounts, Adjustments & Voiddetailed
TC-BIL-008🆕 Total Parity & Payment Reconciliationdetailed