WooCommerce

Technical manual for MultiSafepay's free plugin.

Prerequisites

Installation

Ā  šŸ’” Tip! We recommend first installing the plugin in a test environment, following the WooCommerce installation procedure. Always make a backup.

There are two ways to install the plugin:

Wordpress installation

  1. Sign in to your WooCommerce backend.
  2. Go to Plugins > Add new.
  3. Search for MultiSafepay.
  4. For the MultiSafepay plugin for WooCommerce, click Install now > Activate.

Manual installation

  1. Click the Download button above.
  2. Sign in to your WooCommerce backend.
  3. Go to Plugins > Add new.
  4. Click Browse file.
  5. Upload the Plugin_WooCommerce_x.x.x.zip file.

Configuration

  1. Sign in to your WooCommerce backend.
  2. Go to WooCommerce > MultiSafepay settings
  3. On the Account tab, enter your API key.
  4. On the Order status tab, confirm the match between WooCommerce order statuses and MultiSafepay order statuses, and then click Save changes.
  5. On the Options tab, confirm your settings, and then click Save changes.
  6. Go to WooCommerce > Settings > Payments.
  7. Enable the relevant payment methods and confirm the settings.


User guide

Languages

MultiSafepay payment pages and messages to customers (e.g. Second Chance emails, links, order confirmations) are supported in several languages.

However, WooCommerce only supports the language of your ecommerce platform, irrespective of the customer's language or country, or the language of the webshop (if you use a third-party plugin for a multi-lingual webshop).

How to change language

The plugin sets the language for payment pages and messages based on the Wordpress locale code get_locale() function.

To change this behavior, use the multisafepay_customer_locale filter hook in our plugin.

Ask your developer to read WordPress Developer Resources - Filters in Wordpress .

Example implementation:

add_filter('multisafepay_customer_locale', 'return_my_own_locale');
function return_my_own_locale($locale) {
  // Your conditions and logic to return a valid locale code
  return $custom_locale;
}

TranslatePress

If you use the TranslatePress plugin for translations, to configure it for payment pages, follow these steps:

  1. Sign in to your WooCommerce backend.
  2. Go to Settings > TranslatePress > Advanced.
  3. Scroll down and click Exclude gettext string.
  4. In the Domain field, enter multisafepay.
  5. Click Add.

Notifications

MultiSafepay webhook

MultiSafepay uses a webhook to send you updates about orders and other notifications.

The webhook is triggered when the order status or transaction status changes, e.g. when:

  • A customer completes payment.
  • A customer's attempt to pay fails.
  • You process a refund.

From WooCommerce version 4.7.0, notifications are sent via POST requests, instead of GET requests.

However, sometimes the REST endpoint used to process notifications may be blocked by a firewall at server level, or by some WordPress plugins at application level. In this case, ensure you include MultiSafepay requests on your allow list.

Order requests

How to modify order requests

To change something in an OrderRequest before a transaction is processed, use the multisafepay_order_request filter hook in the plugin.

First, read the following:

Example of how to implement and overwrite the shopping cart:

add_filter( 'multisafepay_order_request', 'return_my_multisafepay_order_request' );
function return_my_multisafepay_order_request( \MultiSafepay\Api\Transactions\OrderRequest $order_request ) {
    // Your conditions and logic to return a valid order request
    // Register a CartItem
    $shopping_cart_items = array();
    $cart_item = new \MultiSafepay\ValueObject\CartItem();
    $cart_item->addName( 'The product name' )
              ->addQuantity( (int) 1 )
              ->addMerchantItemId( (string) 'SKU' )
              ->addUnitPrice( \MultiSafepay\WooCommerce\Utils\MoneyUtil::create_money( (float) 10.00, (string) 'EUR' ) )
              ->addTaxRate( '21' );
    $shopping_cart_items[] = $cart_item;
    // Register the CartItem in the ShoppingCart     
    $shopping_cart = new MultiSafepay\Api\Transactions\OrderRequest\Arguments\ShoppingCart($shopping_cart_items);
    // Overwrite the ShoppingCart    
    $order_request->addShoppingCart( $shopping_cart );
    // Overwrite the total amount of the transaction
    $order_request->addMoney(\MultiSafepay\WooCommerce\Utils\MoneyUtil::create_money( 12.10, 'EUR' ));
    return $order_request;
}

