Create a new instance of Webhook object
{
"url":"https://requestb.in/10ujt3c1",
"event_types":[
{
"name":"PAYMENT.AUTHORIZATION.CREATED"
},
{
"name":"PAYMENT.AUTHORIZATION.VOIDED"
}
]
}
Fill up the basic information that is required for the webhook The URL should be actually accessible over the internet. Having a localhost here would not work.
any warnings your browser might show you. Also, please note that this is entirely for demo purposes, and you should not be using this in production
Event types correspond to what kind of notifications you want to receive on the given URL.
For Sample Purposes Only.
Print Success Result
Create Webhook Sample
This sample code demonstrate how you can create a webhook, as documented here at: https://developer.paypal.com/webapps/developer/docs/api/#create-a-webhook API used: POST /v1/notifications/webhooks