How to handle delivery time slots that expire before purchase is complete?

  1. I have an e-commerce web app where you can choose among multiple time slots for your delivery. There are some rules that depend on when the purchase is completed.
    For instance, if I purchase something before 2:00 PM, I'm able to select same-day delivery.

  2. Some customers might select same-day delivery when it's 1:55 PM, but as they continue through the checkout process, the 2:00 PM deadline is met, so their purchase is rejected.

  3. How should I handle this situation?

    Currently, whenever the user reaches the "select delivery time" step of the checkout process, backend sends all the possible time slots, according to the business logic at that moment.

    I have a few ideas on mind (like allowing a 10-minute "grace period", or giving a detailed explanation when the purchase fails do to this reason), but since this seems to be a common problem, I would rather use an existing solution than re-inventing the wheel.