#badger-mark_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1457849233804628080
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ we don't do automatic deduplication of customers for the most part. The exception is if you turn on the feature to limit customers to one subscription, then email address is used:
https://docs.stripe.com/payments/checkout/limit-subscriptions
This isnt in relation to Subscriptions. Are you saying that this can be a feature for Subscriptions only?
Oh, if you're just asking about Customer object deduplication, there is none.
so in our example I create a Checkout Session. That session info is fulfilled by a customer and they input "Company ABC" and "customer@example.com" for their info and pay. A customer is created in our dashboard for this.
The next time the customer makes a new payment, they use the info "Customer 123" and "customer@example.com". We get another customer record created but it was technically the same customer. We're trying the best way to either fix or convey this to our Accounts Receivable dept for reconciliation.
The reason we don't have prebuilt Customer deduplication, is because we don't know what makes a customer unique for any given business.
If you want to avoid that, you'll need to adjust your flow to track your Customer objects differently. You'll need to collect whatever data makes a customer unique to you before creating the Checkout Session. Then if its an existing customer you can pass the ID of their Customer object to the customer field when creating the Checkout Session.
so get unique data from my side workflow, then search for the customer using Stripe's Customer endpoints, use that data to link to the checkout session?
Depends on what field you want to deduplicate on, and what you consider a "match". For instance, the email filler is case-sensitive in our List endpoint, but I don't know if you consider customer@example.com to be the same as Customer@example.com, so the approach may not work.
๐ Hi Mark, Toby has to head out so i'll be taking over the thread, let me know if you have any follow up questions
i understand the premise behind the advice given. I'm now curious why Stripe treats email addresses as case sensitive. Can that be further explained?
Our API uses exact string matching for most filtering operations. I suspect this was re-used and wasn't a design choice where they sought out case sensitivity.
interesting. thanks. have to admit, that's the first time I've seen that in regards to email addresses. Your comment on the code just being reused resonates ๐
Any time. Glad we could help ๐
i created a discord account today, downloaded the app and everything and have no idea how discord works, if you need to mark this as closed or not or if I should just leave?
We can close it out on our side. We usually leave the thread open for about 20 minutes after everything looks wrapped up to allow follow up questions to trickle in and then close if the thread stays inactive