#estanip-node-react

1 messages ยท Page 1 of 1 (latest)

meager pawn
#

@feral snow in which context are you asking this, I don't really follow what is blocking you

feral snow
#

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.

meager pawn
#

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

feral snow
#

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?

quasi pollen
#

๐Ÿ‘‹ koopajah had to head out so I'm taking over!

feral snow
#

Ok, HI!

quasi pollen
#

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

feral snow
#

Ok, I'm going to check which endpoint I need in this case

#

Thanks!

quasi pollen
#

๐Ÿ‘ let us know if you need anything else!