Forum Academy Marketplace Showcase Pricing Features

Get Stripe customer info API

Hi all,

I’ve built and deployed an app and am live testing now, and have SSL certificate. Stripe is set up to take payments and I have successfully tested in test and live environment now. This alone is proof of bubble’s fantastic capabilities as I know zero coding.

However I am trying to now link up Stripe and Bubble so that transactions from 1 bubble customer are stored under one customer ID in Stripe. I’ve been reading up on API workflows and API connector and the same on stripe’s end and I’m afraid I just can’t get anything to work as I have no grasp of the languages and even basic workings of API, and when to use what type of API (get/post, api connector vs api workflow, stripe webhooks needed or not etc).

I’ve tried reading up on the forum but everyone bypasses these simple steps and usually has a more complex question.

Please can some friendly saint outline basic steps to getting stripe customer id and bubble user id to link? Or point me to forum post that does this? I’ve read reference materials loads so please don’t send me back to that! Also any good reference docs or outlines of principles of API? Hard to find docs that don’t assume knowledge of one kind of coding language or another…

Thanks!

Chris

We save the customer ID behind the scene, the way you can access is by doing this.

2 Likes

Thanks Emmanuel, but every time my user in bubble makes a payment it is creating a new customer ID at the stripe end, while no stripe customer id at all comes up when I run what you have done for a user (despite a successful stripe charge). I havent done anything to create customers at the stripe end as it was creating customer records automatically. How do I link the customer id in stripe to bubble - assuming I could get the customer ID doing what you have done here, don’t I need to save that down to bubble and then send this ID back with any future transactions so Stripe knows the customer? (if I could get the ID in the first place)

No, it creates a different charge ID, which gets returned after the charge action.

This is my stripe test data - arent these different customer ids? I thought I was aware of the charge IDs as I have been capturing them along with all other payment info that was available as a result of the successful charge. I saw another post where you were showing how you had to do an api workflow within an api workflow to use the charge id to identify the customer id, so that’s why im a bit confused. I’ve seen the user ‘strip customer id’ field and tried to use it but can’t get anything from it…

Well if you sign the users up, the customer_id will be the same. If you don’t, honestly, it’s not very useful. You can still access the current user’s customer id I believe, right after the charge, but it’d be better to have users sign up, since it’s always the same email…

ok that maybe where i’ve gone wrong (amongst many things). Just to be clear, which stripe action do you use? Do you save the cc info then charge the user with saved cc, or do you mean the subscription action? Neither of these seemed intuitive to me as my customers pay as they go so arent on a plan, and I was nervous about saving CC details. however since reading more im less worried about this part and just keen to find the right wrkflow action…

ok thanks so much I have the customer id and getting payments on the same customer now. Sorry for what must seem like such a basic issue but i got really bogged down and confused with the various API threads that seem to revolve around this. Just for my peace of mind, am I exposing my users or myself to any risk by NOT setting up webhooks and other various API calls for monitoring stripe transactions? Sounds like stripe and all payment info is kept pretty secure so I assume all I miss is the ability to run various administrative functions e.g. email about failed transactions etc? Thanks for all your help.

Yes things are secure when you’re using stripe. Webhook are cool if you want to handle failed charges for subscriptions or other things like that, but for basic payments you don’t need to worry about API stuff at all.

1 Like

Hi, can you elaborate on how you accomplished this (screenshots/workflows)? I’m having the same issue. As a logged in user, I’m not sure why this is still happening. Thanks.

1 Like