#S60-Cosminacho - bug

1 messages ยท Page 1 of 1 (latest)

rapid token
knotty prism
#

email search is case sensitive via API

#

the search via API will just not give any results

rapid token
#

Interesting. Does the doc lay out that it should be case insensitive? I will check in to whether this is intended or not

#

I know that emails are almost always treated case-insensitive so that does sound like something we may want to change

knotty prism
#

so, if in the checkout session I write the email as "Cosmin@emedi.ro" then this is how the email will be set in the stripe database.

#

and this really makes some problems.

knotty prism
#

could you please give me an update here ? If the problem is soreted?

rapid token
#

Apologies, was working on other threads, looking in to this now.

#

When I test this myself, the search is case insensitive

#

Can you try this as a curl command and see if it still turns up nothing? curl https://api.stripe.com/v1/search/customers -u sk_test_123: \ --data-urlencode "query=email:'Cosmin@gmail.com'" \ -H "Stripe-Version: 2020-08-27;search_api_beta=v1" \ -G

knotty prism
#

lets see ๐Ÿ™‚

#

hmmmmmmm

#

it doesn't recognise the URL

#

tried with get 2

rapid token
#

That call should be a GET. Can you send me the setup for the call that you are making that is not returning any customers when you try to search by email?

knotty prism
#

I used a get too ๐Ÿ™‚

#

I did change it to /v1/customers

elfin estuary
#

Hello! Catching up...

#

The local part of email addresses are case sensitive, so this is expected behavior.

knotty prism
#

what do you mean by "local part of email addresses?

elfin estuary
#

The part before the @ is case-sensitive.

knotty prism
#

ahhhh

elfin estuary
knotty prism
#

wow...

elfin estuary
#

Yep. My favorite comment on that one is:

#

I work at a large company and there is another person with the same first and last name. I discovered today that his local-part differs from mine only in capitalization. This has been working properly, so I was surprised to see "no widely used mail systems distinguish different addresses based on case". We use MS Exchange which I would call "widely used".

knotty prism
#

ok.

I need a workaround around this

#

is it possible that I can find out the email address of a completed checkout session?

elfin estuary
knotty prism
#

Let's see...I think I may be able to sort it out this way...:)

#

thank you so much.

#

Interesting case though...and even more interesting that you care about such an edge case ๐Ÿ™‚

elfin estuary
#

Most email servers are configured with case-insensitive local parts, but not all, and if we didn't follow the spec here a non-trivial chunk of the Internet wouldn't work with Stripe. ๐Ÿ™‚