Delete a Webhook
Delete a Webhook resource by ID.
Deleting webhooks
As of this writing, you can delete webhooks via API. In future releases, we will allow you to delete a webhook via Dashboard.
Endpoint
DELETE /webhooks/:id
Deleting Webhooks
If you delete a Webhook resource that is still receiving events, the events after deleting the Webhook resource will not be sent anymore.
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --request DELETE --location 'https://api.payrexhq.com/webhooks/<ID of a webhook resource>' \
-u replace_with_secret_api_key
const client = require('payrex-node')('insert your PayRex Secret API key.');
const webhook = await client.webhooks.delete('<ID of a webhook resource>');
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$webhook = $client->webhooks->delete('<ID of a webhook resource>');
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
webhook = client.webhooks.delete('<ID of a webhook resource>')
client = Payrex::Client.new("insert your PayRex Secret API key.")
webhook = client.webhook.delete("<ID of a webhook resource>")
Returns
Returns the deleted resource.