Sell set number of items RRS feed

  • Question

  • User-284642143 posted
    I have a payment system which needs to sell a number of products I'm storing i.e. if I'm selling TVs then there may be 10 in stock.

    I thought to to subtract the quantity from the total amount when they checkout but then I have the issue they may have their card declined or change their mind when at checkout and never purchase the item, so I have deducted the quantity incorrectly in this case.

    If I deduct the quantity AFTER payment has been made then I could have a customer who is in process of entering their card details and another who has just made a successful payment for the last product, so effectively selling one extra item when there maybe non in stock.

    How could I overcome this?
    Saturday, September 22, 2018 8:59 AM

All replies

  • User475983607 posted

    IMHO, this is not a good question for a support forum because there's no specific answer and an infinite number of possible designs. 

    The simplest solution is always validating inventory are the point of sale and reducing inventory depending on the result of the sale.  Preferably this action is done in a transaction. This means other users might have product in their cart that will not longer pass validation.  How you deal with invalided cart items depends on the requirements and is generally up to a business owner.   Someone that explains how the system should work.

    Again, there too many possible solutions and no posted requirements to narrow down the solutions.

    Saturday, September 22, 2018 2:00 PM
  • User283571144 posted

    Hi EssCee,

    In my opinion, we have two solutions.

    One is selling exceed the stock.

    By using this solution, we could subtract the quantity from the total amount when the has just made a successful payment for the product.If someone also made a successful payment for the product, you could connect to the product provider to ask for more stocks and send the product later for the user.

    Another solution is we should subtract the quantity from the total amount when user redirect to the payment page.

    When user has redirect to he payment page, you could set a timout at the page to count the user payment time.If user has exceed the payment time and give up paying, you could re-add the quantity from the total amount.

    Best Regards,


    Tuesday, September 25, 2018 7:32 AM