I am not sure which stackexchange website is correct website to post this question.
I haven't worked on payment process before - and I need help with payment process using Stripe -
we are developing a website in which we will be selling items from different businesses.
Now the flow of the Application is like this:
- Customer comes to our system and signs up
- Customer searches for a business
- Customer adds items from that business to a shopping cart
If the customer selects pay online we get the debit card information and generate a token using Stripe.
Now an order can only be placed if the business accepts the order. For this we have a Dashboard where the Business user will login and wait for the orders. As soon as the order is placed by the customer the Dashboard receives a notification (SignalR connection). The business owner then can accept or decline the order.
If declined we notify the customer that order was declined. If accepted we notify the customer that order was accepted.
Question:
Now the problem I am having understanding is that when do we charge the client/customer?
We have a token generated on the Browser using Stripe. But we only want to charge the Customer if the order is accepted.
The problem with charging the customer AFTER
the order is accepted is that WHAT IF the CARD details entered by the customer where incorrect? In this case the charge will fail - but the Admin has already been notified about the order and the Admin has accepted it.
The problem with charging the customer BEFORE is that what if the Admin declines the order. In this case we will have to issue a refund - Which might make the customer upset and not use our system in the future?
What is the best way to do this?
When do we charge the customer?