Steps to reproduce the behavior
- Create an invoice data object for the razorpay.invoices.create method using the Razorpay Node.js library.
- Include the billing and shipping addresses inside the customer object along with user details such as email and phone number.
- Call the razorpay.invoices.create method with the prepared invoice data.
Expected behavior
razorpay should create an invoice for the user billing and shipping address details provided in the customer object
Actual behavior
Even when different billing and shipping addresses are provided in the customer object while creating an invoice, Razorpay still uses the old billing and shipping addresses that were stored when first invoice created for the user with customer object. As a result, the invoice displays the previously saved addresses instead of the updated ones sent in the request.
Code snippets
Node version
Node v24.11.1
Library version
razorpay V^2.9.6
Additional Information
While creating an invoice from the Razorpay dashboard, there is an option to either add a new address or select from previously saved customer addresses. However, this functionality is not available via the Razorpay API. Additionally, the Customer API does not support fields for billing or shipping address details, making it impossible to programmatically update or provide new addresses when generating invoices.
Steps to reproduce the behavior
Expected behavior
razorpay should create an invoice for the user billing and shipping address details provided in the customer object
Actual behavior
Even when different billing and shipping addresses are provided in the customer object while creating an invoice, Razorpay still uses the old billing and shipping addresses that were stored when first invoice created for the user with customer object. As a result, the invoice displays the previously saved addresses instead of the updated ones sent in the request.
Code snippets
Node version
Node v24.11.1
Library version
razorpay V^2.9.6
Additional Information
While creating an invoice from the Razorpay dashboard, there is an option to either add a new address or select from previously saved customer addresses. However, this functionality is not available via the Razorpay API. Additionally, the Customer API does not support fields for billing or shipping address details, making it impossible to programmatically update or provide new addresses when generating invoices.