Skip to main content
The invoices endpoints let you create Razorpay invoices, fetch individual invoices, list historical invoices, edit draft invoices, issue them, cancel them, delete them, and send notifications.

Create invoice

POST /api/auth/razorpay/invoice/create Creates a new Razorpay invoice. You must provide at least one line item. Server API name: createInvoice
Client method: authClient.razorpay.invoice.create(...)
string
default:"invoice"
Invoice type. One of invoice or link.
string
Description of the invoice.
integer
Unix timestamp for the invoice date.
string
Razorpay customer id. Required if customer is not provided.
string
default:"INR"
ISO 4217 currency code.
object
Customer details when creating an invoice without an existing customer id.
string
Razorpay order id to link to the invoice.
array
required
Array of line items. At least one item is required.
integer
Unix timestamp when the invoice expires.
boolean
Whether to send SMS notifications.
boolean
Whether to send email notifications.
boolean
Whether partial payments are allowed.
object
Up to 15 key-value pairs for internal metadata.
string
Internal receipt identifier.
integer
Total invoice amount in subunits. Optional when line items are provided.
Errors: INVOICE_CREATE_FAILED.

Get invoice

GET /api/auth/razorpay/invoice/get Retrieves a single Razorpay invoice by id. Server API name: fetchInvoice
Client method: authClient.razorpay.invoice.get({ query: { invoiceId } })
string
required
Razorpay invoice id.
Errors: INVOICE_NOT_FOUND, INVOICE_FETCH_FAILED.

List invoices

GET /api/auth/razorpay/invoice/list Lists Razorpay invoices with pagination and optional filters. Server API name: fetchAllInvoices
Client method: authClient.razorpay.invoice.list({ query: { ... } })
integer
Unix timestamp. Return invoices created after this time.
integer
Unix timestamp. Return invoices created before this time.
integer
Maximum number of invoices to return. Maximum value is 100.
integer
Number of invoices to skip.
string
Filter by invoice type (invoice or link).
string
Filter by Razorpay payment id.
string
Filter by receipt identifier.
string
Filter by Razorpay customer id.
string
Filter by Razorpay subscription id.
Errors: INVOICE_LIST_FAILED.

Edit invoice

POST /api/auth/razorpay/invoice/edit Updates a draft Razorpay invoice. Razorpay only allows editing invoices that have not yet been issued. Server API name: editInvoice
Client method: authClient.razorpay.invoice.edit(...)
string
required
Razorpay invoice id to update.
object
New notes object.
object
Updated customer details.
array
Updated line items array.
integer
New expiration timestamp.
boolean
Updated SMS notification setting.
boolean
Updated email notification setting.
boolean
Updated partial payment setting.
string
Updated receipt identifier.
Errors: INVOICE_EDIT_FAILED.

Issue invoice

POST /api/auth/razorpay/invoice/issue Issues a draft Razorpay invoice, making it active and sending it to the customer. Server API name: issueInvoice
Client method: authClient.razorpay.invoice.issue(...)
string
required
Razorpay invoice id to issue.
Errors: INVOICE_ISSUE_FAILED.

Delete invoice

POST /api/auth/razorpay/invoice/delete Deletes a draft Razorpay invoice. Server API name: deleteInvoice
Client method: authClient.razorpay.invoice.delete(...)
string
required
Razorpay invoice id to delete.
Errors: INVOICE_DELETE_FAILED.

Cancel invoice

POST /api/auth/razorpay/invoice/cancel Cancels an issued Razorpay invoice. Server API name: cancelInvoice
Client method: authClient.razorpay.invoice.cancel(...)
string
required
Razorpay invoice id to cancel.
Errors: INVOICE_CANCEL_FAILED.

Notify by invoice

POST /api/auth/razorpay/invoice/notify Sends a notification for an invoice via email or SMS. Server API name: notifyByInvoice
Client method: authClient.razorpay.invoice.notify(...)
string
required
Razorpay invoice id.
string
required
Notification medium. One of email or sms.
Errors: INVOICE_NOTIFY_FAILED.