Skip to main content
Items are reusable catalog entries that you can reference in invoice line items and subscription add-ons. Add-ons are extra charges attached to a subscription. This page covers creating items, using them in invoices and subscriptions, managing add-ons, and the available React hooks.

Create an item

Items represent products or services in your catalog. You can create them with tax fields and reuse them across invoices and subscriptions.
client.ts
string
required
The display name of the item.
integer
required
The price in the smallest currency unit (paise for INR).
string
required
Three-letter currency code, for example "INR".
string
A longer description of the item.
boolean
Whether the item is active and available for use.
boolean
Whether the amount already includes tax.
string
Harmonized System of Nomenclature code for tax classification.
string
Services Accounting Code for tax classification.
number
The tax rate percentage to apply.
string
A Razorpay tax ID to apply.
string
A Razorpay tax group ID to apply.

Edit, list, and delete items

Manage your catalog after items are created.
client.ts
integer
Filter by active status: 1 for active, 0 for inactive.
integer
Number of results to fetch, up to 100.
integer
Number of results to skip.

Use items in invoice line items

When creating an invoice, reference an existing item by its ID instead of defining the line item inline.
client.ts

Use items in subscription add-ons

Attach add-ons to a subscription by referencing item IDs in the lineItems field during an upgrade, or by creating an add-on directly on an existing subscription.

Add line items during upgrade

client.ts

Create an add-on on an existing subscription

client.ts
You can also create an inline item when adding an add-on:
client.ts

Manage add-ons

List and delete add-ons that are attached to subscriptions.
client.ts

React hooks

The React entry point provides hooks for items and add-ons.

List items

item-list.tsx

Create and delete items

item-actions.tsx

List add-ons

addon-list.tsx

Create and delete subscription add-ons

subscription-addon-actions.tsx

Error codes

The following error codes may be returned during item and add-on operations:
  • ITEM_CREATE_FAILED: the item could not be created.
  • ITEM_NOT_FOUND: the requested item does not exist.
  • ITEM_FETCH_FAILED: failed to fetch an item.
  • ITEM_LIST_FAILED: failed to list items.
  • ITEM_EDIT_FAILED: the item could not be updated.
  • ITEM_DELETE_FAILED: the item could not be deleted.
  • ADDON_CREATE_FAILED: the subscription add-on could not be created.
  • ADDON_NOT_FOUND: the requested add-on does not exist.
  • ADDON_FETCH_FAILED: failed to fetch an add-on.
  • ADDON_LIST_FAILED: failed to list add-ons.
  • ADDON_DELETE_FAILED: the add-on could not be deleted.

Next steps

  • Invoices — use items in invoice line items.
  • Subscriptions — attach add-ons to recurring plans.
  • Plans — define the billing plans that items and add-ons complement.