Yes that’s exactly correct… they are built-in fields (you can’t see them or edit them) they are part of the Bubble Stripe Plugin… the data is stored on the User datatype, and is accessible in the expression builder, just like any other User field (but they don’t show up in the database, or in your app data, so you can’t manually edit or delete them).
That’s one reason I prefer to handle all Stripe calls myself… so I can have full control over all the data being used.
So trying to unpack this, I think you’re saying that somehow the Stripe ID is associated directly with the User , and whenever that User does anything, it always points to the same Stripe ID no matter what… and somehow on the Stripe side the corresponding Stripe Customer got messed up.
Again, that’s exactly correct… once a User in your Bubble app has a Stripe customer ID (assigned by Stripe during the first interaction, and stored in the ‘hidden’ User field on your User datatype which is part of the Bubble Stripe Plugin, and can’t be edited), any further calls to Stripe via the plugin will use that Customer ID, and there’s no way to change or clear that.
So, if the customer no longer exists in Stripe, you’ll get the error message ‘No Such Customer cus_*********’
As I said, you might be able to see for yourself what’s going on in your Stripe account by simply searching for that customer (using their customer ID). The customer details should still show up, even if it’s been deleted (as will any log activity)… unless that is you’ve hit the ‘Clear All Test Data’ button (which may be the reason the customer has been deleted in the first place)… in which case I doubt there will be any record of the customer left in your Stripe account at all…
But, it’s still the very first thing I would do.
Could this happen by copying Live data into my Test/Development environment?
That is a possibility… although Stripe usually gives a different error in those circumstances (something like ‘this object exists in Live mode, but you’re using a test API key’)… although I’m not certain that applies to Customers as well (but it’s worth investigating… so just search both the live and test versions of your Stripe account).