Chilkat Online Tools

Foxpro / Razorpay APIs / Delete an Invoice

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loResp

* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.

loHttp = CreateObject('Chilkat_9_5_0.Http')

loHttp.BasicAuth = 1
loHttp.Login = "username"
loHttp.Password = "password"

loResp = loHttp.QuickRequest("DELETE","https://api.razorpay.com/v1/invoices/{inv_id}")
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    CANCEL
ENDIF

? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp

RELEASE loHttp

Curl Command

curl -X DELETE
	-u 'username:password'
https://api.razorpay.com/v1/invoices/{inv_id}

Postman Collection Item JSON

{
  "name": "Delete an Invoice",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.razorpay.com/v1/invoices/{inv_id}",
      "protocol": "https",
      "host": [
        "api",
        "razorpay",
        "com"
      ],
      "path": [
        "v1",
        "invoices",
        "{inv_id}"
      ]
    },
    "description": "Delete an invoice using this API.\n\nKnow more about the <a href=\"https://razorpay.com/docs/api/invoices/#delete-an-invoice\" target=\"_blank\">Delete an Invoice API</a>."
  },
  "response": [
  ]
}