razorpay / razorpay/razorpay-node
Payment Link Requires Phone Number Despite Providing Customer Details
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
- Use Razorpay's Node.js SDK to create a payment link.
- Provide the customer object with valid details such as phone number, email, and name.
- Access the payment link generated.
- Notice that the payment page still requests the phone number input.
Expected behavior
The payment page should pre-fill or skip the request for the phone number when it is already provided in the customer details during the payment link creation.
Actual behavior
The payment page always prompts for the phone number, even if it is provided in the customer details.
Code snippets
const Razorpay = require('razorpay');
const instance = new Razorpay({
key_id: 'your_key_id',
key_secret: 'your_key_secret',
});
const paymentLinkOptions = {
amount: 5000, // Amount in smallest currency unit
currency: 'INR',
description: 'Test Payment',
customer: {
name: 'John Doe',
email: 'john.doe@example.com',
contact: '+919876543210', // Phone number
},
notify: {
sms: true,
email: true,
},
callback_url: 'https://example.com/callback',
callback_method: 'get',
};
instance.paymentLink.create(paymentLinkOptions)
.then((paymentLink) => {
console.log('Payment Link:', paymentLink);
})
.catch((error) => {
console.error('Error creating payment link:', error);
});
Node version
Node v18.18.1
Library version
Razorpay v2.9.5
Additional Information
- Have verified the phone number is correctly formatted and adheres to international standards.
- Have tested across multiple links, and the issue persists.
- This behavior impacts the user experience negatively.
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 at the paymentLink.create entry point in the Node.js SDK and reproduce the behavior with the supplied customer details. Determine whether the generated request controls the hosted payment page or whether the behavior is outside this library. Done means the phone number is pre-filled or no longer requested, with the result verified against the reported options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100