Use Qualpay’s webhooks to keep your WooCommerce orders up-to-date with the latest transaction statuses. You will need to retrieve your webhook secret from the Qualpay Manager and paste it into your WooCommerce plugin configuration page for the Qualpay plugin.
Go to the WooCommerce Plugins page, and click Settings under the Qualpay plugin. A unique webhook notification URL will be generated and displayed. Copy this URL for use in step five.
3. Select Administration → Webhook Configuration.
Click the green “+” sign to add a new webhook.
Add a Webhook Label of your choosing. Paste the Notification URL copied from the admin control panel into the Notification URL field. Add an email address that is to receive notification from Qualpay if an issue sending notifications to the provided Notification URL arises. Add the Authentication Type to secure the webhook POST request to your server. To do so, set the authentication type to HTTP Basic Authentication. If you do not want to secure the webhook POST request, select None from the drop-down.
Click Create Webhook.
Now, you can subscribe to specific webhooks events. Make sure you enable the following webhook events:
- Transaction_status_updated, this webhook will keep the order status up-to-date with information on settled transactions from Qualpay.
- Qp_manager_void_success, If you void a transaction in Qualpay Manager, your WooCommerce order status will change to Void.
- Qp_manager_refund_success, If you refund a transaction in Qualpay Manager, your WooCommerce order status will change to Refunded or Partial Refund.
- Qp_manager_capture_success, If you capture a transaction in Qualpay Manager, your WooCommerce order status will change to Captured.
- If you are processing recurring payments, enable Subscription_payment_success webhook, this webhook indicates that the recurring charge to the cardholder was successful, your WooCommerce order status will change to Captured.
To enable the webhooks, click the toggle. Once enabled, the toggle option will show in green. If disabled, the toggle will show in white.
A popup with a New Webhook Secret key will appear. Copy the key by clicking on the copy icon. Click on Close.
Go to your WooCommerce Qualpay settings page in the plugin settings page, and paste the key in the Webhook Secret field.
Click Save Changes.
Now that you have added webhooks to your Qualpay account, follow these steps to test the webhook event:
- Process an order from the web store.
- Log in to your sandbox or production Qualpay account (depending on which environment you are testing).
- Click Transactions. Locate the processed transaction. Issue a Void, Refund, or Capture this transaction by clicking on the Transaction Detail, then the Actions section on the right
Once the transaction is voided, refunded or captured, verify that the order status has been updated in WooCommerce:
- Log in to your WordPress admin dashboard.
- From the WooCommerce Admin Dashboard, click Orders.
Locate the updated order in the Qualpay Manager. Compare and verify that the status has been updated on the WooCommerce Orders page.
Note: Once any transaction is voided, refunded or captured from the Qualpay Manager it may take 5 minutes for the order status to be updated in WooCommerce.
Click here for information on reconciling WooCommerce Orders and Qualpay transactions.