With famous.ai you can link your app to stripe and listen to events such as customers cancelling their subscriptions. You can then perform a necessary action such as downgrading a user account. Follow the steps below to get started.
Step 1 - Create your project
Start by creating your project on famous.ai. Tell it you want to create an app that takes payments with Stripe.
Step 2 - Connect with your Supabase account
The AI will likely ask you to connect with Supabase. Any apps that require dynamic data such as payment processing will require a backend-service. We recommend using Supabase for this. For more help on integrating with Supabase, check out our article Integrating with Supabase.
Step 3 - Login to Stripe
In a separate tab, login to your Stripe account. We recommend creating a Stripe Sandbox initially to test. However, if you have an active Production account you can use this. We need to copy the Publishable Key
and Secret Key
.
Step 4 - Connect with famous.ai
If you haven't been prompted already, tell the AI chat that you would like to connect with Stripe to take payments. It will ask you to enter your Publishable Key
and Secret Key
. This allows your app to process transactions directly into your stripe account.
Step 5 - Listening to events from Stripe
You may wish for your app to dynamically respond to events within Stripe, such as payments being confirmed or whenever someone subscribes. If so, youβll need to set up a Stripe webhook.
A webhook is a way for stripe to contact your app whenever something "an event" happens. For example, if someone cancels their subscription directly within stripe, you can set up Stripe to contact your app so you can downgrade their account.
π§ How to do it:
In your Stripe Dashboard, Select Developers.
Look at the left-hand menu at the very bottom
βClick on the Webhooks Tab at the top
Click "Create an Event Destination"
βYou should see the screen like the below
β
βIn famous.ai, tell the AI you would like set up a webhook in stripe, and ask for the webhook endpoint URL
β
βCopy the webhook endpoint URL
β
βPaste it into the Endpoint URL field in Stripe
β
βSelect the events you would like your app to listen to.
β
We recommend choosing as few as possible. You can select all events, but bear in mind that Stripe will be pinging your app every time every selected event happens. So keep it as lean as possible.
β
β
βClick Add Endpoint
β
βYour app should now be connected to stripe via webhooks and you can tell the AI in famous.ai to respond to whichever events you like.
Step 6 - Test and check transactions in Stripe
Try making a test payment in your app. If you do not see a form to make payments, ask the AI to build one that makes a payment into your stripe account. Tell it which fields you would like, such as name and email.
Try a test payment and check it is processing correctly into your Stripe account. If it is not, and you are receiving errors, tell the AI what errors you are getting and it will self-resolve them.
If you would like to Sell specific products or subscriptions, check out our article:
β
β