Hi there, I am building a web app where users can buy credits for using an AI-Service. They can buy 5 kinds of credit-packages. How would I set up this workflow once the user has completed the payment? Thank you so much bubble-community!
There are multiple ways to do this. One way would be to create a “product” on your stripe portal and set it up to navigate the user to a payment link depending of which product they choose. Here are some videos that go over two different ways to set this up. There are also a lot of existing forum posts about stripe integration which might be helpful
https://youtu.be/k2QYFWJR7Z0?si=g0z11F69fL7wl3Lg.
https://youtu.be/GFus7rvVHFY?si=9B3xix2Uo0-ZiTPU.
Create a webhook in stripe so whenever a customer completes checkout successfully it sends the data back to bubble, make sure you are using (customer_reference_id) in your API to that you can identifying the paying customer. From here in a backend workflow update that customers data, i would create an “active / inactive” field. Also make sure you have also a numeric field with the number of purchased credits and make sure each time they run the AI Service it deducted the required credits by using the make changes to user workflow. And make sure that workflow to trigger the AI cant be run when current users credits are 0
This topic was automatically closed after 70 days. New replies are no longer allowed.