API Test keys

API Test keys

Delete an Invoice

DELETE
/v1/invoices/:id

Click to copy

Use this endpoint to delete invoices. You can only delete an invoice that is in the draft state.

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/invoices/inv_DAuFuwWYU3R9tg \

Success

Failure

1
[]
Path Parameters
id

*

string

The unique identifier of the invoice.

Errors

Operation not allowed for Invoice in cancelled status.

Error Status: 400

You are trying to delete an invoice that is not in the Draft status.

Solution

Delete an Invoice

DELETE
/v1/invoices/:id

Click to copy

Use this endpoint to delete invoices. You can only delete an invoice that is in the draft state.

Is this page helpful?

Path Parameters
id

*

string

The unique identifier of the invoice.

Errors

Operation not allowed for Invoice in cancelled status.

Error Status: 400

You are trying to delete an invoice that is not in the Draft status.

Solution

Curl

change language

change language

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

Success

Failure

1
[]