MPS Documentation
Shop plugins

Accept payments in WooCommerce

Install the MPS Payments plugin, paste your API key, and take MPS payments in a WooCommerce shop without writing code.

The MPS Payments for WooCommerce plugin adds Powered by MPS as a payment method to your shop's checkout. Your customer pays on the MPS checkout and comes back to your shop, and the plugin marks the order paid once MPS confirms the payment. You install it in the WordPress admin and paste two codes from the MPS platform.

The plugin sends the order amount, order number and your shop's return addresses to MPS (Mobile Payment Solutions) to open each payment.

Download mps-payments.zip — always the latest version. Every version is in its releases on GitHub, with the source.

Before you start

  • WordPress 6.4 or later and WooCommerce 8.3 or later, on PHP 7.4 or later. Your host can tell you which versions you have. The block checkout and the classic checkout both work.
  • Your shop's currency set to euro (EUR)
  • A test API key and its webhook signing secret, from Online › API keys on the MPS platform. Connect your webshop shows how.
  • For orders confirmed the moment they are paid: your shop online and reachable from the internet. Your host or developer can confirm it; see For your host or developer.

Install and connect

In WordPress, open Plugins › Add New › Upload Plugin, choose mps-payments.zip, and click Install Now, then Activate.

Open WooCommerce › Settings › Payments and click Powered by MPS, the name the plugin gives the payment method.

Under Connection, paste your test key in API key and its webhook signing secret in Webhook signing secret, tick Enable, and click Save changes. The plugin sends the API key with every call.

Saving checks the key with MPS straight away. The plugin shows Connected to MPS with a test key, or says that MPS refused the key (Troubleshooting).

Place an order in your shop and pay it with one of the test cards. The order moves to Processing, as How payments are confirmed describes.

Go live: replace the test key with your live key and its webhook signing secret, and click Save changes. See Switch to live payments for what MPS needs first.

Test mode

A test key is an API key starting mps_test_. A card payment made with a test key is a test payment: the checkout shows a test-mode banner and takes only the test cards, no card is charged and nothing is paid out. Orders still move through paid or failed exactly as they do in live mode.

A test key does not expire. It works until you revoke it.

How payments are confirmed

The plugin never takes the shopper's return to your shop as proof of payment. It reads the payment from MPS and moves the order on what MPS says:

MPS paymentWooCommerce order
Paid, full amountProcessing (or Completed when every product is virtual and downloadable). The payment reference is the order's Transaction ID.
Paid, less than the order totalOn hold, with a note. A card issuer can approve part of an amount; check before shipping.
FailedFailed. The shopper is sent back to your shop's checkout to try again.
Shopper left without payingStays Pending payment, with a note, so the shopper can try again.

The plugin reads the payment when the shopper comes back, when MPS sends a webhook, and on a schedule at 10 minutes, 30 minutes, 1 hour and 6 hours after the payment was opened. An order is confirmed even when the shopper closes the tab before returning, if it is paid within those 6 hours or a webhook arrives.

Refunds

Refund an MPS order from WooCommerce's order screen: Refund → the amount → Refund € … via MPS Payments, in full or in parts. The order note says what MPS answered; a refused refund is not saved.

A test key can always refund. A live key needs the refund permission first: ask MPS to add it to your key. Every refund waits 4 hours before it is sent, and can be canceled in MPS until then.

Updates

Installed from a zip on GitHub, upload the new version the same way, in Plugins › Add New › Upload Plugin: WordPress offers Replace current with uploaded and keeps your settings. To hear about a new version, watch the repository's releases on GitHub (Watch › Custom › Releases). Installed from the WooCommerce Marketplace, it is updated by WooCommerce.com instead.

Not supported yet

  • Currencies other than EUR. The payment method is hidden at checkout when the shop currency is not EUR.

For your host or developer

The details below are for whoever runs the server your shop is on: your hosting provider or your developer.

Webhooks

The plugin sends its own webhook address with every payment, so there is no address to register anywhere. MPS sends a webhook the moment the payment arrives when two things are true:

  • your shop is reachable on a public HTTPS address. MPS cannot reach a shop on localhost or a private network;
  • the webhook signing secret for your key is pasted in the plugin. MPS signs every webhook, and the plugin ignores webhooks while it has no signing secret to check them with.

When either is missing, an order is confirmed when the shopper returns, or else at the next scheduled read: 10 minutes, 30 minutes, 1 hour or 6 hours after the payment was opened. That can be hours later, and the scheduled reads stop 6 hours after the payment was opened. A payment completed after that, such as a late ANNA bank payment, while the shopper does not come back, is confirmed only by a webhook. Set up webhooks for a live shop.

