API Test Keys

Delete an Item

DELETE
/v1/items/:id

Click to copy

Use this endpoint to delete an item.

Is this page helpful?

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X DELETE https://api.razorpay.com/v1/items/item_7Oy8OMV6BdEAac \

Success

Failure

1
[]
Path Parameters
id

*

string

The unique identifier of the item that must be deleted.

Errors

The API <key/secret> provided is invalid.

Error Status: 4xx

The API key or secret are not entered or an invalid API key is used.

Solution

The id provided does not exist.

Error Status: 400

The invoice id entered is either invalid or does not belong to the requester account.

Solution

Delete operation not allowed for item of type: {type}.

Error Status: 400

The item id passed belongs to a non-invoice item type (for example, payment_page). Only items of type invoice can be deleted through this endpoint.

Solution

Cannot delete an item with which invoices have been created already.

Error Status: 400

The item has already been associated with one or more invoices. Razorpay does not allow deleting items that have a history of use, to preserve invoice integrity.

Solution

Delete an Item

DELETE
/v1/items/:id

Click to copy

Use this endpoint to delete an item.

Is this page helpful?

Path Parameters
id

*

string

The unique identifier of the item that must be deleted.

Errors

The API <key/secret> provided is invalid.

Error Status: 4xx

The API key or secret are not entered or an invalid API key is used.

Solution

The id provided does not exist.

Error Status: 400

The invoice id entered is either invalid or does not belong to the requester account.

Solution

Delete operation not allowed for item of type: {type}.

Error Status: 400

The item id passed belongs to a non-invoice item type (for example, payment_page). Only items of type invoice can be deleted through this endpoint.

Solution

Cannot delete an item with which invoices have been created already.

Error Status: 400

The item has already been associated with one or more invoices. Razorpay does not allow deleting items that have a history of use, to preserve invoice integrity.

Solution

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X DELETE https://api.razorpay.com/v1/items/item_7Oy8OMV6BdEAac \

Success

Failure

1
[]