Skip to content

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

Description

@aryancygner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions