Storing User's Credit Card Data

In Bubble, I’ve starting creating what I eventually hope to use as “online store” where users will make purchases via credit card. My intention is to actually launch this as an actual website (at least for a while to gauge customer interest, SEO is not a concern).

The only concern I have with this is I would really like to give customers the ability to save their credit card information to their account so that they don’t have to enter their credit card every time they make a purchase.

I’ve read that is not PCI compliant, which means I can’t store CC information within Bubble. Seeing as this feature is kind of a dealbreaker for me, I’m wondering what the best alternatives are.

When I get around to integrating Stripe into my fledgling Bubble app, will Stripe be able to store CC information which would allow me to just “point” the user to Stripe? In other words, in a User’s Profile, I could show that the User has XXXXXXXX1234 credit card “saved” but wouldn’t actually store it within Bubble, but rather it would be stored in Stripe – Then when the user makes a repeat purchase, I can just charge the card stored in Stripe that’s associated with the logged in user. Is this possible? Note: I know there are also plugins for PayPal which I will also look into, but I want to give the user multiple payment options.

As another alternative, I’ve also considered switching over to Webflow, but haven’t found any information on PCI compliance for Webflow. When I was initially researching Bubble vs Webflow, I saw a good amount of Online Stores built in Webflow, so I would think they’re more ecommerce-friendly. The reason I chose Bubble was because the store I’m creating is quite complex and Bubble reportedly has “more flexibility”, but seeing as it’s still an online store, payment features are going to be pretty crucial. According to Webflow, if I built a website there, I would still be connecting to a payment gateway, which I imagine is the same situation in Bubble… so I’m just not really sure which platform is best when it comes to accepting payments online and letting users save their CC info.

Another alternative I can think of would be to connect Bubble to an external database where I could store CC information. I’m confident I could handle this from a technology perspective, but as I’m not a lawyer, I’m unsure if this would meet the legal requirements to be PCI compliant. It would also be a lot of work for something that is really just in the MVP/startup phase…

Any advice?

Hey @yourmom,

No need to overcomplicate. Stripe can handle storing default cards no problem. When a user signs up, or purchases something for the first time, they have the option of setting the card they used as a default method. Every subsequent purchase, they can choose from.

I’m pretty sure the Bubble Stripe Plugin has an option to view the last 4 of the default card. If not, easily retrievable via the API.


Install Bubble’s Striple plugin and setup the respective api keys

You will then be able to use the expression “current user Stripe card id “ (and others including the 4 last digits … etc) is empty or not empty to build logic in flows and conditions in elements