Using Webhooks with Qualpay Plugin for WooCommerce

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.

To add webhooks to either your sandbox or production Qualpay account:

  1. 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.


2. Log into the Qualpay Manager, in either sandbox or production depending on the environment you are configuring. You will need to retrieve a unique secret key for use with either environment.  

3. Select AdministrationWebhook Configuration.


  1. Click the green “+” sign to add a new webhook.


  1. 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. 


  1. 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


  1. Click Done

  2. A popup with a New Webhook Secret key will appear. Copy the key by clicking on the copy icon. Click on Close.


  1. Go to your WooCommerce Qualpay settings page in the plugin settings page, and paste the key in the Webhook Secret field.


  1. Click Save Changes.


Testing Webhooks

Now that you have added webhooks to your Qualpay account, follow these steps to test the webhook event:

  1. Process an order from the web store.
  2. Log in to your sandbox or production Qualpay account (depending on which environment you are testing). 
  3. 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:

  1. Log in to your WordPress admin dashboard.
  2. From the WooCommerce Admin Dashboard, click Orders.


  1. 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.