Hello everyone! It’s me again…
I have questions about what is the best process for using Stripe on the Web.
I created a flow using the Stripe Component, where it creates a Payment Intent and sends it to Stripe and the payment is completed.
I need the result of this action to be the creation of “customer.subscription.create”. Questions:
-
Would using Stripe Checkout (sending the user to another page and bringing them back with confirmation) solve this problem?
-
If 1 is no, how do I make the flow go from Payment Intent to Customer Subscription Create?
My ultimate goal: When the user makes the payment, Xano receives the Webhook with the user’s “subscription_id” and saves it in the database, as well as updating the plan and other information.
Thank you in advance again!
Hello @felipegranado
That’s precisely what we covered in our new Stripe mini-course: https://youtube.com/playlist?list=PLvTqMLG5UNf6sirvG9MaWbUeN1DlH3eWg&si=QpAWI5nlgk4pM3Hh
Using the elements of the Checkout page won’t change your issue though. Creating a subscription can only happen through webhooks (which are covered in the course), and need a backend like Xano to work. Frontends (like WeWeb) can’t receive webhooks as they are not servers.
1 Like
Hi @Quentin !
Thanks for the answer.
Yes, I saw the two videos on YT (very good, by the way) and did the entire Webhook procedure on the backend (Xano). It works perfectly.
My question was more focused on the Stripe Form element, because it generates a payment intention, and, even though it is a subscription, I cannot return “customer.subscription.create” in the webhook.
But the Checkout Page ~element~ (read Action) works perfectly!
My last question is that I didn’t need to create a “Stripe Session” (I confess that I found it a little complicated), but I got the same result: I received the webhook and updated it in the Xano Database with the Subscription ID.
The question is whether it is really essential to create a session on Stripe…
Thank you in advance for your commitment to the platform. It’s getting better and better!
PS.: I noticed that you didn’t use the Stripe Chekout page Action, which really made 150% of the work easier to redirect! Simply perfect! Pay an extra coffee to whoever developed it! Haha