Handling a delivery that goes wrong
Something will eventually. What you do in the next ten minutes decides whether you keep the customer.
Run enough orders and some will go wrong. An item missing, an address that turns out to be wrong, a courier delayed, an order that arrives cold. This is not a sign of a failing operation; it is arithmetic.
What separates stores that keep customers from stores that lose them is almost entirely what happens next.
Find out before the customer tells you
The order and delivery are tracked. Watching your live orders during a busy period means you notice a stalled delivery before a complaint arrives. A message from you saying it is running late lands very differently from a reply after the customer has complained.
Say the true thing quickly
Customers forgive problems. They do not forgive being managed. If an item is missing, say the item is missing and what you are doing about it. Do not describe a delay as traffic if it is not.
Fix it at the level it happened
If it is your error, resolve it yourself and quickly: replace the item, refund the difference, do not make the customer argue for it. If it is a delivery issue, raise it through merchant support with the order reference so there is a record attached to the actual delivery.
Merchant help covers orders, payouts and store settings, and support tickets carry the order with them, which means the person reading it can see what you can see.
Do not let it become a pattern
One cold delivery is bad luck. Three from the same store at the same hour is a process problem. Look at what your busiest period actually looks like: whether you are accepting more than you can prepare, whether packaging is holding heat, whether orders sit finished on a counter waiting for pickup.
The commercial argument
A customer who had a problem solved well often orders again more readily than one who never had a problem, because they now know what happens when something goes wrong. That is worth more than the margin on the order you refunded.