{"id":146,"date":"2015-01-19T06:38:33","date_gmt":"2015-01-19T01:08:33","guid":{"rendered":"http:\/\/blog.payumoney.com\/?p=146"},"modified":"2022-05-25T09:38:48","modified_gmt":"2022-05-25T04:08:48","slug":"introducing-payumoney-webhooks-get-callbacks-to-your-server","status":"publish","type":"post","link":"https:\/\/payu.in\/blog\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/","title":{"rendered":"Introducing PayU Webhooks &#8211; Get Callbacks To Your Server"},"content":{"rendered":"<p>We have been receiving requests from many of our merchants to provide a way to update their systems whenever a payment happen. We listened to the feedback and have launched webhook feature for the same.<\/p>\n<p><strong>What is a webhook?<\/strong><br \/>\nWebhook is a HTTP callback. The callback is done to a url specified while creating a webhook.<br \/>\nThe webhook callbacks are event driven i.e. a callback to a webhook will be done whenever the event associated with the webhook occurs.<\/p>\n<p><strong>Example \u2013 <\/strong><br \/>\nSuccessful Payment Webhook \u2013 The event associated with this webhook is Successful Payment. So whenever a successful payment happens, a callback to the webhook URL will be done.<a href=\"https:\/\/payu.in\/digital-payments?var=business-online&amp;utm_source=Blog&amp;utm_medium=Organic&amp;utm_campaign=Online%20Business\"><br \/>\n<\/a><\/p>\n<figure class=\"wp-block-image\"><\/figure>\n<p><strong>How does the PayU webhook work?<\/strong><br \/>\nPayU will be sending the callback messages as HTTP POST requests to the URL specified.<br \/>\nCurrently, we are providing 2 types of webhook events \u2013<\/p>\n<ol>\n<li>When a payment is successful<\/li>\n<li>When a payment is failed<\/li>\n<\/ol>\n<p>So whenever a payment is successful\/fails for your merchant account, you can receive a callback to your server. In the callback message, all the payment details are shared, so you can update your server and process the order as per your business processes.<\/p>\n<p>The callback request format can be viewed here &#8211; <a title=\"PayUMoney Webhook Format\" href=\"https:\/\/github.com\/payumoney-india\/Webhooks\/raw\/master\/Transaction_POST_Format.pdf\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p><b>How do I create a webhook?<\/b><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11125 size-large\" src=\"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-1024x410.jpg\" alt=\"how to create a PayU webhook\" width=\"1024\" height=\"410\" srcset=\"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-1024x410.jpg 1024w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-300x120.jpg 300w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-768x308.jpg 768w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>To create a webhook, you will need to create a URL at your server which will be able to receive the callback message that will be sent.<\/li>\n<li>Once you have created the url, you can go to your PayU merchant account -&gt; Settings -&gt; My Account -&gt;Webhook<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-150\" src=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-1-1024x324.jpg\" alt=\"webhook-1\" width=\"710\" height=\"224\" \/><\/a><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Click on Create New Webhook button<\/li>\n<li>Select the event type for which you want webhook to be added<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-151\" src=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-2-1024x515.jpg\" alt=\"webhook-2\" width=\"710\" height=\"357\" srcset=\"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2-1024x515.jpg 1024w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2-300x151.jpg 300w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2-768x386.jpg 768w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2-310x155.jpg 310w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2-685x344.jpg 685w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-2.jpg 1113w\" sizes=\"(max-width: 710px) 100vw, 710px\" \/><\/a><\/p>\n<ol>\n<li>Enter webhook URL (that you have created in 1). Note that you can\u2019t create a webhook with a url that is not working (receiving callback request)<\/li>\n<li>Optionally, You can also provide a static authorization header &amp; key so that your server identified that the callback message is sent from PayU server<\/li>\n<li>Submit<\/li>\n<\/ol>\n<p>Upon submission, PayU server will send a dummy callback message to confirm whether the url provided is able to receive POST requests or not.<\/p>\n<p>If your URL isn\u2019t accepting the dummy request sent, then you will be allowed to create that webhook.<\/p>\n<p>If your url is able to receive the request and provides a http response code 200 OK, then the webhook will be successfully created.<br \/>\n<a href=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-152\" src=\"https:\/\/blog.payumoney.com\/wp-content\/uploads\/2015\/01\/webhook-3-1024x507.jpg\" alt=\"webhook-3\" width=\"710\" height=\"351\" srcset=\"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3-1024x507.jpg 1024w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3-300x149.jpg 300w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3-768x381.jpg 768w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3-310x153.jpg 310w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3-685x339.jpg 685w, https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/webhook-3.jpg 1108w\" sizes=\"(max-width: 710px) 100vw, 710px\" \/><\/a><\/p>\n<p>Once your webhook is created then from the next time whenever the webhook event will occur, a callback to your webhook url will be sent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have been receiving requests from many of our merchants to provide a way to update their systems whenever a payment happen. We listened to the feedback and have launched&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[583],"tags":[637,654,646,1209,640],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Know All About PayU Webhooks Here!<\/title>\n<meta name=\"description\" content=\"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/payu.in\/blog\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Know All About PayU Webhooks Here!\" \/>\n<meta property=\"og:description\" content=\"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/payu.in\/blog\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/\" \/>\n<meta property=\"og:site_name\" content=\"PayU Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PayUind\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/aruntini\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-19T01:08:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-25T04:08:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-1024x410.jpg\" \/>\n<meta name=\"author\" content=\"Arun Agrawal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Arun_2014\" \/>\n<meta name=\"twitter:site\" content=\"@payuind\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arun Agrawal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/\",\"url\":\"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/\",\"name\":\"Know All About PayU Webhooks Here!\",\"isPartOf\":{\"@id\":\"https:\/\/payu.in\/blog\/#website\"},\"datePublished\":\"2015-01-19T01:08:33+00:00\",\"dateModified\":\"2022-05-25T04:08:48+00:00\",\"author\":{\"@id\":\"https:\/\/payu.in\/blog\/#\/schema\/person\/732e27b2813be1bb61d4919d6fc30af3\"},\"description\":\"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!\",\"breadcrumb\":{\"@id\":\"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/payu.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product &amp; Features\",\"item\":\"https:\/\/payu.in\/blog\/category\/products-features\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Introducing PayU Webhooks &#8211; Get Callbacks To Your Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/payu.in\/blog\/#website\",\"url\":\"https:\/\/payu.in\/blog\/\",\"name\":\"PayU Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/payu.in\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/payu.in\/blog\/#\/schema\/person\/732e27b2813be1bb61d4919d6fc30af3\",\"name\":\"Arun Agrawal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/payu.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/46d4ded4d9835ceecc58fb5ae22ea164?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/46d4ded4d9835ceecc58fb5ae22ea164?s=96&d=mm&r=g\",\"caption\":\"Arun Agrawal\"},\"sameAs\":[\"https:\/\/www.facebook.com\/aruntini\",\"https:\/\/www.linkedin.com\/in\/arun-agarwal-687aa745\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/Arun_2014\"],\"url\":\"https:\/\/payu.in\/blog\/author\/arun\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Know All About PayU Webhooks Here!","description":"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/payu.in\/blog\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/","og_locale":"en_US","og_type":"article","og_title":"Know All About PayU Webhooks Here!","og_description":"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!","og_url":"https:\/\/payu.in\/blog\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/","og_site_name":"PayU Blog","article_publisher":"https:\/\/www.facebook.com\/PayUind\/","article_author":"https:\/\/www.facebook.com\/aruntini","article_published_time":"2015-01-19T01:08:33+00:00","article_modified_time":"2022-05-25T04:08:48+00:00","og_image":[{"url":"https:\/\/payu.in\/blog\/wp-content\/uploads\/2015\/01\/how-to-create-a-PayU-webhook-1024x410.jpg"}],"author":"Arun Agrawal","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Arun_2014","twitter_site":"@payuind","twitter_misc":{"Written by":"Arun Agrawal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/","url":"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/","name":"Know All About PayU Webhooks Here!","isPartOf":{"@id":"https:\/\/payu.in\/blog\/#website"},"datePublished":"2015-01-19T01:08:33+00:00","dateModified":"2022-05-25T04:08:48+00:00","author":{"@id":"https:\/\/payu.in\/blog\/#\/schema\/person\/732e27b2813be1bb61d4919d6fc30af3"},"description":"Webhook is a HTTP callback. The callback is done to a url specified while creating a webhook. Know more about webhooks here!","breadcrumb":{"@id":"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/10.10.164.133\/introducing-payumoney-webhooks-get-callbacks-to-your-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/payu.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Product &amp; Features","item":"https:\/\/payu.in\/blog\/category\/products-features\/"},{"@type":"ListItem","position":3,"name":"Introducing PayU Webhooks &#8211; Get Callbacks To Your Server"}]},{"@type":"WebSite","@id":"https:\/\/payu.in\/blog\/#website","url":"https:\/\/payu.in\/blog\/","name":"PayU Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/payu.in\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/payu.in\/blog\/#\/schema\/person\/732e27b2813be1bb61d4919d6fc30af3","name":"Arun Agrawal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/payu.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/46d4ded4d9835ceecc58fb5ae22ea164?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46d4ded4d9835ceecc58fb5ae22ea164?s=96&d=mm&r=g","caption":"Arun Agrawal"},"sameAs":["https:\/\/www.facebook.com\/aruntini","https:\/\/www.linkedin.com\/in\/arun-agarwal-687aa745\/","https:\/\/twitter.com\/https:\/\/twitter.com\/Arun_2014"],"url":"https:\/\/payu.in\/blog\/author\/arun\/"}]}},"_links":{"self":[{"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/posts\/146"}],"collection":[{"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":12,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":11126,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions\/11126"}],"wp:attachment":[{"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/payu.in\/blog\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}