{"id":4498,"date":"2020-08-26T15:26:05","date_gmt":"2020-08-26T09:56:05","guid":{"rendered":"https:\/\/razorpay.com\/blog\/?p=4498"},"modified":"2024-06-25T11:29:23","modified_gmt":"2024-06-25T05:59:23","slug":"how-to-use-razorpay-webhooks","status":"publish","type":"post","link":"https:\/\/razorpay.com\/blog\/how-to-use-razorpay-webhooks\/","title":{"rendered":"Razorpay Payments Webhooks Just Got a Major Upgrade"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Have you ever wondered how different applications contact within themselves? Or how they pass<\/span><span style=\"font-weight: 400;\"> on information on success or failure of a transaction to keep their users updated or perform an automated action?<\/span> <span style=\"font-weight: 400;\">Well, there&#8217;s this awesome thing called <\/span><i><span style=\"font-weight: 400;\">webhooks<\/span><\/i><span style=\"font-weight: 400;\"> that enables applications to contact each other.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[bctt tweet=&#8221;A webhook is a feature that allows an application to deliver data to other applications as and when an event happens.&#8221; username=&#8221;&#8221;] <\/span><\/p>\n<p><span style=\"font-weight: 400;\">These events are often asynchronous (happening at a later time). Webhooks are super-efficient as they avoid you to log in to a portal to check for updates or polling an API every few minutes. Once set-up, they run automatically to deliver updates that are important to you to perform an action on your end.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At Razorpay, we offer webhooks that allow businesses to build or set up integrations that subscribe to certain events.<\/span><b><i>\u00a0<\/i><\/b><\/p>\n<p><span style=\"font-weight: 400;\">Read more about Razorpay webhooks <a href=\"https:\/\/razorpay.com\/docs\/webhooks\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Use cases of Razorpay webhooks<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Before we dive deep and talk about the updates, let&#8217;s quickly understand the major use cases of Razorpay webhooks.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Capturing delayed authorized payments<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You can use <a href=\"https:\/\/razorpay.com\/docs\/api\/x\/webhooks\/\">Razorpay webhooks<\/a> to get notified about payments that get <\/span><i><span style=\"font-weight: 400;\">authorized<\/span><\/i><span style=\"font-weight: 400;\"> and analyze this data to decide whether or not to capture the payment.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Update of the refund status<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Razorpay webhooks can help you communicate with your internal teams and customers with ease by notifying them at each step of a refund process.\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Subscription plan updates to the customer\u00a0<\/span><\/h3>\n<p>[bctt tweet=&#8221;With Razorpay webhooks, you can get automated updates when a new subscription is created, an existing subscription is charged or even when a subscription is cancelled by your customers.&#8221; username=&#8221;&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">We offer webhooks that can address many more use cases on your end. Check out our <\/span><a href=\"https:\/\/razorpay.com\/docs\/webhooks\/webhook-payloads\/\"><span style=\"font-weight: 400;\">documentation<\/span><\/a><span style=\"font-weight: 400;\"> to explore.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Based on our customers&#8217; feedback, we have made a few major improvements to our webhook set-up interface. Read this blog to know about these updates in detail.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Latest updates in Razorpay webhooks<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Now that you understand webhooks in general and got a snapshot about Razorpay&#8217;s webhooks, let&#8217;s talk about the latest updates!\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Multiple webhooks\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You can now set-up a maximum of five webhook URLs in Razorpay&#8217;s <a href=\"https:\/\/dashboard.razorpay.com\/signin\">payments dashboard<\/a>. This feature will help you if you want to receive different events on different callback URLs.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, you might want to receive webhooks for your payments on your user-facing application while webhooks related to Route or Smart collect on an internal-facing application.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This feature will solve this problem while you use multiple products by Razorpay.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4515 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/Webhook-01.png\" alt=\"Razorpay webhooks \" width=\"1600\" height=\"393\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhook-01.png 1600w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhook-01-300x74.png 300w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhook-01-1024x252.png 1024w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhook-01-768x189.png 768w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhook-01-1536x377.png 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Custom alert email\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">In the earlier version of Razorpay webhooks, all the webhook updates used to be sent to a registered email ID (the one used to create an account on Razorpay). We noticed that the developers usually do not have access to the registered email ID and hence, often they miss out on some critical webhook notifications. Multiple stakeholders communicated with us the need to change and add the receipts email ID.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To make the entire process simpler for the team, we are now enabling you to add a custom email address that belongs to the particular team for a specific webhook. With the update, you can now specify an email address on which you would like to receive webhook notifications.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4517 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/Webhooks-02.png\" alt=\"Razorpay webhooks updates\" width=\"474\" height=\"512\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-02.png 474w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-02-278x300.png 278w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Delete a webhook\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">There are times when you don&#8217;t want to receive webhook events on specific URLs. Until our latest update, permanently deleting a webhook was not possible. However, now you can choose to either temporarily disable it or delete it permanently.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4518 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/Webhooks-Razorpay.png\" alt=\"Razorpay webhooks\" width=\"512\" height=\"168\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-Razorpay.png 512w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-Razorpay-300x98.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4519 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/Webhooks.png\" alt=\"razorpay updates\" width=\"346\" height=\"290\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks.png 716w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-300x251.png 300w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Webhooks-554x466.png 554w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/p>\n<p><b><i>Pro-tip:<\/i><\/b><span style=\"font-weight: 400;\"> Be super careful while deleting any webhook. This action is irreversible.\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Other usability enhancements of Razorpay webhooks<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Along with the three major updates, there are some minor enhancements:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Earlier, there was no way to find out if a <\/span><i><span style=\"font-weight: 400;\">secret<\/span><\/i><span style=\"font-weight: 400;\"> was provided during a webhook set-up. However, now you can find this out under <\/span><i><span style=\"font-weight: 400;\">&#8216;webhook details&#8217;<\/span><\/i><span style=\"font-weight: 400;\">. This feature will avoid signature validation errors, that usually occur during integration<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4520 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/Razorpay-product-updates.png\" alt=\"webhooks by razorpay\" width=\"1600\" height=\"542\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Razorpay-product-updates.png 1600w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Razorpay-product-updates-300x102.png 300w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Razorpay-product-updates-1024x347.png 1024w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Razorpay-product-updates-768x260.png 768w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/Razorpay-product-updates-1536x520.png 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4521 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/updated-webhooks.png\" alt=\"what is webhook\" width=\"451\" height=\"483\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/updated-webhooks.png 1306w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/updated-webhooks-280x300.png 280w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/updated-webhooks-955x1024.png 955w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/updated-webhooks-768x823.png 768w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">With our updated UI, you can select multiple events at a time. The events are not categorised depending on the entity<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4522 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/webhook-definition.png\" alt=\"what is webhook\" width=\"478\" height=\"512\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/webhook-definition.png 478w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/webhook-definition-280x300.png 280w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Lastly, you can now identify when was the last time a webhook was updated, either manually by your users. You can also find out if the webhook was auto-disabled by our system due to multiple failures<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4523 aligncenter\" src=\"https:\/\/razorpay.com\/blog-content\/uploads\/2020\/08\/delete-webhook.png\" alt=\"razorpay webhooks\" width=\"1600\" height=\"254\" srcset=\"https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/delete-webhook.png 1600w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/delete-webhook-300x48.png 300w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/delete-webhook-1024x163.png 1024w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/delete-webhook-768x122.png 768w, https:\/\/blog.razorpay.in\/wp-content\/uploads\/2020\/08\/delete-webhook-1536x244.png 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p><span style=\"font-weight: 400;\"><strong>Please note:<\/strong> When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional, but recommended. The secret should never be exposed publicly<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For now, this is it. But this is not all!\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the coming months, we have some interesting features lined up around webhook delivery status and metrics. Our teams are working to simplify and enhance our offering so that you can focus on your business efficiently while we tackle payments for you!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you have some feedback on our recent UI or would like us to build any other features, feel free to reach out to us here.<\/span><i><span style=\"font-weight: 400;\">\u00a0<\/span><\/i><\/p>\n<p><!-- [if lte IE 8]>\n<script charset=\"utf-8\" type=\"text\/javascript\" src=\"\/\/js.hsforms.net\/forms\/v2-legacy.js\"><\/script>\n<![endif]--><br \/>\n<script charset=\"utf-8\" type=\"text\/javascript\" src=\"\/\/js.hsforms.net\/forms\/v2.js\"><\/script><br \/>\n<script>\n  hbspt.forms.create({\n\tportalId: \"5558946\",\n\tformId: \"6b863d2d-57cb-4a42-b29b-7b314e8e9905\"\n});\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Razorpay webhooks allow businesses to build or set up integrations that subscribe to certain events.\u00a0Read about our latest updates and use cases here. <\/p>\n","protected":false},"author":38,"featured_media":16521,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[26],"tags":[82,51],"class_list":{"0":"post-4498","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-payments","8":"tag-engineering","9":"tag-payments"},"_links":{"self":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/4498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/comments?post=4498"}],"version-history":[{"count":1,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/4498\/revisions"}],"predecessor-version":[{"id":16522,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/4498\/revisions\/16522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/media\/16521"}],"wp:attachment":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/media?parent=4498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/categories?post=4498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/tags?post=4498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}