Upgraded docs version is here ✨

Your documentation experience is getting an upgrade. Check it out now!

Go To Beta

Docs upgrade is here. Check it out!

Go To Beta
API ReferenceIntegrationsKnowledge Base

Items API

Items are products or services that you can add in Invoices and bill customers for. You can create an item using API.

API Gateway URL The API Gateway URL is https://api.razorpay.com/v1

Before executing these APIs, please read through the Pre-requisite and Generate API keys sections.

Generate API Keys🔗

  1. Log into your Dashboard with appropriate credentials.
  2. Select the mode (Test or Live) for which you want to generate the API key.
    • Test Mode: The test mode is a simulation mode that you can use to test your integration flow. Your customers will not be able to make payments in this mode.
    • Live Mode: When your integration is complete, switch to live mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers.
  3. Navigate to Settings → API Keys → Generate Key to generate key for the selected mode.

The Key Id and Key Secret appear on a pop-up page as shown below:

Test Mode API Keys

Live Mode API Keys

Watch Out!

  • After generating the keys from the Dashboard, download and save them securely. If you do not remember your API Keys, you need to re-generate them from the Dashboard and replace it wherever required.
  • Do not share your API Key secret with anyone or on any public platforms. This can pose security threats for your Razorpay account.
  • Once you generate the API Keys, only the Key Id is visible on the Dashboard and not the Key secret as it can pose security threats for your Razorpay account.

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 Postman Collection🔗

  • All Razorpay APIs are authenticated using Basic Authentication.

    • 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.

Create an Item🔗

Use this API endpoint to 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.

Response Parameters🔗

id
string The unique identifier of the item.
name
string Name of the item.
description
string A brief 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. We support international 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.

Fetch an Item🔗

Use this API endpoint retrieve to an item using its unique id.

/items/:id

Sample request and response to retrieve an item with id item_7Oxp4hmm6T4SCn is shown below:

Path Parameter🔗

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

Response Parameters🔗

id
string The unique identifier of the item.
name
string Name of the item.
description
string A brief 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. We support international 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.

Fetch Multiple Items🔗

Use this API endpoint to retrieve all the items created by you.

/items

Update an Item🔗

Use this API endpoint to modify the information of an existing item.

/items/:id

The request and response for updating an item with id item_7Oy8OMV6BdEAac is shown below:

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.

Response Parameters🔗

id
string The unique identifier of the item.
name
string Name of the item.
description
string A brief 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. We support international 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.

Delete an Item🔗

Use this API endpoint to delete an existing item.

Note:
You cannot delete an item with which invoices have been created already. However, you can make it inactive using the Update an Item API.

/items/:id

The request and response for deleting an item id: item_7Oy8OMV6BdEAac is shown below:

×