Callbacks/Webhooks
After the order has been placed in WooCommerce and with Nexi, there are a number of http requests back and forth to keep WooCommerce and Nexi 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.
For an example scenario that shows why callbacks are important for the plugin to work properly, see Ensure the correct update of the payment status.
This article specifically addresses measures regarding Nexi. For a general overview of what you might need to do to prevent callback issues, please see this Krokedil general support info: Callbacks article.
Be aware of firewalls and security plugins
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 Nexi plugin to work properly.
We recommend (if possible) to whitelist:
https://domain.topdomain/wc-api/*
We also recommend that you whitelist Nexi IP range (if possible). You can find the IPs here:
https://developer.nexigroup.com/nexi-checkout/en-EU/api/#webhooks
Verifying callbacks/webhooks
In the Nexi logs that is being created, if logging is activated in the plugin settings, you can search for this phrase:
Payment created webhook listener hit
If this entry does not appear in the log, the Nexi callbacks are most likely not reaching your site.
Check if plugin logging works
If you do not see the Payment created webhook listener hit, we recommend verifying that the plugin’s logging function is working correctly.
You can test this manually by opening the following URL in a new browser tab:https://domain.topdomain/wc-api/DIBS_Api_Callbacks/?dibs-payment-created-callback=1
Make sure you replace domain.topdomain with your actual domain.
After doing this, you should see a log entry in your Nexi WooCommerce logs that looks like this: Payment created webhook listener hit
If no such entry appears, there may be an issue with the Nexi plugin logging functionality. In that case, please contact us for further assistance.