Webhook

Use the Webhook APIs to receive event notifications or subscribe to events happening in a sub-merchant's account as per their integration.


Use the Webhooks APIs to receive event notifications or subscribe to events happening in a sub-merchant's account for the integration installed.

Know more about

and check the for Sub-Merchant Onboarding Events.

Explore the Webhook API collection in the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your

.

API EndpointDescription
Creates a webhook.
Retrieves the details of a webhook.
Retrieves the details of all webhooks.
Updates a webhook.
Deletes a webhook.

The Webhook entity consists of the following fields.

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.


Was this page helpful?