Stripe Plugin Bug on Customer ID?

Hi I'm using the stripe plugin in my app. I noticed when testing if a previous bug was solved (it is), that everytime i open / create a checkout, i get a new customer id. I have this code on my frontend when clicking on a "subscribe" button (photo 1) Webhook in test mode (photo 2) Also i checked it in my db and on User table, the stripeCustomerId is changing. When i go to stripe dashboard > clients, look how many clients with same email (photo 3)
No description
No description
No description
5 Replies
iBoostYou
iBoostYouOP3mo ago
I dont know if this is intentional (i doubt it cuz having that many clients with same email... not gud) @bekacru should i open issue?
Ping
Ping3mo ago
The only times it should do this is if this variable doesn't return true in an if statement
No description
Ping
Ping3mo ago
What happends if you were to log what is in typedData.subscription.id?
iBoostYou
iBoostYouOP3mo ago
At the time it was undefined bc no subscription, it was a fresh account. Now that i have a active subscription it logs the sub id, and doesnt change the customer id. But on a fresh acc with no subscription, everytime i open a checkout session, i was getting on the webhooks a customer created event (as u can see on the photos) and on my db, it was updating the stripeCustomerId . Once u get a subscription, it doesnt create / capture the customer.create event anymore
nowy
nowy2mo ago
Hi did ou nanage to solve this? I've got the same issue!

Did you find this page helpful?