#estanip-node-react
1 messages ยท Page 1 of 1 (latest)
@feral snow in which context are you asking this, I don't really follow what is blocking you
I have a payment form created with Payment Element from react-stripe. When I load the payment, and it is all ok it redirects me to a certain url. But I want to be able to capture the status of that payment in the back to be able to take that data in case its status is ok.
Okay, so you should be able to retrieve the PaymentIntent and check its status. Your server should know about the PI id since you created it before and you should be associating it with your customer's current session/cookie
so you call https://stripe.com/docs/api/payment_intents/retrieve with that id and look at its status
Ok perfect, does this endpoint have a similar functionality or in which case should I use it?
stripe.webhooks.constructEvent
The PI id is generated by stripe.paymentIntents.create?
๐ koopajah had to head out so I'm taking over!
Ok, HI!
stripe.webhooks.constructEvent is not the same as retrieving a Payment Intent - constructEvent is used for more general purposes to take a webhook event that comes in to your endpoint and verify the signature.
and yes, a PI ID Is generated by stripe.paymentIntents.create
๐ let us know if you need anything else!