razorpay / razorpay/razorpay-node

Razorpay Create Invoice API Ignores Updated Billing and Shipping Addresses in Customer Details

Open
#466 1 comment 0 reactions 0 assignees View on GitHub

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
  1. Create an invoice data object for the razorpay.invoices.create method using the Razorpay Node.js library.
  2. Include the billing and shipping addresses inside the customer object along with user details such as email and phone number.
  3. 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names razorpay.invoices.create and the Customer API but no repository file or test. First verify whether the Node.js wrapper sends the supplied billing and shipping address fields through, and compare the invoice and customer API capabilities. Done means updated addresses in the request are used instead of previously stored addresses, with the two-address case covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.