#Nick137645
1 messages · Page 1 of 1 (latest)
Hi there
You said: ```$customer = \Stripe\Customer::create([
"email" => $user["email"],
"name" => $user["name"]
]);
$customer_id = $customer->id;
$paymentIntent = \Stripe\PaymentIntent::create([
"customer" => $customer_id,
'amount' => 2999,
'currency' => 'usd',
// .....
]);```
If you do not store customers in your DB (eg MySQL, PG or Mongo
We don't de-duplicate customers
you can basically do a Search
You would need to handle that on your end when you create a new Customer
Yep thanks for jumping in @plucky turtle.
You either want to build an authentication process, or you want to run a Search by email
$stripe->customers->search([
'query' => 'email:'customer@domain.com'
]);
Yes, I store the clients in a database locally.
It's more the creation of duplicate clients in Stripe that causes problems
I've been building with Stripe since it's /dev/payments and I've always stored customers id on my backend 🙂
You should just run a check, and it'll be good
Clément and Bismarck: Thanks