A coupon code is set to expire on some date at 1:30PM.
At 1:29PM a customer is on the last step of the checkout. Customer clicks on Pay Now and gets redirected to payment gateway’s hosted payment page (Store is not using Shopify Payments). Customer makes payment and gets redirected to Shopify.
I hope your day is going well. That’s a great question!
As long as the discount was added to the cart and checkout is initiated before the coupon expires, it will go through.
For example, if a customer is in the checkout at 1:29, and selects Pay, or PayPal, Google Pay, etc. at 1:29, if the gateway is still processing the order at 1:31, it will still provide the discount. This is due to the Shopify Checkout sending the order total, including the discount, through to the gateway at 1:29, before the discount expired.
I hope that makes sense! If you have any additional questions let me know. In the meantime, did you know Shopify offers free courses taught by world renowned experts on all things e-commerce? If not, make sure to checkout Learn with Shopify.