Webhooks
Manage your notification webhooks.
Introduction
The Unzer API uses webhook events to trigger notifications.
For the full list of webhook events supported by the Unzer API, go to Supported webhook events.
Manage your webhooks
The webhooks
endpoint of the Unzer API allows you to:
- Retrieve all of your webhooks
- Retrieve a specific webhook
- Update a webhook
- Delete a webhook
- Delete all of your webhooks
To access customer data, you need to use your private key.
Retrieve all webhooks
To retrieve all of your existing webhooks, make a webhooks
GET call with no webhook ID, like this:
GET https://api.unzer.com/v1/webhooks
{
"events": [
{
"id": "s-whk-1",
"url": "https://www.yourApiUrl.de/notification",
"event": "all"
},
{
"id": "s-whk-2",
"url": "https://www.yourApiUrl.de/notification",
"event": "authorize"
},
{
"id": "s-whk-3",
"url": "https://www.yourApiUrl.de/notification",
"event": "charge"
},
{
"id": "s-whk-4",
"url": "https://www.yourApiUrl.de/notification",
"event": "types"
}
]
}
Retrieve a specific webhook
To retrieve an existing webhook, make a webhooks
GET call with the webhook’s ID in the URL, for example:
GET https://api.unzer.com/v1/webhooks/s-whk-1
{
"id": "s-whk-1"
"url": "https://www.yourApiUrl.de/notifications",
"event": "all"
}
Update a webhook
To update the URL for an existing webhook, make a webhooks
PUT call, with the webhook’s ID in the URL, and your new URL in the request body, for example:
PUT https://api.unzer.com/v1/webhooks/s-whk-1
{
"url": "https://www.yourApiUrl.de/notification?event=all"
}
{
"id": "s-whk-1",
"event": "all",
"url": "https://www.yourApiUrl.de/notification?event=all"
}
Delete a webhook
To delete an existing webhook, make a webhooks
DELETE call, with the webhook’s ID in the URL, for example:
DELETE https://api.unzer.com/v1/webhooks/s-whk-1
{
"id": "s-whk-1"
}
Delete all webhooks
To delete all of your existing webhooks, make a webhooks
DELETE call with no webhook ID, like this:
DELETE https://api.unzer.com/v1/webhooks
{
"events": [
{
"id": "s-whk-1"
},
{
"id": "s-whk-2"
},
{
"id": "s-whk-3"
},
{
"id": "s-whk-4"
}
]
}