Error 404 (Not Found)
What does it mean?
A 404 Not Found error in the Webhook logs indicates that the request sent by Asaas successfully reached the configured domain, but the path (endpoint) could not be found by the server.
In other words, the URL configured to receive events no longer exists, has changed, or is incorrect.
Example:
https://myapi.com/webhookIf the application was changed to use:
https://myapi.com/api/webhookthe old address will return HTTP 404 and events will stop being processed.
When does this error occur?
The most common causes are:
- a typo in the configured URL;
- changing the application's endpoint without updating Asaas;
- removal of the route responsible for receiving webhooks;
- domain changes;
- switching between environments (production or staging);
- publishing the application under a different path;
- proxy or gateway rules redirecting requests incorrectly.
Impact on the integration
As long as the endpoint keeps returning HTTP 404:
- events will not be processed;
- Asaas will continue retrying according to the queue penalty policy;
- after 15 consecutive failures, the queue will be interrupted;
- new events will continue to be generated and accumulated;
- events that remain unprocessed for more than 14 days will be permanently deleted.
For this reason, the issue should be fixed as soon as possible.
How to fix it
1. Validate the configured URL
Verify that the URL configured in the webhook exactly matches the endpoint exposed by your application.
Example:
Incorrect URL
https://myapi.com/webhookCorrect URL
https://myapi.com/api/webhookCheck:
- protocol (
https); - domain;
- port number;
- route path;
- uppercase and lowercase characters;
- unnecessary trailing slashes (
/).
2. Test the endpoint manually
Open the URL in a browser or use tools such as Postman or cURL.
Example:
curl -X POST https://myapi.com/api/webhookIf the response is:
404 Not Foundthe issue is in the application itself and not on the Asaas side.
3. Verify that the route still exists
After deploying a new version of the application, the route may have changed.
Example:
Before:
POST /webhookAfter:
POST /api/webhookIn this case, simply update the webhook URL configured in Asaas.
4. Validate that the endpoint accepts POST requests
Asaas Webhooks are sent using HTTP POST requests.
Make sure that:
- the route exists;
- it accepts the POST method;
- there are no rules redirecting the request to another address.
ImportantAsaas considers a webhook successfully delivered only when it receives an HTTP 200 response.
Common scenario example
Suppose the application originally exposed the endpoint:
https://api.mycompany.com/webhookAfter an update, it changed to:
https://api.mycompany.com/api/webhookSince the webhook configuration in Asaas was not updated, all attempts started returning HTTP 404.
Result:
Asaas
↓
POST /webhook
↓
404 Not Found
↓
Automatic retries
↓
Queue interruptedSolution:
- update the webhook URL;
- reactivate the queue;
- allow accumulated events to be resent.
Best practices
- keep webhook URLs stable;
- avoid changing production endpoints without updating Asaas;
- monitor server logs;
- use separate environments for staging and production;
- test the route after new deployments;
- implement endpoint monitoring.
How to verify that it worked
After fixing the issue:
- Update the webhook URL if necessary.
- Reactivate the interrupted queue.
- Generate a new event.
- Check the Webhook logs.
If everything is working properly:
- events will start being processed again;
- the queue will gradually drain;
- logs will no longer show HTTP 404 errors.
Next steps
If you continue experiencing issues, we recommend consulting:
- Webhook Logs;
- Paused queue;
- How to reactivate an interrupted queue;
- How to implement idempotency in Webhooks;
- Error 400;
- Error 403 (Forbidden);
- Error 404 (Not Found);
- Error 408 - Read Timed Out;
- Error 500 (Internal Server Error);
- Connect Timed Out Error;
- Other errors.
