Set Webhook API

This api can be used by merchant to set webhook urls at our end

Merchant can set webhooks using merchant dashboard too. Please visit payu site for the same. If you wish to set webhook url using apis, please continue reading this page.

Request Header Params

Key

Description

Data type

Mandatory

possible Values

Authorization

Access token generated earlier.

String

Yes

Bearer {access_token}

payoutMerchantId

This is the merchant id provided while onboarding to payouts

String

Yes

Pro Tip: payoutMerchantId is different from payuMoneyMerchant Id, please use the correct one for seamless experience

Request Params

Key

Description

Data type

Mandatory

Possible Values

webhook

Set the webhooks for different type of events. Like deposit, transfer success or failure. If default webhook url is set for any merchant and any specific webhook is missing, Event will get pushed to default url.

String

yes

default deposit transfer_success transfer_failed transfer_reversed low_balance request_processing_failed smart_send_detail_submitted

values.url

This is the post url of the api where the merchant will listen to payu events.

In other words, this is the webhook url.

String

Yes

values.authorization

Merchant can provide this value which will be sent in the header while pushing the payouts event to the merchant.

Using this merchant can authenticate that request is coming from payu.

String

No

Do not forget to whitelist payu for a server call to your webhook(api)

Webhook api you create should be a POST api(do not use GET)

Example

Content-Type : application/json

Method : Post

Sample Request :

[
  {
    "webhook" :"transfer_success",
     "values": {
                  "url":"https://test.com/webhook/payment",
                  "authorization":"asjafya56%^eyy63547ysrt4"
               }
   }
]

Response :

{
 "status": 0,
 "msg": "Webhook saved successfully",
 "code": null,
 "data": null
 }

Last updated