Quick summary: Law firms, accounting offices, agencies and consultancies bill in four ways: advance payment before work starts, billing by project milestone, recurring retainers, and final settlement. The same payment API solution handles all four: each payment is tagged with an identified order code (
order_id) or a virtual account (VA), so money lands and auto-matches to the right client, the right project and the right installment, receivables update instantly, and money goes straight into the firm's bank account.
Why professional-service billing is often late and hard to track
Unlike retail, where you collect once at the counter, professional services bill by work progress and the amounts are usually large and spread across several installments: an advance when the contract is signed, more when a milestone passes, a monthly retainer, then final settlement. Each client has a project, and each project has many billing points.
The common approach breaks in several places:
- Work first, bill later: you start the work before asking for the advance, which can leave you "working for free" when a client is slow to pay.
- Bank transfers with a note for each installment, so accounting scans statements by hand to match incoming money to the right client and the right project.
- Retainers from many clients paid at scattered times during the month, so at period end you cannot tell who has paid and who still owes.
- Receivables in Excel updated late, so the AR report and aging are always out of sync with reality.
The root cause is not the client. It is that collecting the money and matching the receivables is still done by hand. That is exactly the part a payment API solution automates cleanly, for all four billing types above.
How many ways can a professional-service firm bill?
| Situation | Billing method | Problem solved |
|---|---|---|
| Advance before starting work | QR/link from the approved quote | Commitment upfront, no working for free |
| Billing by milestone | Dynamic QR for each sign-off | Cash flow follows project progress |
| Retainer | Virtual account / QR each period | Know instantly who has paid this period |
| Final settlement | QR from the summary invoice | Reconciliation matches the right client and project |
The common thread: each payment is tagged with an identified order code (order_id) or a virtual account (VA), so money lands and auto-matches to the right client, the right project and the right installment, with no need to read transfer notes.
"One API solution, every billing point": advances, milestones, retainers and settlements all go through the same set of APIs. Money lands straight in the firm's bank account, and TCONNECT never holds the funds.
How it works
[Firm management software / client portal]
│ create a charge (order_id, amount, client_id, project + installment)
▼
POST /openapi/v1/transaction/qr/generate → [TConnect Payment API]
│ returns qr_content + QR image (or payment link)
▼
[Client scans QR / transfers to VA / clicks link]
│
▼
[Money lands in the firm's bank account]
│
▼
IPN Callback → [Software backend] → Record installment + update receivablesThe full API spec is at docs.tconnect.vn (a spec file is available to feed to AI / vibe code).
How to implement it
Technically, all four billing types come down to three things: connect once, generate a QR for each charge, and receive payment notifications automatically. Most of the effort is in the operational process at the firm, not in the code.
1. Connect once
The firm's management software logs into the TCONNECT Payment API to get an access token (access_token) and reuses it for many hours. This is a one-time setup. Start in the sandbox at https://sme-open-api-sandbox.tconnect.vn, then switch to https://sme-open-api.tconnect.vn when you go live.
2. Generate a QR for each charge: the same command
Whether it is an advance, a milestone, a retainer or a settlement, the system calls the same single API to create a dynamic QR, changing only the amount (amount) and the order code (order_id):
// Tạo QR động cho một khoản thu bất kỳ (tạm ứng / mốc / retainer / quyết toán)
const { data } = await createQR({
amount, // số tiền cần thu
order_id: orderId, // định danh: khách + dự án + đợt, để tự khớp
});
// data.qr_content → mã VietQR để hiển thị trên hóa đơn / cổng khách hàng
// data.image_png_base64 → ảnh QR gửi kèm email / ZaloThe order_id convention is what decides "where the money gets matched." Set it by client + project + installment so lookups and receivables reports are easy:
| Situation | Example order_id | Meaning |
|---|---|---|
| Advance | KH204-DA18-TAMUNG | Client 204, project 18, advance payment |
| Milestone | KH204-DA18-MOC2 | Milestone 2 sign-off |
| Retainer | KH311-2026T09-RETAINER | September 2026 retainer for client 311 |
| Settlement | HD5120 | Settlement invoice number 5120 |
3. Money lands: the system matches it, no one has to search
When the client pays, TCONNECT notifies your software automatically (via IPN, Instant Payment Notification). Thanks to the order_id, the system knows right away what the payment is and does the right thing:
- Advance arrives, so it activates the project and the team starts work with clear terms.
- Milestone payment arrives, so it opens the next installment and updates billing progress for the project.
- Retainer arrives, so it records the period as paid and updates the client's service term.
- Settlement arrives, so it closes the invoice, issues the e-invoice and finalizes receivables.
This whole step runs in the background 24/7, so accounting does not have to open the banking app, scan statements and match each installment by hand like before. Building the payment-notification part is the integrator's technical job, and it only needs three principles: authenticate the caller, do not record a transaction twice, and respond fast. See Webhook/IPN: handle callbacks safely.
Receivables and cash flow: one screen, nothing missed
Because every charge auto-matches to the right client and project, the receivables (AR) table and aging always reflect reality in real time. From there the system can send payment reminders automatically over Zalo/SMS when a charge is due or overdue, instead of accounting checking by hand. Cash flow by project progress becomes easy to forecast: you know which installment has arrived, which is coming up, and which client is running late.
Issue an e-invoice (optional)
After recording the payment, you can call TCONNECT's e-invoice API to issue an invoice to the client automatically, in line with Decrees 123/2020 and 70/2025. This part is an added step: the automatic collection above already runs on its own. See E-invoice API.
What do the firm and its software get?
- No working for free: collect the advance first, with terms in place, then start work.
- Cash flow by progress: bill on the right installment, instead of piling risk at the end of the project.
- Accurate receivables: each charge auto-matches to client + project, and AR and aging update instantly.
- Automatic payment reminders over Zalo/SMS, so you collect on time more often.
- Money lands straight in the firm's account, with no middleman holding it.
- For a company that builds software for law firms, accounting offices, agencies or consultancies: integrate the payment API once and add "advance billing," "milestone billing" and "recurring retainer" features for all your clients at once.
Frequently asked questions
Can business clients pay by bank transfer or card? Yes. The same set of APIs supports VietQR, domestic cards and international cards. Money lands straight in the firm's bank account with instant reconciliation.
Does milestone billing need a separate integration? No. Each milestone is just a dynamic QR with a different amount and order code, using the same QR-creation API. Opening the next installment happens in the payment-notification step.
How do you track a monthly recurring retainer? Give each client a virtual account (VA) or generate a QR each period. When money arrives, the system records that period as paid and updates receivables, so you know right away who still owes.
If two clients transfer the same amount, will they get matched wrong?
No, because matching is based on the identified VA/order_id, not on the amount or the transfer note.
Can I issue a valid e-invoice after collecting payment? Yes. After recording the payment, the system calls the e-invoice API to issue a valid invoice under Decrees 123/2020 and 70/2025.
Get started
- Read the docs and download the API spec file: docs.tconnect.vn/docs/intro
- Try it in the sandbox:
https://sme-open-api-sandbox.tconnect.vn - Contact us for a connection account and integration support: tconnect.vn, Zalo 0375 927 102
One more thing: TCONNECT supports integration for free into the law / accounting / agency / consulting management software you already use, so you do not have to switch software.