Disable a Webhook
Disable a Webhook resource by ID.
info
You can manage a webhook either through API or our Dashboard. You can check this guide for learn more.
Endpoint
POST /webhooks/:id/disable
Disabling webhooks
If you disable a Webhook resource that is still receiving events, the events will not be sent anymore after you disable the Webhook resource. However, if you disable the Webhook resource and enable it before the next event is sent, your Webhook resource will continue receiving the events.
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --request POST --location 'https://api.payrexhq.com/webhooks/<ID of a webhook resource>/disable' \
-u replace_with_secret_api_key
const client = require('payrex-node')('insert your PayRex Secret API key.');
const webhook = await client.webhooks.disable('<ID of a webhook resource>');
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$webhook = $client->webhooks->disable('<ID of a webhook resource>');
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
webhook = client.webhooks.disable('<ID of a webhook resource>')
client = Payrex::Client.new("insert your PayRex Secret API key.")
webhook = client.webhook.disable("<ID of a webhook resource>")
Returns
Returns a Webhook resource.