Webhook signing secret

Every webhook MPS sends is signed with a signing secret that belongs to your key. Every key issued in the MPS platform, test or live, comes with one. With the signing secret pasted, the plugin checks the signature and that the webhook is less than five minutes old, refuses anything that does not match with 401, and reads the payment for every webhook that does.

What it looks likewhsec_ followed by 43 characters
Where to get itShown with your key in Online › API keys. A new key comes with a new signing secret: paste it again when you switch keys.
Where to paste itWooCommerce › Settings › Payments › Powered by MPS, under Connection › Webhook signing secret
When it mattersOnly when your shop is on a public HTTPS address: elsewhere MPS cannot reach it anyway

Without the signing secret pasted, the plugin ignores webhooks and settles orders by its scheduled checks and the shopper's return. Paste it to get orders confirmed the moment the payment arrives. Even a signed webhook only tells the plugin to read the payment from MPS, and the order is moved on what MPS answers, so a webhook on its own can never mark an order paid.

Rotating the webhook signing secret

When MPS issues you a new signing secret, the previous one keeps being accepted for 24 hours and webhooks carry both signatures in that time. Paste the new signing secret whenever it suits you within that day; no webhook is lost.

Refund permission

Refunding from the shop needs the payments:refund scope on the API key: a test key always has it, a live key only once MPS granted it.

With the webhook signing secret pasted, the plugin also acts on how each refund ends. Paid out (refund.refunded) adds a note to the order. Failed or canceled (refund.failed, refund.canceled) removes the WooCommerce refund, puts a fully refunded order back to the status it had before, and leaves the amount free to refund again.

Upgrade a shop set up with a client ID and secret

MPS Payments 1.0.0 connects with an API key only: a client ID and secret no longer connect. The upgrade deletes the stored client ID and secret, and until you paste an API key MPS is not offered at checkout and the admin says MPS Payments is enabled but not offered at checkout: it has no API key. Paste the API key and the webhook signing secret from the MPS platform (Online › API keys) under WooCommerce › Settings › Payments › Powered by MPS.

API keys need plugin version 0.2.0 or later.

How the key check works

For your developer or host. To check a key on save, the plugin reads a payment that does not exist. MPS answers 404 to a key it accepts, and 401 or 403 to a key it refuses. A 404 for that call in your server's logs is the check passing, not a fault.

Troubleshooting

What you seeCauseWhat to do
MPS Payments is not offered at checkoutIt is not enabled, the API key is empty, or the shop currency is not EUR.Tick Enable, paste an API key, and set the shop currency to EUR.
MPS did not accept these credentials on saveA wrong or revoked API key (MPS refused the API key). A test key works until you revoke it.Create a new key in Online › API keys and paste it with its webhook signing secret. See API key errors.
Every call to MPS fails with 429 for a minute at a time, the right key includedMore than 10 calls with a wrong API key in one minute came from the server's outgoing address, so MPS refuses that address for 60 seconds. On shared hosting another site on the same address can cause it.Fix the wrong key; if the address is shared, ask the host for one of the shop's own. See API key errors.
The payment could not be started at checkoutMPS could not open the payment.Tick Debug log, try again, and read WooCommerce › Status › Logs, source mps-payments.
Webhook refused: signature or timestamp does not match in the log, with Debug log onThe signing secret is not the one for this key (common after switching to another key), or the shop's clock is more than five minutes off.Paste the signing secret shown with your key, and set the server clock right. See Webhook signing secret.
Webhook ignored: no signing secret configured in the log, with Debug log onNo webhook signing secret is pasted.Paste the one shown with your key in Online › API keys.
An order stays Pending payment after payingNo webhook was acted on (the shop is not on a public HTTPS address, or no webhook signing secret is pasted), and the shop could not reach MPS when the shopper returned.Wait for the next scheduled read: 10 minutes, 30 minutes, 1 hour or 6 hours after the payment was opened. Paid after the 6-hour read, it is confirmed only by a webhook: set up Webhooks, and contact MPS with the order's MPS payment reference.

Need help? Contact MPS at contact@mps-emi.com or +32 55 89 09 77, or the MPS partner you work with. What to include.

Building with an AI assistant? Give it llms.txt, every page in llms-full.txt, this page as Markdown, or the OpenAPI document. See Build with AI.

Last updated on

On this page