WooCommerce (Webservices API) Installation Guide


  This plugin requires WooCommerce to work. Please install WooCommerce before proceeding.

  WordPress Repository

  1. Navigate to Plugins > Add New Plugin.
  2. Use the search field and enter "Trust Payments Gateway (3DS2)".
  3. Click the "Install Now" button to install the plugin.
  4. Click the "Activate" button or navigate to Plugins > Installed Plugins > Activate the Trust Payments gateway plugin.

  Manual Installation

  1. Navigate to Plugins > Add New Plugin > Upload Plugin.
  2. Select the Trust Payments Gateway for WooCommerce (3DS2) plugin file (trustpayments-gateway-3ds2.zip) from your computer.
  3. Upload the file.
  4. Click the "Activate" button or navigate to Plugins > Installed Plugins > Activate the Trust Payments gateway plugin.



To configure the Trust Payments API for WooCommerce plugin, navigate to WooCommerce > Settings >
Payments > Trust Payments Gateway (3DS2) in your website dashboard. Select “Save Settings” at the bottom of the page to confirm your settings.

Click image to expand

You will be able to change the following settings:

  • Enable/Disable
    Check this box to activate the gateway on your checkout.
  • Enable/Disable Debug Logger
    Enables/disables the display of debugging information for developers. The logs can be found in WooCommerce > Status > Logs.
  • Title and Description
    These are used on the checkout page of WooCommerce to describe the Trust Payments gateway.
  • JWT Username
    Your JWT username, assigned by Trust Payments.
  • JWT Secret
    This is used to sign the JWT (JSON Web Token) for processing requests to the Trust Payments gateway.
  • WebServices Username
    This will be your WebServices username registered with Trust Payments.
  • WebServices Password
    This will be your WebServices password.
  • Site Reference
    This is the site reference provided by Trust Payments.
    Note: To run the checkout in test mode you will need to enter the test site reference. This will allow you to place orders with test card numbers and should only ever be used on a development website.
  • Auth Method
    The auth method is used to specify how a transaction is to be processed by the card issuer. There are two supported values: Pre or Final.
  • Disable saving new cards
    Disables the saved card feature. With this ticked, customers won’t be able to save any new cards, but they will still be able to use previously saved cards.
  • Disable save cards option
    Disables the saved card feature. With this ticked, customers won’t be able to save new cards, but also won’t be able to use or see previously saved cards

  Saved cards are enabled by default.



After adding a product/s to the cart, go to checkout and select Trust Payments to see the checkout:


Order Status

Once an order has been placed, the order status will be set to “Processing” if the payment has been successful. In practice, this is automated because orders that have a failed payment should be flagged up before completing checkout.

An order that has been placed without a successful payment will be marked as “Pending Payment” but in normal circumstances you shouldn’t see this status.

Once you have processed the order you have the option to manually change the order status to “Complete” to help you manage your orders easily.


Advanced Settings


  1. To process a refund, go to WooCommerce > Orders.
  2. Edit the order you would like to refund.
  3. Click the "Refund" button below the order item list, and enter the amount to be refunded.
  4. Click the "Refund via Trust Payments".

  If you have the “Refunded Orders” email enabled in WooCommerce, then an automated email will be sent to the customer to inform them of the refund. If you entered a reason for the refund this will be included in the email.


Configure URL notifications

  The following steps only apply if using our API plug-in (rather than the plug-in that makes use of our hosted Payment Pages solution).

Follow the steps provided below to configure and enable URL notifications in MyST, to ensure the WooCommerce plugin is updated when transactions have been processed on your Trust Payment's account. This updates the status of the order in WooCommerce from "Pending Payment" to "Processing".

  1. First of all, you will need to sign in to your WordPress Admin Panel, and go to:
    Settings > Payments > Trust Payments for WooCommerce

  2. Tick to enable Enable Url Notification and enter a password into the Url Notification Password field. You will need to enter this password again in MyST later.


  3. Sign in to MyST.

  4. Search for your Trust Payments sitereference using the search box found at the top of the page.

  5. When viewing your site details, click “Rule manager“.


  6. Select the action type “URL notification” from the drop-down and your browser will be redirected.


  7. Create a new URL notification rule:

    Add new condition
    (A) Click “Add new condition” and specify the circumstances in which the URL notification is to be triggered following a transaction. Ensure the following options are ticked:

    • In the Accounts box displayed, ensure "ECOM" and "MOTO" is ticked.
    • In the Requests box displayed, ensure “AUTH” is ticked.
    • In the Error codes box displayed, ensure "0 - Ok" is ticked.
    • In the Settle statuses box displayed, ensure "not in" is selected in drop-down box and "3 - Cancelled" is ticked.

    Once saved, the condition will look like this in the Rule manager:


    Add new action
    (B) Click “Add new action” and specify the endpoint for the URL notification.

    • Ensure the settings displayed are configured as follows:
      • Action name: <Specify a recognisable name>
      • Use site security details: NO
      • Security algorithm: sha256
      • Notification password: <Enter the password you entered earlier in the WordPress Admin Panel>
      • Pipe notification to browser: NO
      • Process notification: failover
      • Website address (URL): <Your store URL> e.g. https://trustpayments.wpengine.com
      • Method: POST
    • You must also include the following Fields:
      • Error Code (errorcode)
      • Order Reference (orderreference)
      • Payment Type (paymenttypedescription)
      • Request Type (requesttypedescription)
      • Settle Status (settlestatus)
      • Site Reference (sitereference)
      • Transaction Reference (transactionreference)

    Once saved, the action will look like this in the Rule manager:


    Add new rule
    (C) Using the drop-down boxes, assign the condition to the action and click “Create rule“.

  8. Ensure the rule is active (this is shown with a tick under the Active column). Once enabled, the rule will be applied to all payment sessions for the given sitereference, and the URL notification will be triggered whenever the condition specified is met. Once enabled, no further steps are needed.

      All new rules should be created on your test sitereference and tested to ensure they work as expected before being added to your live sitereference.


Contacting Support

  Please note the official WordPress forum may not be the best place for all support requests, since we will often need to investigate sensitive settings regarding either your MyST account or your website configuration, and the public forum is not an appropriate setting for this. Therefore, we would suggest you contact our Support Team directly for queries that require more in-depth levels of support, making it clear that your query relates to the latest WordPress plugin.

Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request