QR PH Webhooks
Delete Webhook
Permanently remove a webhook endpoint
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.Endpoint
Authentication
This endpoint requires HTTP Basic Authentication using your Secret Key.Request
Path Parameters
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:
123Headers
| Header | Value | Required |
|---|---|---|
Authorization | Basic {base64(secret_key:)} | Yes |
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
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
Status Code: Solutions:
404Cause: Webhook ID does not exist or was already deletedResponse Example:- Verify the webhook ID is correct
- Use Get Webhooks API to find valid webhook IDs
- Check if the webhook was already deleted
500 Internal Server Error
500 Internal Server Error
Status Code:
500Cause: Unexpected server errorSolution:- Retry the request
- If the issue persists, contact Modulus Labs support
Use Cases
Decommission Old Webhook
Decommission Old Webhook
Remove webhooks for decommissioned services or endpoints:
Clean Up Test Webhooks
Clean Up Test Webhooks
Remove webhooks created during development and testing:
Replace Webhook Configuration
Replace Webhook Configuration
Delete old webhook before creating a new one with the same URL:
Remove Duplicate Webhooks
Remove Duplicate Webhooks
Clean up accidentally created duplicate webhooks:
Switch Environments
Switch Environments
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
- Service permanently decommissioned
- Webhook created by mistake
- Cleaning up old configurations
Safety Checklist
Before deleting a webhook in production:Verify Webhook Details
- Confirm webhook ID is correct
- Verify webhook URL matches expectations
- Check webhook is not actively used
Assess Impact
- Determine which services use this webhook
- Check if any orders are pending webhook notifications
- Verify alternative webhooks exist (if needed)
Notify Stakeholders
- Alert team about webhook deletion
- Update documentation
- Inform monitoring systems
What Happens After Deletion?
Immediate Effects
Immediate Effects
- 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
Pending Notifications
Pending Notifications
- Webhooks scheduled for retry may still be delivered
- New transactions will not trigger notifications
- In-flight webhook deliveries may complete
Recovery
Recovery
If you deleted a webhook by mistake:
- Create a new webhook with the same URL
- Note: New webhook will have a different ID
- Update any stored references to use the new ID
- Test the new webhook with Simulate API
Troubleshooting
404 Error When Deleting
404 Error When Deleting
Symptom: Receive 404 when trying to delete webhookPossible Causes:
- Webhook was already deleted
- Wrong webhook ID
- Using wrong secret key (different merchant account)
- Call Get Webhooks API to verify webhook exists
- Check webhook ID is correct
- Verify you’re using the correct secret key
Deleted Webhook Still Receiving Notifications
Deleted Webhook Still Receiving Notifications
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)
- Wait for pending retries to complete (max 45 minutes)
- Check if another webhook is using the same URL
- Verify deletion succeeded by listing webhooks
Cannot Delete Last Webhook
Cannot Delete Last Webhook
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
| Action | Permanent | Reversible | Preserves Config | Use Case |
|---|---|---|---|---|
| Delete | Yes | No | No | Permanently remove unused webhook |
| Disable | No | Yes | Yes | Temporarily pause notifications |
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