/bubble-tutorials

How to accept card payments in Bubble

Learn how to accept card payments in Bubble with simple setup steps, secure payment options, and best practices for smooth online transactions.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to accept card payments in Bubble

You accept card payments in Bubble by using the Stripe plugin (the official Bubble one), which gives you a Stripe Payment Element that can securely collect card details. Bubble never handles raw card numbers; Stripe handles that part. Your workflow is usually: create a Stripe customer → generate a payment → confirm the payment → store the result in your Database. This works for one‑time payments or subscriptions.

 

Core Steps to Accept Card Payments

 

Below is the simplest valid approach that works reliably for beginners and real apps.

  • Install Stripe plugin: In the Plugin tab, add the official Bubble “Stripe” plugin. Connect your Stripe API keys (test mode first).
  • Place the Stripe Payment Element: On your page, drop the “Stripe Payment Element” visual element. This is the UI that accepts the card number securely.
  • Create a PaymentIntent: In your workflow (usually a “Pay” button), use the action “Stripe - Create a PaymentIntent”. Set the amount and currency.
  • Confirm the PaymentIntent: After creation, run the action “Stripe - Confirm PaymentIntent” and choose the Payment Element on the page as the source.
  • Handle success/failure: Stripe returns a status. On success, store the PaymentIntent ID in your database (ex: in the User or in an Order).

 

Important Bubble Concepts

 

PaymentIntent is Stripe’s object for charging cards. Bubble’s plugin creates it for you. Client Secret is what the Payment Element uses behind the scenes; Bubble handles it automatically. You don’t store card numbers; you store Stripe IDs.

 

Example: Charge $20 Button Workflow

 

// Step 1: Create PaymentIntent
Stripe - Create a PaymentIntent
amount: 2000        // amount in cents
currency: usd

// Step 2: Confirm it using the payment element
Stripe - Confirm PaymentIntent
payment intent: Result of step 1
payment element: StripePaymentElement A

// Step 3: After success, save result
Make changes to Current User
field: last_payment_intent = Result of step 2's id

 

This setup lets you accept real card payments securely without touching sensitive data. It works for one‑time payments, and for subscriptions you’d instead use “Stripe - Create a Subscription” with the Payment Element as the payment method.

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences