Skip to content

Bubble plugin · Payments

The Bubble Stripe plugin in Next.js

Server-side calls on the official Stripe SDK, with Stripe Checkout for payments.

Partly converts · 14 of 34 parts

By The deBub teamUpdated

On this page

01What it becomes

Server-side calls on the official Stripe SDK, with Stripe Checkout for payments. The common Stripe workflows convert to server code on Stripe’s official SDK: subscriptions and one-off charges go through Stripe Checkout, and the Stripe data your pages show (subscriptions, cards) is read on the server. Prices and other fixed settings stay on the server; the browser can only act on the signed-in user’s own Stripe customer.

npm packages added to your app: stripe.

02What converts

  • Subscribe the user to a plan (Checkout, or updating an existing subscription) and cancel a plan
  • Charge the current user (Checkout payment)
  • Collect a card, make a card default, delete a card
  • Update the customer’s information
  • Charge a user with a saved card and refund a charge (backend workflows only)
  • Data: the user’s subscriptions, subscription status and cards

03Not converted yet

  • Invoices and invoice items
  • Coupons (creating one, applying one to an existing plan) and subscription items
  • Customer balance adjustments, tax IDs, capturing an authorized charge
  • Stripe Connect payouts and transfers to sellers

Where your app uses one of these, the generated code keeps a marked placeholder in the right place and your report lists it, so it can be finished with the assistant or by any developer. The rest of the plugin works as described above.

04What you set up

  • Set STRIPE_SECRET_KEY in your hosting’s environment variables (sk_test_… while testing).

05About this plugin

Stripe is made by Bubble itself (actions + data sources (payments)). See its page in the Bubble manual.

Questions

Does the Stripe plugin work outside Bubble?
Not as it is: Bubble plugins only run inside Bubble. In a Next.js app it is replaced by generated code — Server-side calls on the official Stripe SDK, with Stripe Checkout for payments (stripe).
Will my Stripe settings carry over?
Mostly. deBub converts 14 of the plugin’s 34 parts from your .bubble export; anything else is marked in the code and listed in your report. Secret keys are added as environment variables.

The deBub team

We build the Bubble → Next.js compiler behind deBub. Spotted something out of date? Write to hello@debub.io.

All 45 plugins

Typed server-side functions in src/server/api-connector.ts

Converts

Toolbox

Not Quite Unicorns

Components and browser helpers; your own JavaScript runs in the browser as before

Partly converts · 9 of 10 parts

A React component that ships with your app: icons, toggle, range slider and checkbox

Converts

Leave Bubble.
Keep building.

The scan is free and shows your exact price. No card needed until you choose to generate.

Start with a free scan