#Fausto-after-checkout

1 messages · Page 1 of 1 (latest)

forest dragon
#

I'd recommend using the webhook approach. The delays on those are usually only a couple seconds, and it mitigates the risk of your service not getting enabled if the user can't return to your page for some reason (loses service, battery dies, etc).

pulsar ether
#

Thanks for the answer @forest dragon! I was thinking about doing it twice, on the success page and on the webhook checking if its not previously done. So it would be like a "race" and the first method that works is the one that activates the service. What do you think about this approach? Should i call the stripe API with the checkout session id to get the subscription status and if its activated i enable the service?

forest dragon
#

Are you reading my mind?!? I was just thinking about implementing both if minimizing time-to-enablement is the highest priority.

You'll definitely need to add logic in both flows to confirm whether the other flow has already completed, but isn't outside the realm of possibility.

pulsar ether
#

Haha, nice! Again, thanks for your time!

Just the last detail, with the checkout session id that i get on the success page i should be able to get from the stripe api the status of the payment, right?

forest dragon
#

Yup, you should be able to use that ID to find the Payment Intent ID and then check the status of that.