Callbacks

Last modified:

After the order has been placed in WooCommerce and with the payment provider, there are a number of HTTP requests back and forth to keep WooCommerce and the payment provider in sync. It’s important that these requests can be executed without being blocked; otherwise the customer will not be able to create an order in WooCommerce.

Requirements for getting callbacks to work


Be aware of firewalls and security plugins

Even if you fulfill all of the requirements mentioned above, you might still experience issues. If you have a firewall solution or a security plugin installed, those could block access to the WC-API endpoints and thereby cause the callbacks to fail. If you are using Cloudflare CDN and their Web Application Firewall (WAF), or another WAF/CDN service like Sucuri or a similar server hosting firewall, you need to create a specific Page Rule to whitelist the API calls that are needed for the plugin to work properly.

We recommend whitelisting (if possible):

https://domain.topdomain/wc-api/*

Specify what URLs to whitelist

If you want to specify what URLs to whitelist, please visit the article for your plugin:

Avarda Checkout for WooCommerce

Kustom Checkout for WooCommerce

Nexi Checkout

Qliro for WooCommerce

Troubleshooting callbacks and HTTP status codes

Before reaching out to us, check the following when dealing with callbacks and HTTP status codes from your payment service provider (PSP).

Check the PSP callback and HTTP status code

Look at the callback requests sent from the PSP to your store, and take note of the HTTP status codes they receive. Based on the response code, here’s what you need to consider:

2xx / 3xx Responses – Looks OK, but still having issues?

If the callback returns a 2xx or 3xx status code but the order is still not updating correctly, here are some important things to know:

  • A 200 OK response doesn’t always mean everything worked. In some cases, servers or firewalls are configured to return a 200 status on all requests – even failed ones.
  • Try comparing one callback that worked with one that didn’t. This can help narrow down where the issue lies.

What Krokedil will do:

  • We’ll check the WooCommerce logs to see if any callbacks were registered at all.
  • If no callbacks are logged, the issue is likely related to the server or site blocking the requests – not the plugin.
    In this case, you’ll need to contact your hosting provider or developer. We can’t resolve this on our end.
  • If we do see callbacks in the logs, we’ll continue troubleshooting from our side.

4xx Responses – Request rejected

A 4xx response does not necessarily mean that a firewall blocked the callback. For example, 400 can indicate invalid callback data, 401 an authentication failure, 403 an access restriction, and 404 an incorrect URL or missing endpoint.

What the merchant needs to do:

  • Check the exact status code, response body and site logs to identify the cause, and verify the callback URL and authentication requirements.
  • If a security plugin, hosting firewall or CDN/WAF is blocking the request, allow your plugin’s complete callback URL or use an appropriate URL pattern such as https://yourdomain.com/wc-api/*, following your firewall’s matching syntax.
  • Contact your web developer or hosting provider for configuration issues, or Krokedil if the logs indicate a plugin-related error.

5xx Responses – Server error or plugin crash

A 5xx error usually indicates a server-side issue. It could be caused by:

  • Server configuration problems
  • A fatal error in plugin or theme code

Next steps:

  • Contact your hosting provider or developer to investigate.
  • If you suspect a plugin-related error, contact us at Krokedil. We’ll need:
    • WooCommerce logs.
    • The fatal error log from the day the issue occurred.

You can find information on how to obtain the logs, as well as other support-related information, in the How to prepare a support ticket article.