API ReferenceIntegrationsKnowledge Base

Items

Items are products or services that you bill customers for by adding them to an invoice. You can create an item using APIs. When an item is created, it will appear on the list of items in the Dashboard.

Tip:
If your business requires you to create custom items, you can create pre-defined item templates beforehand and use these later as line items.

Postman Collection#

We have a Postman collection to make the integration quicker and easier. Click the Download Postman Collection button below to get started.

Instructions to use the Postman Collection#

  • All Razorpay APIs are authorized using Basic Authorization.
    • Generate API Keys from the Dashboard .
    • Add your API Keys in Postman. Selected the required API → Auth → Type = Basic Auth → Username = <Your_Key_ID>; Password = <Your_Key_secret>
  • Some APIs in the collection require data specific to your account such as item_id (Item ID) as a path parameter.
    • For example, the Fetch Item by ID API requires you to add the item_id as a path parameter.
    • Such parameters are enclosed in {} in the collection. For example, {item_id}.
    • The API throws an error if these values are incorrect or do not exist in your system.

Items Entity#

Following is a list of attributes of an item entity and their explanation:

id
string Unique identifier of the item.
name
string Name of the item.
description
string A text description about the item.
amount
integer The price of the item in the lowest unit of currency.
currency
string The currency in which the amount should be charged. Select from the list of currencies.
active
boolean Indicates the status of the item. Possible values:
  • true - Item is in active state.
  • false - Item is in inactive state. By default, the item is in active state.

Create an Item#

The following endpoint helps you create an item.

/items

Request Parameters#

name mandatory
string Name of the item.
description optional
string A brief description about the item.
amount mandatory
integer The price of the item in the lowest unit of currency.
currency mandatory
string The currency in which the amount should be charged. We support international currencies.

Once an item is created, it will appear on the list of created item and also in the drop-down menu at the time of invoice creation. You can also edit the details of a created item by going to the list of items and clicking on a specific item.

Fetch an Item#

The following endpoint helps you to fetch the details of a specific item using the Item_id.

/items/:id

Path Parameter#

id mandatory
string The unique identifier of the item whose details are to be fetched.

The response for getting an item id: item_7Oxp4hmm6T4SCn is shown:

Fetch Multiple Items#

The following endpoint helps to fetch the details of all the items created till date.

/items

Update an Item#

The following endpoint helps to update the details of an item.

/item/:id

Path Parameter#

id mandatory
string The unique identifer of the item whose details are to be updated.

Request Parameters#

name optional
string Name of the item.
description optional
string A brief description about the item.
amount optional
integer The price of the item in the lowest unit of currency.
currency optional
string The currency in which the amount should be charged. We support international currencies.
active optional
boolean Indicates the status of the item. Possible values:
  • true - Item is in active state.
  • false - Item is in inactive state. By default, the item is in active state.

The response for getting an item id: item_7Oy8OMV6BdEAac is shown:

Delete an Item#

The following endpoint helps you to delete an item.

/items/:id

Path Parameter#

id mandatory
string The unique identifier of the item that must be deleted.

The response for deleting an item id: item_7Oy8OMV6BdEAac is shown:

×