Stripe checkout deducting stock multiple times and multiple emails

We’ve been trying to work out why our stock keeps getting out of sync (dissapearing) so we installed product change log addon which identified the Stripe checkout as the issue.

When a customer checks out with Stripe 3 emails are sent to us and 3 emails to the customer. Sometimes all 3 trigger stock deduction correctly (example stock from 2 to 1) and sometimes it will deduct the stock multiple times.

Seems like a fairly serious bug.



Both inventory and emails are triggered based on the change in order status so you need to look into seeing why the order status is changing frequently.

1 Like

No the order status is not changing, this appears to be Stripe sending multiple confirmations. Stripe do this for reliability I assume, but clearly state that payment processing software should handle it.

I suspect the reason it only changes occasionally the stock multiple times is as it needs the database to update and the requests are sent fast.

This is a bug, and it’s not a user error from my part using their software.

To clarify, I think the following is happening.

Stripe sends multiple payment confirmations.

The return webhook runs each time a confirmation is sent and sends a new email, re-sets the status, and sets the new stock numbers based on what is currently in the database.

After the first 1 or 2 requests the database has updated and the 2nd / 3rd requests will see lower stock and as a result deduct stock again.

What the stripe webhook should do is only take action on the first payment confirmation and ignore the subsequent ones.

It’s definitly a bug? It doesn’t happen with PayPal or other payment methods.

1 Like

Hello.

Which version and edition of CS-Cart do you use?

Hi,

We’re running v 4.18.3.

We were on Store builder plus but just upgraded to ultimate.

Kind regards,

Neil

Possibly related.?

1 Like

I don’t think so this issue with Stripe has been going on for some time over many updates. I’ve only just been annoyed enough as the product range grows to see if it can be resolved.