Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Link Requires Phone Number Despite Providing Customer Details #425

Open
felixchristo opened this issue Dec 5, 2024 · 0 comments

Comments

@felixchristo
Copy link

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: '[email protected]',
    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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant