Fetch All Webhooks
GET/v2/accounts/:account_id/webhooksClick to copy
Use this endpoint to retrieve all webhooks for a given account. Know about the
for this API.Is this page helpful?
1curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \2- X GET https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks \
Success
1{2"entity": "collection",3"count": 1,4"items": [5{6"id": "HK890egfiItP3H",7"created_at": 1624060358,8"updated_at": 1624060358,9"service": "beta-api-test",10"owner_id": "H3kYHQ635sBwXG",11"owner_type": "merchant",12"context": [],13"disabled_at": 0,14"url": "https://en1mwkqo5ioct.x.pipedream.net",15"alert_email": "gaurav.kumar@example.com",16"secret_exists": true,17"entity": "webhook",18"active": true,19"events": [20"payment.authorized",21"payment.failed",22"payment.captured",23"payment.dispute.created",24"refund.failed",25"refund.created"26]27}28]29}
Path Parameters
account_id *
string The unique identifier of a sub-merchant account generated by Razorpay for which a webhook is created. For example, acc_H3kYHQ635sBwXG.
Query Parameters
from integerTimestamp, in seconds, from when the webhooks are to be fetched.
to integerTimestamp, in seconds, till when the webhooks are to be fetched.
count integer Number of webhooks to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with skip.
skip integer Number of records to be skipped while fetching the webhooks. This can be used for pagination, in combination with count.
Response Parameters
idstring The unique identifier of the created webhook. For example, HK890egfiItP3H. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters.
created_atintegerThe Unix timestamp at which the webhook has been created.
updated_atintegerThe Unix timestamp at which the webhook has been updated.
owner_idstring The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be account_id passed in the API URL.
owner_typestringIndicates the type of owner. For example, in this case, it will be the merchant.
urlstringThe URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters.
secretstringA secret for the webhook endpoint used to validate that the webhook is from Razorpay.
alert_emailstringThis is the email address to which notifications must be sent in case of webhook failure.
secret_existsboolean This attribute is set to true if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code.
entitystringIndicates the type of entity. For example, in this case, it will be webhook.
activestringIndicates the status of webhook.
true: Webhook is activated.false: Webhook is deactivated.
eventsobject The required events from the list of Active Events. For example, payment.authorized, payment.captured, payment.failed, payment.dispute.created, refund.failed, refund.created and so on.
Fetch All Webhooks
GET/v2/accounts/:account_id/webhooksClick to copy
Use this endpoint to retrieve all webhooks for a given account. Know about the
for this API.Is this page helpful?
Path Parameters
account_id *
string The unique identifier of a sub-merchant account generated by Razorpay for which a webhook is created. For example, acc_H3kYHQ635sBwXG.
Query Parameters
from integerTimestamp, in seconds, from when the webhooks are to be fetched.
to integerTimestamp, in seconds, till when the webhooks are to be fetched.
count integer Number of webhooks to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with skip.
skip integer Number of records to be skipped while fetching the webhooks. This can be used for pagination, in combination with count.
Response Parameters
idstring The unique identifier of the created webhook. For example, HK890egfiItP3H. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters.
created_atintegerThe Unix timestamp at which the webhook has been created.
updated_atintegerThe Unix timestamp at which the webhook has been updated.
owner_idstring The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be account_id passed in the API URL.
owner_typestringIndicates the type of owner. For example, in this case, it will be the merchant.
urlstringThe URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters.
secretstringA secret for the webhook endpoint used to validate that the webhook is from Razorpay.
alert_emailstringThis is the email address to which notifications must be sent in case of webhook failure.
secret_existsboolean This attribute is set to true if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code.
entitystringIndicates the type of entity. For example, in this case, it will be webhook.
activestringIndicates the status of webhook.
true: Webhook is activated.false: Webhook is deactivated.
eventsobject The required events from the list of Active Events. For example, payment.authorized, payment.captured, payment.failed, payment.dispute.created, refund.failed, refund.created and so on.
1curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \2- X GET https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks \
Success
1{2"entity": "collection",3"count": 1,4"items": [5{6"id": "HK890egfiItP3H",7"created_at": 1624060358,8"updated_at": 1624060358,9"service": "beta-api-test",10"owner_id": "H3kYHQ635sBwXG",11"owner_type": "merchant",12"context": [],13"disabled_at": 0,14"url": "https://en1mwkqo5ioct.x.pipedream.net",15"alert_email": "gaurav.kumar@example.com",16"secret_exists": true,17"entity": "webhook",18"active": true,19"events": [20"payment.authorized",21"payment.failed",22"payment.captured",23"payment.dispute.created",24"refund.failed",25"refund.created"26]27}28]29}