Payment components

The plugin supports payment components, which:

  • Provide a seamless checkout experience to increase conversion.
  • Encrypt customer payment details for secure processing.
  • Shift responsibility for PCI DSS compliance to MultiSafepay.
Supported payment methods
How to activate payment components
  1. Sign in to your Wordpress backend.
  2. Go to WooCommerce > MultiSafepay settings > Payment methods >
  3. Select the relevant payment methods, and click Manage.
  4. In the Payment Type field, select Payment component.
  5. Click Save changes.

šŸ’¬ Support: If you're new to accepting card payments, email a request to activate them to [email protected]

āš ļø Note:* If you have a custom checkout and encounter a conflict with the payment component, the Integration Team will do their best to provide support, but we can't guarantee compatibility in all cases.

Payment links

Payment methods

By default, activated payment methods from your MultiSafepay account appear on the payment method list.

Supported payment methods

Recurring payments

You need to activate recurring payments and then enable it in the plugin settings.

How to activate recurring payments
  1. Sign in to your Wordpress backend.
  2. Go to WooCommerce > MultiSafepay settings > Payment methods
  3. Select relevant card payments, and then click Manage.
  4. In the Payment Type field, select Payment component.
  5. In the Recurring payments filed, select Enabled.
  6. Click Save changes.

āš ļø Note: To activate recurring payments, ensure that the Payment component is enabled.

Refunds

You can process Full and partial refunds for all payment methods, except BNPL for which you can only process full refunds.

Shipping orders

For BNPL orders, after shipment, you must change the order status from Completed to Shipped. This prevents the order expiring and triggers invoicing.

If you change the order status to Shipped in your backend, the updated status is passed to your MultiSafepay dashboard automatically.

Checkouts

The plugin supports the WooCommerce checkout and is compatible with most premium themes, unless you have a custom checkout.

WooCommerce Checkout Blocks

You can use the Checkout Blocks for WooCommerce to customize your checkout.
āš ļø Note: Only redirect payment methods are supported with this checkout at the moment.

Surcharges

You can apply surcharges in the plugin when combined with a relevant third-party package.

āš ļø

Attention Dutch merchants

We strongly recommend not applying surcharges to BNPL methods. This is now considered providing credit under the Wet op het consumentenkrediet and article 7:57 of the Burgerlijk Wetboek, and requires a permit from the Authority for Financial Markets (AFM).

How to apply surcharges with third-party packages

Third-party packages must follow WooCommerce and Wordpress development guidelines.

Support

The Integration Team will do their best to help you install third-party packages, but we can't guarantee perfect compatibility.

Troubleshooting

Redirect URL not leading to thank you page

  • possible reasons

WC_Order::get_checkout_order_received_url() =>
https://woocommerce.github.io/code-reference/classes/WC-Order.html#method_get_checkout_order_received_url
does not return correct URL, which can be caused by a third party plugin making use of the "woocommerce_get_checkout_order_received_url" filter and returning a wrong value

  • possible solutions

Use the filter "woocommerce_get_checkout_order_received_url", provided by WooCommerce, and re-format into the correct value.

WooCommerce code reference
WooCommerce add filter

Updates

You can update the plugin in your backend and the CMS marketplace, or via SFTP.

How to update in your backend

Ā  šŸ’” Tip! Make sure you have a backup of your production environment, and that you test the plugin in a staging environment.

  1. Download the plugin again above.
  2. Follow the Installation and configuration instructions from step 2.


šŸ’¬

Support

Contact MultiSafepay:

Top of page