Skip to main content
PATCH
Available in🇮🇳 India🇲🇾 Malaysia
Use this endpoint to update the details of the invoice. The following table displays ths updates allowed as per invoice states:

Path Parameters

string
required
The unique identifier of the invoice.

Request Parameters

string
Any comments to be added in the invoice. Maximum of 2048 characters.
object
string
You can pass the customer_id in this field, if you are using the Customers API. If not, you can pass the customer object described in the below fields.
string
A brief description of the invoice.
boolean
Defines who handles the email notification. Possible values:
  • true (default): Razorpay sends the notification to the customer.
  • false: You send the notification to the customer.
integer
Timestamp, in Unix format, at which the invoice will expire.
array
Details of the line item that is billed in the invoice. Maximum of 50 line items.
object
Any custom notes added to the invoice, as key-value pairs. Maximum of 2048 characters.
boolean
Indicates whether the customer can make a partial payment on the invoice. Possible values:
  • true: The customer can make partial payments.
  • false (default): The customer cannot make partial payments.
string
A unique receipt number that you can provide for the invoice, for your internal reference.
boolean
Defines who handles the SMS notification. Possible values:
  • true (default): Razorpay sends the notification to the customer.
  • false: You send the notification to the customer.
string
Any terms to be included in the invoice. Maximum of 2048 characters.

Response Parameters

integer
Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is 300, pass the value as 30000.
integer
The remaining amount to be paid by the customer for the issued invoice.
amount_due is 0 on a paid subscription invoice, even when amount_paid is less than amount because an offer settled it for less.
integer
Amount paid by the customer against the invoice.
integer
The end date of the billing period.
integer
The start date of the billing period.
integer
Timestamp, in Unix format, at which the invoice was cancelled.
string
Any comments to be added in the invoice. Maximum of 2048 characters.
integer
Timestamp, in Unix format, at which the invoice was created.
string
The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed currency as a sub-parameter in the line_item object, you must ensure that the same currency is passed in both places. Know about the list of supported international currencies.
string
For example, ₹.
object
Details of the customer.
string
The unique identifier of the customer. You can create customer_id using the Customers API. Alternatively, you can pass the customer object described in the below fields.
integer
Timestamp, in Unix format, that indicates the issue date of the invoice.
string
A brief description of the invoice. The maximum character length is 2048.
string
The delivery status of the email notification for the invoice sent to the customer. Possible values:
string
Indicates the type of entity. Here, it is invoice.
integer
Timestamp, in Unix format, at which the invoice will expire.
integer
Timestamp, in Unix format, at which the invoice expired.
integer
The gross amount for this invoice, in the smallest currency unit (paise for INR). For example, 50000.
string
The unique identifier of the invoice.
string
A unique key used to ensure idempotency of the invoice creation request, preventing duplicate invoices.
string
Unique number you added for internal reference. The minimum character length is 1 and maximum is 40.
integer
Timestamp, in Unix format, at which the invoice was issued to the customer.
array
Details of the line item that is billed in the invoice. Maximum of 50 line items.
object
Any custom notes added to the invoice, as key-value pairs. Maximum of 2048 characters.
string
The unique identifier of the order associated with the invoice.
integer
Timestamp, in Unix format, at which the payment was made.
boolean
Indicates whether the customer can make a partial payment on the invoice. Possible values:
  • true: The customer can make partial payments.
  • false (default): The customer cannot make partial payments.
string
Unique identifier of a payment made against this invoice.
string
A unique receipt number that you can provide for the invoice, for your internal reference.
string
A unique reference number for the invoice, used for internal tracking and reconciliation.
string
The short URL that is generated. Share this link with customers to accept payments.
string
The delivery status of the SMS notification for the invoice sent to the customer. Possible values:
string
The status of the invoice. Know more about Invoice States. Possible values:
string
The unique identifier of the subscription. Present only on invoices generated for a subscription.
string
Any terms to be included in the invoice. Maximum of 2048 characters.
string
Here, it should be invoice.
boolean
Indicates whether the invoice response is shown in a compact view.

Errors

Code: 400The API key or secret are not entered or an invalid API key is used.Solution: Use and enter the correct API details while executing the API.
Code: 400The mentioned parameters are not required for updating an invoice. The API echoes the rejected field name in the response.Solution: Pass only the required parameters in the Update Invoice API.
Code: 400Only name is entered without item id or amount.Solution: Provide either the item id or the amount with the name.
Code: 400Possible reasons:
  • Only the amount field is entered without a name or item id.
  • The amount, name or item id are not entered.
Solution: Provide the name field of the item when passing the amount.
Code: 400The invoice already has one or more line_items. Razorpay derives the invoice amount from the line items, so a top-level amount cannot be updated independently.Solution: Update the corresponding line_items[].amount instead, or remove the line items before changing the invoice amount.
Code: 400Another invoice of your account already uses this receipt (or invoice_number, which is stored as the receipt). The API echoes the value.Solution: Pass a receipt or invoice_number not used by any other invoice.
Code: 400On an invoice whose product_type is not subscription, a line item has a type other than invoice, for example plan or addon. The API names the first rejected line item by its index, for example line_items[1].type, in both the message and field.Field: line_items[<n>].typeSolution: Send type as invoice on the line items, or omit it.
Code: BAD_REQUEST_ERROR
Code: BAD_REQUEST_ERROR
Code: BAD_REQUEST_ERRORThe request body is larger than 1 MiB. The request is rejected before the body is read.Solution: Send a smaller body. An invoice with the maximum number of line items is far below the limit.
Code: SERVER_ERROR
Last modified on December 4, 2026