razorpay / razorpay-node

Razorpay node.js bindings
MIT License
182 stars 111 forks source link

paymentService.invoices.create throwing BAD_REQUEST_ERROR (The name format is invalid.) #161

Open manwithsteelnerves opened 4 years ago

manwithsteelnerves commented 4 years ago

We started getting the error stated in the title with 400 status.

            const createResponse = await paymentService.invoices.create(data);

Is there any restriction on the customer name length(I tried with 2 character customer name)? If so can you please have it in the api doc if anything like that exists?

gowthamvbhat commented 2 years ago

Facing the same issue. Did you find anything related to this?

ankitdas13 commented 2 years ago

@gowthamvbhat A customer name should at least contain three characters . let us know if this issue is still persist

gowthamvbhat commented 2 years ago

@ankitdas13 Why is this restriction in place? Couldn't find any documentation on it.

kkyusufk commented 2 years ago

@gowthamvbhat @manwithsteelnerves You are right! We should add this in our documentation. We will keep this issue open till our documentation is amended.

gowthamvbhat commented 2 years ago

@kkyusufk If you don't mind, can you share why this restriction is in place? I have observed the same in other services

kkyusufk commented 2 years ago

@gowthamvbhat Thats our business requirement, we do not allow less than 3 characters for first name.

gowthamvbhat commented 2 years ago

@kkyusufk Ah! Thank you