On a cash-on-delivery order your driver can confirm the cash from his phone, but only after he has marked the order delivered. The app will not let him confirm anything earlier, because until the parcel is handed over there is nothing to collect.
The moment he confirms, two things happen at once. The order becomes paid, exactly as if you had pressed Mark Paid yourself, and the same amount lands on the driver's own cash balance as money he is holding for you. It has left the customer, but it has not reached your till yet.
That is why the driver's profile has a Cash tab. It runs the balance line by line: every amount collected at the door as a plus, every hand-over you confirmed as a minus. Confirming a hand-over there does not change the order's payment.