Callbacks

Callbacks

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 


  • The website needs to have a publicly queryable URL (use a service like ngrok.com if you want to use the plugin in a local development environment).
  • The website needs to have https configured correctly (not only in checkout, but for the entire website).
  • Pretty permalinks must be enabled in your WordPress installation.
  • Multilingual plugins must not alter the URL structure for WooCommerce API Callbacks (e.g. change http://yoursite.com/wc-api/CALLBACK/ to http://yoursite.com/en/wc-api/CALLBACK/).

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 by that making the callbacks to fail. If you are using Cloudflare CDN and their WAF Firewall (or other WAF/CDN too like Sucuri or similar server hosting firewalls) you need to create a specific Page Rule to whitelist the API-calls that is needed for the plugin to work properly.

We recommend (if possible) to whitelist:

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:

Klarna Checkout for WooCommerce