Update Webhook
Modify an existing webhook endpoint configuration
Overview
The Update Webhook endpoint allows you to modify an existing webhook’s URL, actions, or status. Use this to change where notifications are sent, adjust which events you receive, or temporarily disable a webhook during maintenance.Endpoint
Authentication
This endpoint requires HTTP Basic Authentication using your Secret Key.Request
Path Parameters
"a78efd32-de3b-4854-b599-11ae9f98f97e"Headers
| Header | Value | Required | Description |
|---|---|---|---|
Authorization | Basic {base64(secret_key:)} | Yes | HTTP Basic Auth with your secret key |
Content-Type | application/json | Yes | Request body format |
Prerequisites
Before updating a webhook, ensure you have:- Your Secret Key for HTTP Basic Authentication
- The webhook ID of the webhook you want to update
Body Parameters (Encrypted Payload)
Token field. See the Encryption Guide for details on creating JWE tokens.| Field | Type | Required | Description |
|---|---|---|---|
callbackUrl | string | No | New HTTPS URL where Modulus Labs sends webhook notifications |
webhookAction | string | No | Updated transaction events: QRPH_SUCCESS, QRPH_DECLINED |
webhookStatus | string | No | New status: ENABLED or DISABLED |
callbackUrl
callbackUrl
- Format: Valid HTTPS URL
- Example:
"https://api.yourcompany.com/webhooks/success"
webhookStatus
webhookStatus
ENABLED- Webhook receives notificationsDISABLED- Webhook stops receiving notifications (useful during maintenance)
"DISABLED"Example Payloads (Before Encryption)
Response
Success Response
Status Code:200 OK
Returns the updated webhook object with all current values.
"a78efd32-de3b-4854-b599-11ae9f98f97e""QRPH_SUCCESS""DISABLED""https://api.yourcompany.com/webhooks/success"Response Example
Error Responses
400 Bad Request
400 Bad Request
400Causes:- Invalid webhook URL format
- Empty actions array
- Invalid action values
- Invalid status value
- Ensure callbackUrl uses HTTPS protocol
- Include at least one valid action if updating actions
- Verify status is either
ENABLEDorDISABLED
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
404Cause: Webhook ID does not existResponse Example:- Verify the webhook ID is correct
- Use Get Webhooks API to find valid webhook IDs
- Check if the webhook was deleted
409 Conflict
409 Conflict
409Cause: New webhook URL already registered for this merchantResponse Example:- Use a different webhook URL, or
- Delete the existing webhook using that URL first
500 Internal Server Error
500 Internal Server Error
500Cause: Unexpected server errorSolution:- Retry the request
- If the issue persists, contact Modulus Labs support
Use Cases
Temporarily Disable During Maintenance
Temporarily Disable During Maintenance
Migrate to New Domain
Migrate to New Domain
Adjust Event Subscriptions
Adjust Event Subscriptions
Switch to Versioned Endpoint
Switch to Versioned Endpoint
Enable After Testing
Enable After Testing
Best Practices
Verify Before Updating
Test New URL First
Log All Changes
Graceful Status Changes
Partial Updates
You only need to include fields you want to change:Troubleshooting
404 Webhook Not Found
404 Webhook Not Found
- Wrong webhook ID
- Webhook was deleted
- Using wrong secret key (different merchant account)
- Call Get Webhooks API to find valid webhook IDs
- Verify you’re using the correct secret key
- Check if webhook was deleted
409 Conflict on URL Change
409 Conflict on URL Change
- Use a different URL
- Delete the other webhook using that URL first
- Keep the current URL
Changes Not Taking Effect
Changes Not Taking Effect
- Update request failed silently
- Caching issue
- Looking at wrong webhook
- Verify update succeeded by checking response
- Call Get Webhooks API to confirm changes
- Clear any application caches
Next Steps
Delete Webhook
Get Webhooks
Test Webhook
Webhooks Overview
Authorizations
HTTP Basic Authentication using your Secret Key as the username and an empty password
Path Parameters
The unique identifier of the webhook
Body
Response
Webhook updated successfully
Unique identifier for the webhook
List of transaction events this webhook receives
QRPH_SUCCESS, QRPH_DECLINED Current status of the webhook
ENABLED, DISABLED The HTTPS URL where notifications are sent