RELEASE PLAN — PHASE 16
VietGara — Payments & E-invoicing
Version 16.0 — October 9, 2026 · Cloud: Google Cloud Platform (GCP) · Backend: Go
Insurance and partner expansion are in Phase 17. In-app payment and e-invoices in the Customer App (FR-CAPP-04) follow the gateway and e-invoicing into this phase.
Start the sender registrations early. SMS needs an approved brand name with the carriers, and Zalo needs an official account, ZNS templates and approval. This takes weeks, so the paperwork should begin well before this phase, in parallel with earlier phases, while the code waits here.
1. Introduction
Phase 16 connects VietGara to the outside parties a garage deals with every day:
- payment gateways (VNPay, Momo, ZaloPay), for customers paying settlements and owners paying their subscription;
- e-invoice providers (VNPT, Viettel);
- SMS and Zalo ZNS for customer messages.
Each integration goes through an adapter with signature-verified callbacks and a circuit breaker (Integration Design), and starts in the partner’s sandbox. Earlier phases have prepared the ground: the garage legal profile and customer tax profiles (Phase 5) are the seller and buyer data of an invoice, receivables (Phase 13) consume payment.confirmed, the file registry stores invoice PDFs privately, the rate limiting, metrics and Terraform of Phases 8 and 9 already protect, observe and deploy the new public callbacks, and the payment review of the Compliance Checklist applies. Book the penetration test scoped in Release 8.0 before this phase ships.
2. Overview of the 3 Releases
| Release | Name | Main Modules | Demoable Value |
|---|---|---|---|
| 16.0 | Payment Gateway | Payment Gateway Adapter, License (renewal) | A customer pays online and receivables update by themselves; the owner pays and renews the subscription |
| 16.1 | E-Invoicing | E-Invoice Service | Issue a VNPT or Viettel e-invoice right after settlement; the customer receives it in the app |
| 16.2 | SMS & Zalo Notifications | Notification Service (SMS/Zalo) | Reminders, booking reminders and “vehicle ready” messages also reach customers by SMS or Zalo |
3. Release Details
Release 16.0 — Payment Gateway
- Backend: Payment Gateway Adapter Service (FR-PAY-01, 02, 03):
- VNPay, Momo and ZaloPay behind the Adapter Pattern (Integration Design Section 4);
- signature-verified webhooks that publish
payment.confirmed, which Receivables (Release 13.0) consumes and which creates the payment voucher (Release 5.0) automatically.
- Subscription payment and automatic renewal (FR-PAY-03, FR-LIC-02, FR-LIC-03): the owner’s plan change and renewal are charged to a saved, tokenized payment method. This replaces the manual transfer, evidence form and admin review of Release 5.2 (FR-LIC-07, FR-LIC-08); the plan still takes effect at once, when the gateway confirms the charge, and nothing changes if the charge fails. The amount follows the same proration and account credit (FR-LIC-09), and the credit ledger and period snapshots of Release 5.2 are reused. The renewal charges the plan then in effect at the period end. The admin’s manual extension stays for corrections. Garages beyond the plan limit are charged too (FR-LIC-06). Integration API keys (FR-IAM-05) are delivered here.
- Frontend: an online payment button on a public settlement page (extending the public
/q/:tokenroute), a result page, payment of a settlement in the Customer App (FR-CAPP-04, payment part), and subscription payment with the saved payment method in the web console and the owner app. - Dependency: Billing & Settlement, Receivables (Release 13.0).
- Definition of Done: a customer opens the payment link or the app and pays in the gateway sandbox; the settlement shows as paid with its voucher and Receivables updated through the event, with no manual step. An owner’s renewal is charged automatically at the period end. An owner upgrades from Basic to Pro in the middle of a period: the amount after the credit for the unused days is charged to the saved payment method, the Pro limits apply at once and a new period starts; if the charge fails nothing changes.
Release 16.1 — E-Invoicing
- Backend: E-Invoice Service (FR-EIN-01..04, FR-BIL-04):
- adapters for VNPT and Viettel (Integration Design Section 3) with a circuit breaker;
- a consumer of
settlement.created; - seller data from the garage legal profile and buyer data from the billing party (customer tax profiles) of the settlement;
- the provider’s PDF stored privately in the file registry and printed from there (FR-DOC-10).
- Frontend: connecting an e-invoice provider account in the garage settings; invoice status on the settlement screen, on the web and in the owner app; the e-invoice in the Customer App (FR-CAPP-04, invoice part).
- Definition of Done: after settlement, an e-invoice is issued automatically within a few seconds in the provider sandbox; its status can be looked up; the customer sees it in the app; a company customer’s invoice carries the chosen tax profile.
Release 16.2 — SMS & Zalo Notifications
- Backend: the Notification Service gains the SMS and Zalo ZNS channels (FR-NOT-01, 02). The same events and templates as the e-mails of Release 10.1 go out by SMS or Zalo; payment reminders (Release 13.0) and booking reminders (Release 12.2) can use them. Each garage chooses its channels, and Zalo is used only for customers with a verified phone number.
- Frontend: channel choice and sender settings per garage; SMS and Zalo usage on the notification log.
- Hardening: review Compliance Checklist Sections for e-invoicing and payments and mark the items implemented in this phase as compliant.
- Definition of Done: a test SMS and a Zalo message reach a test phone for “vehicle ready”, for an overdue reminder and for a booking reminder, each logged once.
4. Dependency Diagram
flowchart TD P15(["Phase 15 complete"]) --> R160["Release 16.0<br/>Payment gateway + subscription payment"] P15 --> R161["Release 16.1<br/>E-invoicing"] P15 --> R162["Release 16.2<br/>SMS/Zalo notifications"] R160 --> DONE(["Phase 16 complete"]) R161 --> DONE R162 --> DONE
The three releases depend only on earlier phases, not on each other, so separate teams can run them in parallel as partner contracts come through. Phase 16 can start before Phase 15 is finished if the partner contracts are ready, since it does not depend on scale work.