Skip to main content
DELETE

Overview

The Delete Webhook endpoint permanently removes a registered webhook. After deletion, you’ll stop receiving notifications for transactions. This action cannot be undone.
Permanent Action: Deleting a webhook is irreversible. Consider disabling the webhook instead if you might need it again later.

Endpoint

Authentication

This endpoint requires HTTP Basic Authentication using your Secret Key.

Request

Path Parameters

integer
required
The unique identifier of the webhook to delete. You can get this ID from the Get Webhooks API or from the response when you created the webhook.Example: 123

Headers

Request Body

This endpoint does not require a request body.

Response

Success Response

Status Code: 204 No Content Returns an empty response body. The webhook has been successfully deleted.
Success: A 204 status code means the webhook was deleted. You’ll no longer receive notifications at that URL.

Error Responses

Status Code: 401Cause: Invalid or missing authentication credentialsResponse Example:
Solution:
  • Verify your secret key is correct
  • Ensure Authorization header format: Basic {base64(secret_key:)}
  • Check you’re using the right environment (sandbox vs production)
Status Code: 404Cause: Webhook ID does not exist or was already deletedResponse Example:
Solutions:
  • Verify the webhook ID is correct
  • Use Get Webhooks API to find valid webhook IDs
  • Check if the webhook was already deleted
Status Code: 500Cause: Unexpected server errorSolution:
  • Retry the request
  • If the issue persists, contact Modulus Labs support

Use Cases

Remove webhooks for decommissioned services or endpoints:
Remove webhooks created during development and testing:
Delete old webhook before creating a new one with the same URL:
Clean up accidentally created duplicate webhooks:
Remove sandbox webhooks when migrating to production:

Best Practices

Disable Before Deleting

Disable webhook first, monitor for issues, then delete:

Verify Before Deleting

Confirm webhook details before deletion:

Log Deletions

Track webhook deletions for audit purposes:

Consider Alternatives

Ask yourself: Should I disable instead of delete?Disable if:
  • You might need the webhook again
  • Temporarily troubleshooting
  • Server maintenance
Delete if:
  • Service permanently decommissioned
  • Webhook created by mistake
  • Cleaning up old configurations

Safety Checklist

Before deleting a webhook in production:
1

Verify Webhook Details

  • Confirm webhook ID is correct
  • Verify webhook URL matches expectations
  • Check webhook is not actively used
2

Assess Impact

  • Determine which services use this webhook
  • Check if any orders are pending webhook notifications
  • Verify alternative webhooks exist (if needed)
3

Notify Stakeholders

  • Alert team about webhook deletion
  • Update documentation
  • Inform monitoring systems
4

Create Backup

  • Save webhook configuration
  • Document actions and status
  • Store for future reference
5

Execute Deletion

  • Disable webhook first
  • Monitor for 24-48 hours
  • Delete if no issues detected
6

Verify Deletion

  • Confirm webhook no longer appears in list
  • Check for any error logs or alerts
  • Update internal documentation

What Happens After Deletion?

  • Webhook is immediately removed from your account
  • No more notifications will be sent to that URL
  • Webhook ID becomes invalid and cannot be reused
  • Cannot be undone - must create a new webhook if needed
  • Webhooks scheduled for retry may still be delivered
  • New transactions will not trigger notifications
  • In-flight webhook deliveries may complete
If you deleted a webhook by mistake:
  1. Create a new webhook with the same URL
  2. Note: New webhook will have a different ID
  3. Update any stored references to use the new ID
  4. Test the new webhook with Simulate API

Troubleshooting

Symptom: Receive 404 when trying to delete webhookPossible Causes:
  • Webhook was already deleted
  • Wrong webhook ID
  • Using wrong secret key (different merchant account)
Solutions:
  • Call Get Webhooks API to verify webhook exists
  • Check webhook ID is correct
  • Verify you’re using the correct secret key
Symptom: Webhook URL still receives POST requests after deletionPossible Causes:
  • Retries for transactions that occurred before deletion
  • Different webhook with same URL
  • Caching or replication delay (rare)
Solutions:
  • Wait for pending retries to complete (max 45 minutes)
  • Check if another webhook is using the same URL
  • Verify deletion succeeded by listing webhooks
Symptom: Want to delete all webhooks but concerned about losing notificationsConsideration: Webhooks are REQUIRED for QR Ph integration. Deleting all webhooks means you won’t receive transaction notifications.Solutions:
  • Ensure you have at least one active webhook
  • Create a new webhook before deleting the last one
  • Consider disabling instead of deleting

Comparison: Delete vs Disable

Recommendation: Use Update Webhook to disable webhooks during maintenance instead of deleting them. This preserves your configuration and makes it easy to resume.

Next Steps

Create Webhook

Register a new webhook to replace the deleted one

Update Webhook

Disable webhook instead of deleting

Get Webhooks

View remaining registered webhooks

Webhooks Overview

Learn about the Webhook API

Authorizations

Authorization
string
header
required

HTTP Basic Authentication using your Secret Key as the username and an empty password

Path Parameters

id
string
required

The unique identifier of the webhook

Response

Webhook deleted successfully

message
string

Confirmation message