# Cash on Delivery in Nepal: How to Reconcile Courier Payouts in Laravel

Match courier settlement rows to shipments, fees and bank receipts. A Laravel COD reconciliation workflow with fictional NPR examples and duplicate-import checks.

A delivered order and a bank deposit are separate events. For a Nepal ecommerce team using cash on delivery, reconciliation means matching the courier’s settlement lines to shipments, agreed charges and the money actually received. Marking every delivered order paid hides missing payouts.

## Agree what each amount means

Keep the customer’s COD amount, delivery charge, return charge, adjustments and net payout in separate fields. Record who pays delivery and whether the courier deducts it from the collected amount. Confirm the provider’s contract and statement format before defining the calculation. Fees and settlement timing vary; the numbers below are invented teaching examples, not courier rates.

For this example only, expected net payout equals COD collected minus the merchant’s delivery fee, minus any return fee, plus signed adjustments. Do not subtract a charge twice if your import already contains a net figure.

## A small settlement example

| Shipment | COD collected (NPR) | Fees (NPR) | Expected net (NPR) | Statement net (NPR) | Review |
| --- | --- | --- | --- | --- | --- |
| DEMO-101 | 2,500 | 120 | 2,380 | 2,380 | Matched |
| DEMO-102 | 1,800 | 120 | 1,680 | 1,580 | 100 short |
| DEMO-103 (returned) | 0 | 180 | -180 | -180 | Return charge |
| Total | 4,300 | 420 | 3,880 | 3,780 | 100 unresolved |

A negative return line represents a charge in this example. Some providers bill returns separately. Map that explicitly instead of assuming a negative payout always belongs in the same batch.

## Import a CSV into a review batch

This made-up CSV corresponds to the table. The second DEMO-102 line is a deliberate duplicate for testing. It must not increase the batch total.

````
settlement_ref,line_ref,shipment_ref,collected_npr,fee_npr,net_npr
DEMO-BATCH-01,L1,DEMO-101,2500,120,2380
DEMO-BATCH-01,L2,DEMO-102,1800,120,1580
DEMO-BATCH-01,L3,DEMO-103,0,180,-180
DEMO-BATCH-01,L2,DEMO-102,1800,120,1580
````

Preserve the original file and each raw row. Stage validated rows before applying any payment. Match by provider account and shipment reference; an order may have multiple parcels, so an order number alone may be ambiguous. Keep settlement reference, line reference, source row number, currency and import time with the match.

Reject duplicate line identities within a file and across repeated imports. If a provider supplies no stable line identifier, agree a documented fallback key and send collisions for review. A changed amount under an existing identity needs investigation rather than a second payment.

## Model delivery and settlement separately in Laravel

A useful design separates orders, shipments, settlement batches, settlement lines and payment allocations. Store NPR in integer paisa, or use a fixed-precision decimal consistently. Avoid binary floating-point arithmetic for matching amounts.

Import into a pending batch, then show matched rows and exceptions in a staff review screen. Keep delivery status separate from payout status: delivered, included in a statement, and paid into the bank each need their own evidence.

When a reviewer confirms an allocation, use a database transaction and lock the affected payment records. Enforce a unique settlement-line identity in the database so concurrent imports cannot allocate it twice. Laravel documents [transactions](https://laravel.com/docs/13.x/database#database-transactions) and [pessimistic locking](https://laravel.com/docs/13.x/queries#pessimistic-locking). Adapt the implementation to the application’s installed version.

## Keep exceptions visible

- Missing settlement: delivered shipments absent from statements remain outstanding. Compare against the provider’s agreed cutoff before calling a payout late.
- Short payout: DEMO-102 stays open for the NPR 100 difference. Record the reason and supporting evidence for any accepted adjustment.
- Unknown shipment: hold the line for review instead of guessing from a customer’s name or phone number.
- Returns and partial collections: record actual cash collected and agreed charges. Do not silently replace the order total with the statement amount.

## Before marking the batch reconciled

Check the valid, unique statement rows total NPR 3,780 in this example. Match that total to the bank receipt or an explicit split-payment allocation. Then confirm every line is allocated or has a documented resolution. A matching bank total does not explain the NPR 100 shortfall against expected payouts.

Record the reviewer, time, supporting bank reference and any adjustments. Test repeated imports, duplicate rows, unknown shipments, short payouts, returns and two reviewers confirming the same batch. Retain an audit trail when correcting an allocation.

## Related implementation guides

Booking and tracking belong in the [Laravel courier API guide](https://damodar.dev/blogs/laravel-courier-api-integration). For staff upload screens, read the [Filament CSV import guide](https://damodar.dev/blogs/laravel-filament-csv-import). To scope a storefront and its operations together, see [website and ecommerce development](https://damodar.dev/services/websites-ecommerce).

Author: Damodar Bhattarai
Published: 2026-12-03

## Articles

- [What to Send a Laravel Developer in Nepal Before Asking for a Quote](https://damodar.dev/blogs/laravel-developer-nepal-project-brief) — Hiring a Laravel developer in Nepal? Use this sample project brief to explain your workflow, define the first release and compare development quotes.
- [Website Redesign in Nepal: A URL, SEO and Enquiry Checklist](https://damodar.dev/blogs/website-redesign-nepal-seo-enquiry-checklist) — Plan a business website redesign in Nepal with a checklist for existing URLs, mobile enquiries, redirects, search indexing and launch verification.
- [Freelance Laravel Developer in Nepal: An Existing App Handover Checklist](https://damodar.dev/blogs/freelance-laravel-developer-nepal-app-handover) — Prepare your existing Laravel application for a new developer with a practical handover checklist, a focused review and a verifiable first milestone.

Canonical: https://damodar.dev/blogs/cash-on-delivery-reconciliation-nepal
Contact: work@damodar.dev
