Skip to main content

Disable a Webhook

Disable a Webhook resource by ID.

Disabling webhooks

As of this writing, you can disable webhooks via API. In future releases, we will allow you to disable a webhook via Dashboard.


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

const client = require('payrex-node')('insert your PayRex Secret API key.');

const webhook = await client.webhooks.disable('<ID of a webhook resource>');

Returns

Returns a Webhook resource.