Stripe error: No such customer: ''"

Hey Everyone,

I am seriously stuck with the stripe plugin and have spent hours trying to solve. I have just launched my site to live and started immediately having trouble with the error

Stripe error: No such customer: ‘’", a similar object exists in test mode, but a live mode key was used to make this request. So I went through the forum to try and find answers although most of these were related to plans / products and I don’t have either, I just use the ‘charge the current user flow’.

So I decided maybe if I delete my stripe customers that would help fix the issue. And that changed the error to just: Stripe error: No such customer: ‘’"

So I am stuck now because there is not much info out there about this and I have tried changing all my api keys creating new accounts in stripe and using different user credentials to make the purchase on my live site.

After going through some forum posts I think it could be because bubble’s plugin saves stripe customer ids but there is no way for us to edit or delete that in this case and so we are pretty stuck.

So with all that said if anyone has any ideas that would be amazing.

Thanks in advance,

Olly






Stripe Error Log:

{
“locale”: “en”,
“payment_method_types”: {
“0”: “card”
},
“payment_intent_data”: {
“description”: “This is a payment confirmation for the Candlelight Yin Yoga & Sound Journey Experience starting Nov 5, 2021 12:00 am for sage schlebach”,
“setup_future_usage”: “off_session”
},
“billing_address_collection”: “auto”,
“success_url”: “https://oraretreat.com/event/1635725529212x151626012353888260?resume=1635731031681x280741542044885340”,
“cancel_url”: “https://oraretreat.com/event/1635725529212x151626012353888260”,
“customer”: “cus_Jss5xUBb5aA8vW”,
“line_items”: {
“0”: {
“name”: “Candlelight Yin Yoga & Sound Journey Experience ticket for sage schlebach”,
“description”: “This is a payment confirmation for the Candlelight Yin Yoga & Sound Journey Experience starting Nov 5, 2021 12:00 am for sage schlebach”,
“amount”: “200”,
“images”: {
“0”: “https://s3.amazonaws.com/appforest_uf/f1635725459983x608361278064047100/Screen%20Shot%202021-10-20%20at%2011.21.00%20AM.png
},
“currency”: “NZD”,
“quantity”: “1”
}
}
}
Response body
{
“error”: {
“code”: “resource_missing”,
“doc_url”: “Error codes | Stripe Documentation”,
“message”: “No such customer: ‘cus_Jss5xUBb5aA8vW’”,
“param”: “customer”,
“type”: “invalid_request_error”
}
}
Request POST body
{
“locale”: “en”,
“payment_method_types”: {
“0”: “card”
},
“payment_intent_data”: {
“description”: “This is a payment confirmation for the Candlelight Yin Yoga & Sound Journey Experience starting Nov 5, 2021 12:00 am for sage schlebach”,
“setup_future_usage”: “off_session”
},
“billing_address_collection”: “auto”,
“success_url”: “https://oraretreat.com/event/1635725529212x151626012353888260?resume=1635731031681x280741542044885340”,
“cancel_url”: “https://oraretreat.com/event/1635725529212x151626012353888260”,
“customer”: “cus_Jss5xUBb5aA8vW”,
“line_items”: {
“0”: {
“name”: “Candlelight Yin Yoga & Sound Journey Experience ticket for sage schlebach”,
“description”: “This is a payment confirmation for the Candlelight Yin Yoga & Sound Journey Experience starting Nov 5, 2021 12:00 am for sage schlebach”,
“amount”: “200”,
“images”: {
“0”: “https://s3.amazonaws.com/appforest_uf/f1635725459983x608361278064047100/Screen%20Shot%202021-10-20%20at%2011.21.00%20AM.png
},
“currency”: “NZD”,
“quantity”: “1”
}
}
}

2 Likes

In your Bubble application there are two different versions, the Live version and the Development version…these two versions are wholly separated from each other until you perform actions to ‘deploy to live’ does the development version UI and workflows and data structure get transferred to your Live version. However, that doesn’t transfer the development version database to the Live database unless you perform the operation to Copy Development Database to Live.

In Stripe you have two wholly separate applications as well…The Test version and the Live version.

If you have created a bunch of customers in the Test data, they are not present in the Live version. If you’ve created a bunch of products or any other object in the Test data they are not in the Live version, nor are they transferrable.

You would need to create in your Stripe Live data the customers and/or products and prices. You could do this manually in the Stripe dashboard, or when using your bubble application in Live mode create them using your workflows etc. the same way you would in the development version.

I personally don’t use the Bubble Stripe Plugin or any other Stripe Plugin and instead I opt to have total control over my applications most important feature (Monetization) and I do this through the API setup.

This was me as well…which is why I created a comprehensive course on how to integrate with Stripe properly through the API connector. The course covers most everything anybody would need to know to integrate properly and customize the experience for the application.

You can check out the course to see if it is something you’d be interesting in. It would likely save you hours of frustration and headache.

One of the things I do in the course for customers is to actually create a data type in the application called Customers. It saves the User as a related field of ‘purchaser’ and another related field for User as ‘seller’ because in the course editor, it is setup to allow users to be sellers who can sell products or subscriptions.

I use this data type to verify if a particular purchaser is already a customer of the seller or not (in the event that you don’t have sellers and only your application is selling products or services, the ‘seller’ would just be the User in your app that is the Admin user).

I use an advanced feature of ‘formatted as text’ after I perform a search of the data type Customer to verify if a user exists as a customer of the particular seller already or not. This is just one of the many advanced tricks and tips found throughout the course.

This formatted as text when the customer already exists sends the value of the customer stripe ID and if there is not an existing customer it does not…this of course is probably different in the API setup the course covers than the restrictive Stripe Plugin, but maybe something you test out if you are set on using the Stripe Plugin and don’t want complete control over the integration. I would assume the Payer Email is supposed to be representative of the ‘Customer’…Using the API calls you have an option of sending a customer object ID or just a customer email address or nothing at all; I have no idea how Bubble setup the API calls for the plugin to function, but from the screen shot you provided, it seems like they maybe grouped both options into the single input field of Payer email.

Test it out what happens when you don’t send a value through…but I have a slight feeling that might result in an error.

Check this out: Remove Stripe Customer ID - Stripe Plugin by Bubble

This is likely the source. Did you delete your stripe customer?

Heya Ok so I followed the link you gave me & so what I did was delete all my users from the live and dev base and it fixed the issue but now I have another one:

I keep getting this error message upon redirect to the stripe payment gateway now. Looking at the network inspector it looks like a 404 error now.

Has anyone encountered this?

@boston85719 @brad.a.farley Hey, guys this stripe error is simple to solve, actually I faced no such customer error while doing payment with stripe charge a few hours ago. So, its just the Stripe API keys error, simply check your Secret_key while creating the Stripe Customer and while creating the Stripe Charge. Also, check the Stripe Public_key integrating into the script file, then you guys are good to go.
Thanks.

1 Like

That is not always the case. It could be multiple reasons. I outline a few in the post above

Sometimes, it could also be that the customer-ID is wrong, and could have nothing to do with the Stripe API keys. It could be as mentioned in the post above the difference between referencing a customer id for a customer in the development version that is not in the live version while working within the live version.

Glad you found a solution to your situation and that you shared it, but I would not believe that is always going to be the way to resolve for all situations in which somebody might experience the ‘no such customer’ error that people may face when implementing a Stripe payment processing feature.