Summary

With webhook notifications, partners can subscribe to any of the events supported, through the dashboard. While subscribing for this event, an endpoint to where the notifications will be posted for the event is expected. The MIME type of the request (event) is application/json.

An example of a base Event looks lke this

{
    "id": 1,
    "createdOn":  "2012-04-23T18:25:43.511Z",
    "WebHookEventType": "BASE"
}

Claimed Event

A ClaimedEvent notification is fired off when a notification has been claimed. it contains details on the events including:

  • The voucher information,
  • The creator’s details.
  • The claimer’s details.

An example of a ClaimedEvent looks like this

{
    "id": 1,
    "createdOn":  "2012-04-23T18:25:43.511Z",
    "WebHookEventType": "CLAIMED",
    "voucher": {
        "id": 1,
        "dateClaimable": "2012-04-23T18:25:43.511Z",
        "amount": 25.50,
        "paymentDestType": "sample destination",
        "creator": {
            "firstName": "firstName",
            "lastName": "lastName",
            "photoUrl": "http://path/to/url"
        },
        "claimer": {
            "firstName": "firstName",
            "lastName": "lastName",
            "photoUrl": "http://path/to/url"
        }
    }
}

Notification Webhook Client

Partners can download the notification webhook client from VouchrApp/NotificationWebHookClient which currently takes a POST request with a ClaimedEvent as its payload. The client logs the information the event. This can be used as a template and be updated to suit partners needs.