I am currently migrating a number of my clients from Stripe's old checkout window to the latest version of the Stripe checkout window to get it SCA ready. I have migrated the majority of my clients but one particular client tracks stock levels on server side. This was fine with the previous Stripe checkout window because my application would simply update the stock level of an item when the /charge succeeded with Stripe.
Now, because of V3 of the checkout, I have to create a Checkout Session before the end customer has paid for the item. At this point I then update the stock level of an item and if purchased that is fine. If they cancel the payment then I can replenish the stock level and that works fine too. My problem comes when a customer doesn't cancel the payment but instead exits the checkout window, or leaves it open in their browser without completing it. This leaves the Payment Intent 'Incomplete' on my Stripe dashboard but never triggers the stock replenishment function because I haven't received a payment intent cancellation. Is there any way round this? With a maximum time before an incomplete payment is automatically cancelled perhaps?
Any help would be greatly appreciated. Thanks again