• Resolved Trucker

    (@trucker)


    Hi everyone,
    I am using Woocommerce for selling some digital products. Due to the natural of our business, we do not want the item stock to go lower than 0 (-1, -2, etc.)

    We are currently accepting different payment methods, including Cryptocurrency and Stripe. As the transaction speed of Crypto is low, sometimes takes up to 1 hour, so we are facing issue like this:

    1. When an user (User #1) purchase an item and pay with Crypto, the item stock gets hold (going from 1 to 0). As the blockchain is slow, it takes 2 hours to complete the payment. Since it’s so slow, the item stock goes back from 0 to 1.
    2. While the blockchain payment is still pending, another user (User #2) comes to buy the same product. At this time, the item is not being held anymore. Thus, this user gets the product. Item stock goes from 1 to 0.
    3. The blockchain payment is finally confirmed. Woocommerce also gives the product to this user. Item stock goes from 0 to -1.

    So 2 users get the same product.

    How to prevent this issue?

    Thank you a lot!

Viewing 1 replies (of 1 total)
  • Hi there @trucker ??

    Thank you for contacting Woo support!

    How to Prevent Item Stock going to under 0

    From what I gather, this is about one payment gateway completing the transaction faster than the other one. Furthermore, due to the unique nature of the digital product(s), the stock can only be 1.

    I’d suggest setting up the payment gateway for Stripe to authorize payment, and capture later. Thus, allowing the time for the cryptocurrency transaction to conclude, and yourself to double-check which customer actually gets the product. The option is exemplified here:

    https://woocommerce.com/document/stripe/#does-stripe-support-authorization-and-capture

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

Viewing 1 replies (of 1 total)
  • The topic ‘How to Prevent Item Stock going to under 0’ is closed to new replies.