Skip to content
Founding beta: 7 of 50 free spots leftClaim yours

Searching customers by email finds nobody

Bug huntEasyPython · FastAPIPaymentsAPI20 min

PAY-2291: Customer search by email returns nothing for some customers

Ticket #31872 · email · Normal

From: Hana Okafor, backend developer, Sakura StationeryMon, 9:14 am (Tokyo)

Hi Paylane team. We look customers up by email in our checkout integration before creating a new one, using the customers list with the email parameter. For most people it works, but for some customers it comes back with an empty list even though we can see the customer right there when we list everything. It looks like it is the ones whose email we typed with capital letters in the domain, for example Ayumi@Shop.IO. We end up creating duplicates. Can you check?

Symptom

Filtering the customers list by an email address returns an empty list for a customer who clearly exists, when the address in the query is written with different capitals than the address as it was stored.

Steps to reproduce

  1. Start the app and use the Northwind demo key from the README.
  2. Create a customer with the email Ayumi@Shop.IO. The response shows the stored email.
  3. List customers with the email parameter set to Ayumi@Shop.IO, and again with the stored form.

Expected

The customer is found whichever way the domain part of the address is capitalised, as the API contract says (docs/CONTRACT.md, "Lists and pagination"). Other customers and other merchants' customers are never returned.

Actual

data is empty unless the query matches the stored text character for character.

© AICodingRound. Ticket text for practice on this site; see Terms.

How it works

  1. 1Fix the problemin a real codebase.
  2. 2Use your ownAI, or none.
  3. 3Submit, then answera few short questions.
  4. 4Get your gradeand feedback.

Guides that use this problem

All guides

More on Paylane payments

View all

Related problems

View all