Canceled Stripe checkout reduces stock becaues of wrong order status

We have currently implemented Stripe checkout.
If a customer leaves the checkout page via the implemented back button, the order status changes to “incomplete” which is totally fine. This keeps the stock at the same level.

In the following cases the order status remains “open”:

  • If the customer closes the page/browser
  • If the customer clicks on the back button of the browser
    This reduces the stock and it remains reduced until an admin sets the order status to “Failed” or “Incomplete”.

In my opinion, this is not a logical behavior on the one hand and a security risk on the other, as someone can intentionally reduce the stock of a store completely.

From my point of view, there are two ways to avoid this problem:

  • As soon as the stripe checkout is opened, the order status changes to “Incomplete” not/never to “Open”
  • The order is not created until the stripe checkout has been completed with a successful payment.

Are there any other ways to get around the problem or did I configure something wrong?

How could the above suggestions be implemented?

Thank you

This subject has been beaten to death in the past. Some prefer one way and some prefer the other.

I wasn’t aware that the status inventory was not editable in admin. However, you may be able to edit the data base to change the open status inventory from decrease to increase.

I can totally understand that there are different preferences about this behavior but I don’t understand how to implement “the other” way :slight_smile:

There is a plugin from soft solid (Add-ons :: Site Management :: Do not change inventory). It adds an “Do not change”-inventory option but still the “Open”-status is not editable.

So I will try to find out how to edit the “Open”-status.


UPDATE cscart_status_dataSETvalue= 'I' WHEREcscart_status_data.status_id= 3 ANDcscart_status_data.param = 'inventory';

Edit: The editor is altering the format.

1 Like

I found a solution which should work for me best:
I changed /app/addons/stripe_connect/payments/stripe_connect.php line 79 from

fn_change_order_status($order_info['order_id'], OrderStatuses::OPEN);
    if (!empty($session->payment_intent)) {
            ['stripe_connect.payment_intent_id' => $session->payment_intent]


fn_change_order_status($order_info['order_id'], OrderStatuses::INCOMPLETED);

So the initial status is always “incompleted”.

1 Like