#Eclectic Nature

1 messages · Page 1 of 1 (latest)

spice zincBOT
ornate elbow
#

The answer is generally 'it depends'. How are you integrating with Checkout? Via the API? Or are you using something like Payment Links?

stable gust
#

Payment links and pricing tables

ornate elbow
#

Then yes, in most cases those surfaces will default to creating a new Customer for each payment. And you're right in that we don't deduplicate email addresses

stable gust
#

Firebase, when creating a new user, also creates a Stripe customer. So the customerID from Stripe is saved into Firestore. But when the user logs in, and then attempts a payment, even though the email of the user exists and the customer ID exists, Stripe creates a new customerID for the payment and it's not added to the original user account

#

actually, when the new Stripe customer is created, it is using the same email address. I can test it 10 times and each payment made will have a new account with the same email

ornate elbow
#

But when the user logs in, and then attempts a payment, even though the email of the user exists and the customer ID exists, Stripe creates a new customerID for the payment and it's not added to the original user account
There's currently no way to re-use existing Customer objects/IDs with Payment Links and pricing table. Only direct Checkout Sessions

ornate elbow
stable gust
#

ok, so I have to code it all manually.. cannot use payment links or pricing tables, corrrect?

#

so let me ask you one more question: If I were to leave this as is, what is the downside with respect to Stripe if there are multiple customers with the same email?

ornate elbow
ornate elbow
stable gust
#

I was thinking if there's no downside to having multiple customers in Stripe with the same email, then I can leave it as is and just use the webhook to capture the info I need and bring that into my firestore

ornate elbow
#

Right, but the idea is for you to map cus_xxx in Stripe to your database/auth service so you can provision access according to their subscription status

#

If there's multiple Customer objects in Stripe that in theory map to one user in your system, then that becomes an issue for you to manage

stable gust
#

right, but after each transaction I can save the newly created Stripe customer ID for that payment and save that to my database so that I can track the most recent payment

#

Thanks for your time and help!
I will build it manually instead of using the pre-built checkouts... It would be messy 🙂

#

have a good day!