{
  "opencollection": "1.0.0",
  "info": {
    "name": "Razorpay Bills Partner Webhooks API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "basic",
      "username": "{{username}}",
      "password": "{{password}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Partner Webhooks",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List webhooks for a sub-merchant",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.razorpay.com/v1/v2/accounts/:account_id/webhooks",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the linked merchant account (e.g. `acc_00000000000001`)."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve all webhooks configured for a sub-merchant account. Authentication: OAuth access_token."
        },
        {
          "info": {
            "name": "Create a webhook for a sub-merchant",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.razorpay.com/v1/v2/accounts/:account_id/webhooks",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the linked merchant account (e.g. `acc_00000000000001`)."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Create a webhook to receive events for a sub-merchant account. Maximum 30 webhooks per account. Authentication: OAuth access_token."
        },
        {
          "info": {
            "name": "Fetch a webhook by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.razorpay.com/v1/v2/accounts/:account_id/webhooks/:webhook_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the linked merchant account (e.g. `acc_00000000000001`)."
              },
              {
                "name": "webhook_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the webhook (e.g. `we_00000000000001`)."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve details of a specific webhook for a sub-merchant account. Authentication: OAuth access_token."
        },
        {
          "info": {
            "name": "Update a webhook",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.razorpay.com/v1/v2/accounts/:account_id/webhooks/:webhook_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the linked merchant account (e.g. `acc_00000000000001`)."
              },
              {
                "name": "webhook_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the webhook (e.g. `we_00000000000001`)."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Update webhook URL, events, secret, or active status for a sub-merchant account. Authentication: OAuth access_token."
        },
        {
          "info": {
            "name": "Delete a webhook",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.razorpay.com/v1/v2/accounts/:account_id/webhooks/:webhook_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the linked merchant account (e.g. `acc_00000000000001`)."
              },
              {
                "name": "webhook_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the webhook (e.g. `we_00000000000001`)."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Delete a webhook for a sub-merchant account. Returns empty array on success. Authentication: OAuth access_token."
        }
      ]
    }
  ],
  "bundled": true
}