Skip to main content
POST
Available in🇮🇳 India🇲🇾 Malaysia
Use this endpoint to create an invoice by passing the customer_id.

Request Parameters

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.
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.
string
Invoice is created in draft state when value is set to 1.
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.
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
Indicates the type of entity. Here, it is invoice. Defaults to invoice when omitted.

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: 4xxThe 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: 400An invoice is issued without adding customer details.Solution: Ensure that the customer details are entered.
Code: 400There is a difference in currency entered between line_items and invoice currency.Solution: Ensure that the line_items currency matches that of the invoice.
Code: 400The expiry date is before or within 15 minutes of the current timeSolution: Ensure that the Expiry date is greater than the (current time + 15 minutes). For example, if the current time is 1 pm, the expiry date must be at least 1.15 pm.
Code: 400A mandatory field is empty.Solution: Ensure that you fill all the mandatory fields.
Code: 400The value passed for type is not one of the supported types. The API echoes the rejected value, for example Not a valid type: invoiceee.Solution: Use a supported type value, for example invoice, ecod or link.
Code: 400A line-item amount is below the per-currency minimum (100 paise / ₹1.00 for INR). Also returned for zero or negative line-item amounts.Solution: Pass each line_items[].amount greater than or equal to the per-currency minimum.
Code: 400A non-integer value (for example a decimal like 100.5 or a string like "abc") was passed for a line_items[].amount.Solution: Pass amount as an integer in currency subunits (paise for INR).
Code: 400A line-item quantity was passed as 0 or a negative value.Solution: Pass line_items[].quantity as a positive integer (1 or higher).
Code: 400The value passed for customer.email is not in a valid email format.Solution: Pass customer.email as a valid email address.
Code: 400The customer.contact value contains characters other than digits and the + symbol.Solution: Pass customer.contact using only digits and an optional leading + for the country code.
Code: 400The customer.contact value has fewer than 8 digits including the country code.Field: contactSolution: Pass customer.contact with the country code, for example +919876543210.
Code: 400The customer.contact value has more than 15 digits including the country code.Field: contactSolution: Pass customer.contact as at most 15 digits including the country code.
Code: 400The customer.name value does not match the allowed name format.Solution: Pass customer.name using letters, spaces and common punctuation.
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: 400More line_items were passed than an invoice can hold.Field: line_itemsSolution: Pass at most 20 line_items, or split the billing into multiple invoices.
Code: 400Your account requires a receipt on every invoice and none was passed.Field: receiptSolution: Pass a receipt (or invoice_number).
Code: 400The currency value is not a supported currency code. The API echoes the rejected value, for example The ZZZ is not a supported currency.Field: currencySolution: Use a supported ISO-4217 currency code.
Code: 400A non-boolean value was passed for partial_payment.Solution: Pass partial_payment as a boolean (true or false).
Code: 400The request body contains fields that are not part of the Invoices API schema.Solution: Only include documented fields. Remove any unknown keys from the request body.
Code: 400A line_items[].item_id passed in the request refers to an item that has been marked inactive.Solution: Activate the item via the Update Item API, or use a different active item.
Code: 400Your account has the customer fee bearer model enabled, which is not compatible with invoice creation.Solution: Contact Razorpay Curlec support to switch the fee-bearer configuration before creating invoices.
Code: 400The currency passed is different from your account’s default currency, but international payments are not enabled on your account.Solution: Enable international payments from your Razorpay Curlec Dashboard, or use your account’s default currency.
Code: 400The currency value is not a recognised ISO-4217 currency code or is outside the list supported by Razorpay Curlec.Solution: Use a supported ISO-4217 currency code.
Code: 400The total invoice amount (sum of line_items[].amount * quantity) exceeds the per-payment maximum configured for your account.Solution: Split the billing into multiple invoices, or contact Razorpay Curlec support to raise your per-payment limit.
Code: 400You have exceeded the daily rate limit for invoice creation. This per-day rate limit applies to test-mode accounts and unregistered live-mode accounts. In test mode the limit is 300 invoices/day; in live mode for unregistered businesses it is 10,000 invoices/day. Registered live-mode accounts are not subject to this limit.Solution: Wait until the next day for the limit to reset. If you need a higher limit, register your business on the Razorpay Curlec Dashboard or contact Razorpay Curlec support.
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: 429You have exceeded the daily rate limit for invoice creation. This per-day rate limit applies to test-mode accounts and unregistered live-mode accounts. In test mode the limit is 300 invoices/day; in live mode for unregistered businesses it is 10,000 invoices/day. Registered live-mode accounts are not subject to this limit.Solution: Wait until the next day for the limit to reset. If you need a higher limit, register your business on the Razorpay Curlec Dashboard or contact Razorpay Curlec support.
Code: SERVER_ERROR
Last modified on December 5, 2026