Open happy-44 opened 1 year ago
$createcustomerresponse = $api->customer->create(array('name' => $user->fname, 'email' => $user->email ));
Above line gives Customer already exists for the merchant. How can we get Customer Id of this customer
@dipesh008 Pass fail_existing
with value "0" as string while creating customer. It will return the existing customer details.
Please check this doc for your reference https://razorpay.com/docs/api/customers/#create-a-customer
Steps to reproduce the behavior
I am trying to create a customer by passing name and email i get error customer already exist. ( how can i get this customer ID ) i need to create virtual account for this customer.
Note: I know the customer exist , i dont have the customer id which was generated when 1st time customer was created.
Now i am not able to get customer id and not even able to create new customer with same name and email.
Expected behavior
the error should either return the customer ID which exist or allow to find customer based on email id.
Actual behavior
just returns error - customer exist
aaa
Code snippets
No response
Php version
php 7.4
Library version
RAZORPAY SDK
Additional Information
no addional info