{
"url":"https://requestb.in/slmm49sl",
"event":"unconfirmed-tx",
"hash":"2b17f5589528f97436b5d...8980aa20c300abdc538f2a8bfa871b",
}
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.
The transaction or block associated with the event you subscribed to will be POSTed to the provided URL. The POST request will also include a X-EventType and a X-EventId HTTP header specifying the type of and id of the webhook which triggered the request. X-Eventtype: unconfirmed-tx X-Eventid: f1cef7d6-cfd9-459c-8ebc-42226ae2b1a7
Event types correspond to what kind of notifications you want to receive on the given URL. Complete event list.
Create WebHook
This sample code demonstrate how you can create a webhook, as documented here at: Using Webhooks
API used: POST /v1/btc/main/hooks