Cash on delivery is still how a large share of Vietnamese e-commerce gets paid — and it means the carrier is holding your revenue for days or weeks before you ever see it. Most sellers "reconcile" this with an exported Excel file, a tired accountant and a lot of hope. This article describes the automated đối soát pipeline we build instead, and the traps that make the manual version quietly lose money.
How COD money actually flows
The mechanics matter, because every automation decision follows from them:
- The courier collects cash at the customer's door and hands it up through the carrier's internal branch network.
- The carrier batches it. On a fixed cycle — often two or three times a week, depending on your contract — collected COD is grouped into a remittance batch.
- The batch is paid out to your bank account, accompanied by a remittance statement published in the carrier portal or delivered as an export file. That statement lists shipments, collected amounts, and usually the carrier's own fee deductions.
Notice what this means: the bank transfer is a lump sum. The only way to know which orders it covers — and which orders it silently does not — is to parse the statement and match it line by line against your order system. That matching is the whole game.
The automated pipeline, stage by stage
1. Ingest remittance data
Pull the statement automatically the moment it appears — via the carrier's API where one exists, or by fetching the portal export on a schedule. Store the raw file forever; when a dispute arrives three months later, the original statement is your evidence.
2. Match lines to orders
The primary key is the shipment or order code plus the collected amount. When both match, the line auto-clears. When they do not, a fuzzy fallback kicks in: match on amount plus delivery date plus recipient phone, or on order code with a tolerance for the amount (see the fee trap below). Anything the fuzzy layer cannot resolve lands in a small human review queue — which in practice is a handful of lines per batch, not a spreadsheet of thousands.
3. Age-track unremitted COD
Every delivered COD shipment starts a clock. If it has not appeared in any remittance batch after your carrier's normal cycle plus a grace period, it moves to an aging report: 7 days, 14 days, 30 days overdue. This report is the single most valuable output of the pipeline, because unremitted COD is invisible in every other view of your business — your storefront says the order was delivered and paid.
4. Automate claims before the deadline
Lost parcels, damaged goods and cash that never remits all have claim windows in carrier contracts, and they are short. The pipeline should draft the claim automatically — shipment code, evidence, amounts — the moment a shipment crosses the claim threshold, so a human only reviews and submits. Miss the window and the money is simply gone. This pairs naturally with the shadow-audit pattern from our ViettelPost automation guide: the same job that notices a pickup was never attended also notices a delivery that never remitted.
5. Keep a ledger of fee deductions
Carriers net their shipping fees, return fees and COD-collection fees inside remittances. Record each deduction as its own ledger line against the order. Without this, your per-order profitability numbers are fiction, and your accountant cannot tie the bank transfer to anything. Those clean ledger lines also feed straight into the invoicing flow described in our Shopify → MISA AMIS e-invoice article.
The traps that make manual đối soát lose money
| Trap | What happens | Automated defence |
|---|---|---|
| Partial remittances | A batch covers only some of the shipments you expected; the rest roll to a later batch — or never arrive | Match per line, never per batch total; aging report catches stragglers |
| Fees netted inside lines | Collected 350,000 ₫, remitted 328,000 ₫ — exact-amount matching fails | Match with fee-aware tolerance; book the difference as a fee ledger line |
| Format changes without notice | The carrier renames columns or reorders the export; your parser reads garbage | Format-versioned parsers with strict validation that halts and alerts instead of mis-parsing |
| Silent non-remittance | 0.5–2% of shipments never appear in any batch | Aging report plus automated claim drafting |
Build it once, run it forever
A reconciliation pipeline is not glamorous, but it has the best economics of anything in the automation stack: it runs on every single COD order, it recovers real cash rather than saving time, and it produces the audit trail your accountant and the tax authority both want. In the full end-to-end automation architecture it sits in the finance layer, quietly turning "the carrier owes us something, probably" into a precise, claimable number.
Start with one carrier, get the parser and the aging report solid, then add the next carrier as a new format version — not a new system.