The customer refused the parcel. Twice. On the third attempt the courier partner sent it back, and in the operator’s system the parcel was marked returned and the story ended there. It had not ended at all.
A return is a second shipment
When a courier sends a parcel back it does not travel under the number it went out with. It gets a new waybill, and that waybill has its own journey: picked up at the destination depot, moved, delivered back to the sender. Your courier partner tracks that journey and bills you for it. If your system stopped at "returned", you are not tracking a parcel that is still on the road, and you cannot recognise the charge when it arrives.
Three things go quiet
The parcel. Nobody knows where it is until it turns up at the warehouse, or does not. The cash on delivery. It was booked as money to collect; it will never be collected, but the books still say pending, so the customer’s balance is wrong and stays wrong. The return charge. It arrives on the courier’s invoice weeks later under a number that matches nothing, and either gets paid without a home or disputed without a reason.
What the month should look like instead
The return’s own waybill is recorded on the original parcel, from the courier’s report or by hand, and the parcel is followed all the way back. When it is received, the cash on delivery is closed as never collected, and the customer’s balance is right the same day. When the courier’s invoice comes, the return line matches the parcel, and its cost sits beside the return charge you billed the customer, so you can see what the return actually cost you. The return charge to the customer is applied once, at the agreed rate, and never twice.
Cost first, then cash, then the bill
The order is the discipline. Match the courier’s invoice to your parcels first, so every delivery and every return has a cost. Then follow the cash on delivery: what was collected, what was remitted, what was deducted and why. Only then bill each customer, with deliveries, returns and cash-on-delivery handling on one invoice. Done in that order, the position with each courier partner closes to the fils every month. Done in any other order, it drifts, and the drift is always in the courier’s favour.
For how the software does this, parcel by parcel, see courier software with cash on delivery that reconciles.