Connect to Stripe
Integrating Stripe lets you sell through a website and have those purchases behave like any other. A user who buys on the web and later signs in to your app gets their paid features activated, and web revenue appears in the same analytics as App Store and Google Play revenue.
How it fits together#
Botsi and Stripe split the work in two directions.
Decisions go out. Your server calls the Botsi API with your secret key to create Profiles and fetch AI-priced Paywalls.
Results come back. Your Stripe account notifies Botsi of every purchase, renewal, and refund through the webhook connection. You never call an API to report a purchase.
The customer_user_id you set in Stripe metadata is what ties a payment back to the Profile that was shown the Paywall.
What the connection is made of#
Nothing is installed on your side. The connection is two credentials, both stored in App Settings → Stripe:
- A restricted Stripe API key. Botsi uses it to read the subscription, customer, and invoice behind each payment event.
- A webhook signing secret. It proves each event genuinely came from your Stripe account. Botsi rejects unsigned events, so the connection does not work without it.
Connecting the account#
- Install the Botsi app from the Stripe App Marketplace, choosing test or live mode to match your environment. Each mode needs its own API key.
- Grant the Botsi app permissions when prompted. These allow it to read subscription data and history.
- Continue to the app settings screen and confirm the mode at the bottom of the prompt.
- Generate a restricted API key in Stripe. Stripe may ask you to verify your identity by email, Touch ID, or a security key.
- In the Botsi dashboard, go to App Settings → Stripe and paste it into Stripe App Restricted API Key, making sure it matches the mode you installed.
Botsi begins syncing subscription data once the key is saved.
Sandbox mode cannot install Stripe apps
Stripe's sandbox does not support app installation. Use test or live mode for this step.
The restricted API key is shown once. Save it to a password manager before leaving the page.
Matching purchases to Profiles#
Set app_user_id in the Stripe Customer's metadata to the same appUserId you use with Botsi.