#nkusibojoski-payment_intents
1 messages · Page 1 of 1 (latest)
nkusibojoski-payment_intents
Hi
just to make sure I get the use-case, and please correct me if I'm wrong. You have a "e-commerce" situation where your stock might be limited and you don't want two users to purchase the same item at the same moment and can't reconciliate after the facts. Am I on the right track here?
Hi 🙂
Almost right. This is not a e-commerce situation, but a donation. You can donate to user for some needs, but only one can pay for that need.
Let's say I need camera and I need 100$. Some donor can come and pay me a 100$, but I should prevent 2 Donors to pay me 100$. So once the first donor paid, I should close the payment and to say that "Camera item need" is fulfilled.
Ok
I see
What you can do is basically use the capture later process described here: https://stripe.com/docs/payments/capture-later
You can create both Payment Intents when the users are trying to purchase
The logic would be better handled in the reconciliation part of the workflow
You'll need to write some code upon the creation of that PI that tells your application that this user is trying to donate this item. After the 1st authorization, you'd fulfill the PI of that user and once the second user gets their authorization you would cancel the other PI