razorpay / razorpay/razorpay-node
Issue with create customer when customer is already exist and fail_existing value is 0
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 243
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce the behavior
- create customer in Razorpay with email id, mobile number and name (new) and fail_existing : 0
- try to create it again with same details it will
Expected behavior
In second time I am trying to create user it should return customer id ,
Actual behavior
its throwing error that customer is already exist but it should return customer id as I sending fail_existing : 0
Code snippets
// Package : ^2.0.6 :
new API({
hostUrl: 'https://api.razorpay.com/v1/',
ua: 'razorpay-node@' + Razorpay.VERSION,
key_id: key_id,
key_secret: key_secret,
headers: headers
});
// Package : ^2.9.2:
this.api = new API({
hostUrl: 'https://api.razorpay.com',
ua: 'razorpay-node@' + Razorpay.VERSION,
key_id: key_id,
key_secret: key_secret,
headers: headers
});
Node version
v18.13.0
Library version
^2.9.2
Additional Information
It is working in old package version (2.0.6) of Razorpay
I found API URL is different , may be its issue in API
but in new Updated package API is
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing customer creation with fail_existing set to 0 on Node.js package versions 2.0.6 and 2.9.2, comparing the API URLs shown in the issue. Check whether the changed base URL affects the duplicate-customer response, and confirm that the newer version returns the existing customer ID as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100