Forum Academy Marketplace Showcase Pricing Features

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”: “Candlelight Yin Yoga & Sound Journey Experience”,
“cancel_url”: “Candlelight Yin Yoga & Sound Journey Experience”,
“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”: “https://stripe.com/docs/error-codes/resource-missing”,
“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”: “Candlelight Yin Yoga & Sound Journey Experience”,
“cancel_url”: “Candlelight Yin Yoga & Sound Journey Experience”,
“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”
}
}
}

1 Like

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?