Buyers only have a 30-minute window to cancel their own orders, but you can cancel them up until the minute you ship them.
When a buyer asks you to cancel their order, if you have not yet shipped and confirmed the shipment of the order, you can cancel it on the Manage Orders page or using Order Cancellation feeds. When you cancel an order, Amazon automatically updates the order status in the buyer's Amazon account and sends an email notification to the buyer.
However, if you have already shipped the order, you will need to let the buyer know that the order is already on its way and request that they return the package to you when they receive it. Upon receipt of the return, you should issue a refund for the order if you have already confirmed the shipment. If you had not yet confirmed the shipment, you should simply cancel the order instead, as the buyer has not yet been charged.
It's worth keeping in mind that both cancellations and returns are a normal part of most sales operations.