Bubble.io Payment Integration: The Complete Guide
How to choose a payment provider, set up Stripe step by step, handle subscriptions and marketplaces, and go live without losing revenue to silent errors.
The short answer: for most Bubble.io apps, start with Stripe. Use a Stripe plugin for checkout, keep your secret key server-side, and use webhooks to update your database when payments succeed, fail or renew. Test every scenario in Stripe’s test mode before switching to live keys.
1. Which payment provider should you use?
Bubble connects to payment providers in two ways: through plugins from the Bubble marketplace, or through the API Connector, which can talk to almost any provider with a REST API.
| Provider | Best for | How it connects to Bubble |
|---|---|---|
| Stripe | Most SaaS, subscriptions, one-off payments and marketplaces | Official Bubble plugin, third-party plugins or API Connector |
| PayPal | Consumer checkouts where buyers trust PayPal | Plugins or API Connector |
| Paddle, Lemon Squeezy | Selling software globally. As merchant of record, they handle VAT and sales tax for you. | API Connector and webhooks |
| Chargebee, Recurly | Complex subscription billing on top of a payment processor | API Connector |
| Regional gateways | Local payment methods, for example Razorpay in India or Paystack in Africa | Usually API Connector |
Building from Pakistan? Stripe’s availability depends on the country your business is registered in, and local options differ a lot. See our guide to Bubble.io payments from Pakistan: Stripe, Safepay, JazzCash, Easypaisa and Payoneer compared.
2. How to set up Stripe in Bubble, step by step
- Create your Stripe account and productsIn the Stripe dashboard, create the products and prices you will sell. Stay in test mode while you build.
- Install a Stripe plugin in BubbleGo to Plugins in the Bubble editor and install Bubble’s official Stripe plugin. If you need an embedded card form or features the official plugin does not cover, use a well-maintained third-party Stripe plugin or the API Connector.
- Add your API keys safelyPaste your publishable key and secret key into the plugin settings, using test keys first. The secret key must only ever be used server-side. Never put it in a page element or a client-side workflow.
- Build the checkout flowAdd the checkout action to your button or page, pass the price, currency and any metadata you need, such as the user ID or plan name, and send users to a success page afterwards.
- Set up webhooksIn Stripe, add a webhook endpoint that points to a Bubble backend workflow. This is how your app learns what really happened to each payment. See the events to listen for below.
- Test every scenario, then go liveUse Stripe’s test cards, such as
4242 4242 4242 4242for a successful payment, plus Stripe’s decline test cards. Confirm your database updates correctly for each case, then swap to live keys.
3. Webhooks: the step most builds get wrong
The success page a user lands on after checkout is not proof of payment. Users close tabs, cards get declined after retries, and subscriptions renew while nobody is logged in. Webhooks are Stripe’s way of telling your Bubble backend about these events, so your database always matches reality.
| Stripe event | What your Bubble workflow should do |
|---|---|
checkout.session.completed |
Mark the order paid or activate the subscription, and save the Stripe customer ID |
invoice.paid |
Extend access for another billing period |
invoice.payment_failed |
Flag the account and email the customer to update their card |
customer.subscription.updated |
Record plan upgrades, downgrades and scheduled cancellations |
customer.subscription.deleted |
Remove paid access |
charge.refunded |
Update the order and adjust access if needed |
4. Subscriptions
Subscriptions involve more than charging a card: trials, upgrades and downgrades, proration, failed payments and cancellations all need handling. A reliable pattern is to:
- Define plans as products and prices in Stripe, not in Bubble.
- Store the Stripe customer ID and subscription ID on the user or workspace record in Bubble.
- Let webhooks, not page workflows, change subscription status.
- Use Stripe’s customer portal so users can update cards, change plans and download invoices without you building those screens.
- Use Stripe’s test clocks to simulate renewals and trial endings without waiting.
Go deeper with how to integrate Stripe subscriptions in Bubble.io and our guide to handling failed payments (dunning).
5. Marketplaces and split payments
If buyers pay through your app and sellers get paid out, such as a freelance marketplace or a rental platform, you need Stripe Connect. It handles seller onboarding, splits each payment between your platform fee and the seller, and manages payouts. Connect is more involved than standard checkout and is usually built with the API Connector. Read our full guide to Bubble.io Stripe Connect for marketplaces.
6. Multi-currency and international payments
Stripe supports many currencies. In Bubble, store the currency on each price or order rather than assuming one, and remember that Stripe expects amounts in the smallest currency unit, so $10.00 is sent as 1000. If you sell software internationally, consider whether a merchant of record like Paddle would save you tax work. More in multi-currency and international payments in Bubble.io.
7. Security essentials
- Never collect raw card numbers in Bubble inputs. Let Stripe’s hosted checkout or Stripe elements handle card data, which keeps your PCI compliance burden minimal.
- Keep secret keys server-side, and run anything that charges money in backend workflows.
- Protect payment data with privacy rules, so users can only see their own orders, invoices and subscription details.
- Do not trust the client. Prices should come from your database or Stripe, never from a value a user could edit.
8. Common mistakes
- Granting access on the success page instead of from a webhook.
- Forgetting to handle failed renewals, so non-paying users keep access.
- Sending amounts in the wrong unit, for example 10 instead of 1000 cents.
- Testing only the happy path and never a declined card.
- Leaving test keys in production, or live keys in the development version.
9. Go-live checklist
- Live keys added to the live version only
- Live webhook endpoint created and returning success
- Successful, declined and refunded payments tested end to end
- Subscription renewal, failure and cancellation tested with test clocks
- Receipts and confirmation emails working
- Privacy rules checked on every payment-related data type
Frequently asked questions
Does Bubble.io support Stripe?
Yes. Bubble has an official Stripe plugin, there are third-party Stripe plugins, and you can call any Stripe endpoint with the API Connector.
Can I accept subscriptions in a Bubble.io app?
Yes. Define plans as products and prices in Stripe, store the customer and subscription IDs in Bubble, and use webhooks to keep each user’s status in sync.
Can I build a marketplace with payouts on Bubble.io?
Yes, with Stripe Connect. It handles seller onboarding, splitting payments and payouts, and is usually set up through Bubble’s API Connector.
Do I need webhooks?
For anything beyond the simplest one-off payment, yes. Webhooks are the only reliable way to know when payments succeed, fail, renew or get refunded.
Want payments done right the first time?
We set up Stripe checkout, subscriptions, webhooks and marketplace payouts in Bubble apps every month. Book a free discovery call.