Request Errors

401 Code

The 401 error indicates that the API key you’re using is invalid.

In this case, we recommend the following: generate a new API key and repeat the registration process.

Additionally, make sure the key you generated belongs to the correct environment in which you’re running the plugin. If it was generated at https://asaas.com.br, the environment is production. If it was generated at https://sandbox.asaas.com, the environment is our test environment (Sandbox). You can switch environments in the “Environment” menu.

After completing this process, try simulating the creation of a new order to confirm whether the issue has been resolved.


403 Code

The 403 error indicates some type of API misuse or an attempt to use a feature not enabled on your account.
The most common cause in WooCommerce relates to IP restrictions. If you’re seeing error 403 in your request logs, check the country of origin of your server. Some countries are blocked on Asaas due to a higher risk of cyberattacks.

If this applies to you, consider changing the request origin to a permitted country (such as the United States or Brazil), or contact our integration success team for further assistance.


404 Code

This error usually occurs when the store is configured with more than one Asaas account, or when it was first used for testing in Sandbox before migrating to production.

Since WooCommerce internally links the external ID (Asaas) to the customer, when you switch Asaas accounts, you need to clear all saved metadata to avoid conflicts between customer IDs from different environments or accounts.

To fix this, access your application’s database and run the following query:

delete from wp_usermeta where meta_value like '%cus_000%';

This will remove old data and prevent new conflicts.

📘

The error will only occur when the same customer data is used for purchases across different environments, since the ID from the first purchase is already stored.


Other Errors

If you encounter other errors or have questions about the required settings, please contact us.