Fetch a Webhook With ID
GET
/v2/accounts/:account_id/webhooks/:webhook_id
Click to copy
Use this endpoint to retrieve and view the details of a webhook. 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/HK890egfiItP3H \
Success
1{2"id": "HK890egfiItP3H",3"created_at": 1623060358,4"updated_at": 1623060358,5"owner_id": "H3kYHQ635sBwXG",6"owner_type": "merchant",7"context": [],8"disabled_at": 0,9"url": "https://en1mwkqo5ioct.x.pipedream.net",10"alert_email": "gaurav.kumar@example.com",11"secret_exists": true,12"entity": "webhook",13"active": true,14"events": [15"payment.authorized",16"payment.failed",17"payment.captured",18"payment.dispute.created",19"refund.failed",20"refund.created"21]22}
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
.
webhook_id
*
string
The unique identifier of the webhook whose details are to be retrieved. For example, HK890egfiItP3H
.
Response Parameters
id
string
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_at
integer
The Unix timestamp at which the webhook has been created.
updated_at
integer
The Unix timestamp at which the webhook has been updated.
owner_id
string
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_type
string
Indicates the type of owner. For example, in this case, it will be the merchant.
url
string
The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters.
secret
string
A secret for the webhook endpoint used to validate that the webhook is from Razorpay.
alert_email
string
This is the email address to which notifications must be sent in case of webhook failure.
secret_exists
boolean
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.
entity
string
Indicates the type of entity. For example, in this case, it will be webhook.
active
string
Indicates the status of webhook.
true
: Webhook is activated.false
: Webhook is deactivated.
events
object
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 a Webhook With ID
GET
/v2/accounts/:account_id/webhooks/:webhook_id
Click to copy
Use this endpoint to retrieve and view the details of a webhook. 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
.
webhook_id
*
string
The unique identifier of the webhook whose details are to be retrieved. For example, HK890egfiItP3H
.
Response Parameters
id
string
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_at
integer
The Unix timestamp at which the webhook has been created.
updated_at
integer
The Unix timestamp at which the webhook has been updated.
owner_id
string
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_type
string
Indicates the type of owner. For example, in this case, it will be the merchant.
url
string
The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters.
secret
string
A secret for the webhook endpoint used to validate that the webhook is from Razorpay.
alert_email
string
This is the email address to which notifications must be sent in case of webhook failure.
secret_exists
boolean
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.
entity
string
Indicates the type of entity. For example, in this case, it will be webhook.
active
string
Indicates the status of webhook.
true
: Webhook is activated.false
: Webhook is deactivated.
events
object
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/HK890egfiItP3H \
Success
1{2"id": "HK890egfiItP3H",3"created_at": 1623060358,4"updated_at": 1623060358,5"owner_id": "H3kYHQ635sBwXG",6"owner_type": "merchant",7"context": [],8"disabled_at": 0,9"url": "https://en1mwkqo5ioct.x.pipedream.net",10"alert_email": "gaurav.kumar@example.com",11"secret_exists": true,12"entity": "webhook",13"active": true,14"events": [15"payment.authorized",16"payment.failed",17"payment.captured",18"payment.dispute.created",19"refund.failed",20"refund.created"21]22}