Open cherrykoda opened 6 months ago
Hey, I also encountered the same issue but I saw the issue when switching from Stripe test environment to live
I also noticed the accounts we were using when Stripe test keys were being used, would come back as "customer doesn't exist" in Stripe when using live keys.
I managed to fix this by removing everything from the stripe_customers table.
But like @cherrykoda when I registered a new account in Craft, it worked ok
We are also seeing the same problem here after upgrading to Commerce 4 using test credit details.
Description
When adding Stripe to an existing Craft Commerce v4 site, existing users who have an order history cannot checkout due to a stripe error regarding their customer ID not existing in Stripe. The Stripe Customers table is understandably empty following installation, but the payment element returns an error about the customer not being found in Stripe.
This screenshot is using the Craft example templates, unmodified. Sidebar omitted for user data privacy.
For new users / guests / those without any orders, they correctly get the Stripe payment element
Stripe support pointed to the Commerce Plugin as being the issue. The expectation here would be for the Commerce Plugin to handle the payment gateway of a user that doesn't exist in Stripe as a new Stripe customer, without removing the Craft Order history that's already in the system.
Also - I have confirmed this same issue with another Craft developer who encountered the same. Discord link here to brief discussion: https://discord.com/channels/456442477667418113/666747438794670140/1241324249474404442
Steps to reproduce
Additional info