Updating Webhook Endpoints
This page walks you through updating an existing webhook endpoint on your PayMongo account. Whether you need to point your webhook to a new URL, add or remove the events you're listening to, or do both at the same time, this guide covers everything you need.
Business owners will find the Dashboard method straightforward — no code required. Developers will find the API method below, including request and response details.
When to update a webhook endpoint
You may need to update a webhook when:
- Your server URL changes (for example, after a migration or a domain rename).
- You want to receive notifications for additional payment events.
Updating a webhook does not interrupt your live integration — changes take effect immediately after a successful update.
Updating via the Dashboard
The PayMongo Dashboard lets you update a webhook endpoint without writing any code.
- Log in to your PayMongo Dashboard.
- Go to Developers → Webhooks.
- Find the webhook endpoint you want to update and click on it.
- Click Edit.
- Update the Webhook URL and/or the Events you want to subscribe to.
- Click Save Changes.
Your webhook will immediately reflect the new configuration. For more details on updating your webhook
Updating via API
Most of the time, the dashboard is all you need to manage your webhooks. But there are situations where updating through the API makes more sense — or is the only option available to you.
- You're automating your deployment process If your webhook URL changes depending on the environment (example, a different endpoint for staging versus production), you probably don't want someone manually updating it every time you deploy. The API lets you wire this into your pipeline so it just happens automatically.
- You're managing webhooks for multiple accounts The dashboard only covers your own account. If you're building a platform where you handle webhook configuration on behalf of merchants or connected accounts, the API is the only way to do this without logging in and out of separate accounts.
- The person making the change doesn't have dashboard access Not everyone who needs to update a webhook has — or should have — dashboard admin access. If a developer has API credentials but not a dashboard role, the API gives them a path to get the job done without escalating permissions.
- You're restoring or syncing an environment If you're rebuilding a staging environment or restoring from a backup, re-registering webhooks through the API can be part of the automated restore flow rather than a separate manual task.
To update a webhook endpoint via an API call, you must send a PUT request to https://api.paymongo.com/v1/webhooks/{webhook_id}. The request must contain at least one of the following attributes:
Type | Attribute | Description |
|---|---|---|
String |
|
|
String[] |
|
|
curl -X POST https://api.paymongo.com/v1/webhooks/<webhook_id> \
-H "Authorization: Basic <base64_encoded_secret_key>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"attributes": {
"url": "https://yoursite.com/webhooks/paymongo",
"events": ["payment.paid", "payment.failed"]
}
}
}'To learn more on events and what they send you, refer to the Events section.
Updated about 3 hours ago