Chilkat Online Tools

unicodeCpp / Razorpay APIs / Close a Virtual Account

Back to Collection Items

#include <CkHttpW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    http.put_BasicAuth(true);
    http.put_Login(L"username");
    http.put_Password(L"password");

    CkHttpResponseW *resp = http.QuickRequest(L"POST",L"https://api.razorpay.com/v1/virtual_accounts/{va_id}/close");
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"%d\n",resp->get_StatusCode());
    wprintf(L"%s\n",resp->bodyStr());
    delete resp;
    }

Curl Command

curl -X POST
	-u 'username:password'
https://api.razorpay.com/v1/virtual_accounts/{va_id}/close

Postman Collection Item JSON

{
  "name": "Close a Virtual Account",
  "request": {
    "method": "POST",
    "header": [
    ],
    "url": {
      "raw": "https://api.razorpay.com/v1/virtual_accounts/{va_id}/close",
      "protocol": "https",
      "host": [
        "api",
        "razorpay",
        "com"
      ],
      "path": [
        "v1",
        "virtual_accounts",
        "{va_id}",
        "close"
      ]
    },
    "description": "Use this <a href=\"https://razorpay.com/docs/api/smart-collect-tpv/#close-a-virtual-account\" target=\"_blank\">API</a> to close a virtual account."
  },
  "response": [
  ]
}