Skip to content

Accepting Payments with Mollie

The Mollie add-on sends your customers to Mollie's secure payment page to pay, then brings them back to your site to see their receipt. Mollie is a good fit for photographers in Europe, since it handles the payment methods people there use every day, like iDEAL in the Netherlands and Bancontact in Belgium, along with credit cards, Apple Pay and PayPal.

Mollie works for businesses based in the European Union, the United Kingdom and Switzerland. It takes payments in euros and a number of other currencies, such as British pounds, Swiss francs, Swedish and Danish kroner, Polish złoty and US dollars. Cards and PayPal can be paid in most of these, but many local methods like iDEAL and Bancontact only take euros. Sunshine sends every payment in your store currency, which you set in Sunshine > Settings.

Installing the Add-on

If you have a Pro, Plus or Basic license, go to Sunshine > Add-ons and turn on Mollie. Sunshine downloads it, adds its license key and activates it for you. The steps are in Install add-ons for Pro/Plus/Basic licenses.

If you bought the add-on on its own, follow Install individually purchased add-on, then enter its key in Sunshine > Settings > Licenses. See License Keys if the key won't activate.

Getting Your Mollie API Keys

Sunshine connects to Mollie with an API key, which is a long code that lets your site create payments in your Mollie account. It's not the email and password you use to log in to Mollie.

  1. Log in to your Mollie Dashboard
  2. Open Developers, then API keys
  3. Copy the Live API key, which starts with live_
  4. Copy the Test API key too, which starts with test_, if you want to try payments before going live

Mollie gives you a test key as soon as you sign up. The live key only takes real payments once Mollie has checked and approved your account, so finish their sign-up steps before you switch Sunshine to Live.

Setting Up Mollie in Sunshine

  1. Go to Sunshine > Settings > Payments
  2. Turn on Mollie with the toggle, then click Configure
  3. Set Mode to Live
  4. Paste your live API key into Live Transaction Key
  5. Click Save Changes

Here is every setting on the Mollie screen:

  • Name: What customers see as the payment option at checkout. Leave it blank to show "Mollie".
  • Description: The short line under the name at checkout. Leave it blank to show "Pay with Mollie".
  • Fees: Add an extra charge when customers pay this way, as a percentage or a fixed amount, with a Fee Name and Fee Amount. See Payment Gateway Fees.
  • Mode: Live takes real payments. Test uses Mollie's test mode, where no real money moves.
  • Live Transaction Key: Your live API key (the one starting with live_). Shown when Mode is Live.
  • Test Secret Key: Your test API key (the one starting with test_). Shown when Mode is Test.

Always click Save Changes after picking a mode. Until the settings are saved with Live chosen, Sunshine treats Mollie as being in Test mode.

You don't pick payment methods in Sunshine. The Mollie payment page shows whichever methods you've turned on in the payment methods settings of your Mollie Dashboard, as long as they work for the order's currency and amount.

Testing with Mollie

Mollie's test mode lets you go through the whole checkout without paying anything.

  1. In Sunshine, set Mode to Test, paste your test API key into Test Secret Key and click Save Changes
  2. Place an order on your site and choose Mollie
  3. On Mollie's test page, choose a payment method, then pick the result you want to try: paid, failed, canceled or expired

Try a paid payment and a canceled one so you can see both paths described below. Orders placed in Test mode are marked Test in your order list. Set Mode back to Live and save when you're done testing.

Mollie has to be able to reach your website to tell it about payments. If you test on a site that runs on your own computer, Mollie can't reach it and may refuse to start the payment.

What Customers See at Checkout

On the payment step, customers choose Mollie (or the name you gave it). The button reads Continue to payment details, since the payment itself happens on Mollie's site.

When they click it, Sunshine saves the order as Pending Payment and sends them to Mollie's payment page. The order number, such as "Order #1234", is sent to Mollie as the payment description, so you can find it in your Mollie Dashboard.

What Happens When Customers Come Back

After paying, or cancelling, Mollie sends the customer back to your site. Sunshine asks Mollie right away what happened to the payment, so the customer sees the real result.

When the payment is paid, Sunshine checks that it's for this order, in the order's currency and for the full order total. If it all matches, the order is marked New, the cart is emptied, and the customer sees their receipt page showing the order as paid. The receipt emails go out at this point.

When the payment was cancelled, failed or expired, the customer goes back to the checkout page with the message "Your payment was not completed. You can try again below." The order is marked Cancelled (or Failed), and the cart is still there. When they place the order again, Sunshine reuses the same order, puts it back to Pending Payment and sends them to Mollie with a fresh payment. You don't end up with a pile of duplicate orders from one customer.

When Mollie is still waiting on the payment, which can happen with slower methods like a bank transfer, the customer sees their receipt page with the order still pending. Sunshine finishes the order on its own once Mollie says it's paid.

Payment Notices from Mollie

Mollie also tells your site about each payment directly, separate from the customer's browser. These notices are called webhooks. They make sure the order is finished even if the customer closes the tab before getting back to your site, and they let Sunshine know about refunds.

You don't need to set anything up for this. Sunshine gives Mollie the address to send notices to with every payment, so there's nothing to copy into your Mollie Dashboard.

A few things to know about how these notices are handled:

  • Whichever arrives first, the customer coming back or Mollie's notice, finishes the order. The other one sees it's done and leaves it alone, so the receipt is only sent once.
  • If a customer tried to pay more than once, only the newest Mollie payment can cancel or fail the order. A notice about an older try won't undo a paid order.
  • A paid payment still finishes the order even if the order was marked Cancelled or Failed from an earlier try.
  • Sunshine only listens for these notices while Mollie is turned on in Sunshine > Settings > Payments. Keep it on while any Mollie orders are still waiting for payment.

Receipts

Sunshine holds back the customer receipt and the admin receipt emails until Mollie confirms the payment. That way nobody gets a receipt for an order that was never paid. Once the payment is confirmed, both emails go out once.

On the order screen, the Mollie tab shows the Transaction ID, which is Mollie's payment ID starting with tr_. You can search for it in your Mollie Dashboard.

Refunds

Refunding from the order screen

You can refund a Mollie payment from your WordPress admin.

  1. Open the order in Sunshine > Orders
  2. In the Order Actions panel, choose Refund payment in Mollie
  3. Leave Full refund ticked to refund everything that's left, or untick it and enter the amount
  4. Optionally type a Reason for refund (up to 140 characters). It's saved on the order and sent to Mollie with the refund
  5. Click Apply

A full refund marks the order Refunded. A partial refund is recorded on the order and comes off its total, but the order keeps its status. You can make more partial refunds later, up to what's left.

The Refund payment in Mollie option only shows when Mollie says the payment can still be refunded. Sunshine doesn't email the customer about a Mollie refund, so let them know yourself.

Refunding in the Mollie Dashboard

You can also refund a payment in your Mollie Dashboard. Mollie tells Sunshine about it, and once Mollie finishes the refund, Sunshine records it on the order with a note like "Refund of €20.00 processed via Mollie webhook". The same rules apply: refunding everything that's left marks the order Refunded, and a partial refund keeps its status.

A refund you start in Sunshine isn't counted a second time when Mollie's notice about it arrives.

Currencies Without Decimals

Most currencies have cents, but a few don't. Mollie expects Japanese yen (JPY) and Icelandic króna (ISK) amounts as whole numbers, and Sunshine sends them that way for payments and refunds. If your store currency is JPY or ISK, there's nothing extra to set up.

Admin Payment Problem Email

Sunshine can email you when a Mollie payment doesn't match its order, or when an order is marked Failed. A payment that doesn't match might be for a different order, in a different currency, or for a different amount than the order total. When that happens, Sunshine leaves the order unpaid and adds a note to it, for example "Mollie payment tr_ABC123 was not accepted for this order: it was for 25.00 EUR but the order total is 30.00 EUR. The order was left unpaid."

This email is off until you turn it on.

  1. Go to Sunshine > Settings > Email and open Admin Payment Problem
  2. Tick Enabled
  3. Add one or more addresses in Recipient(s), or leave it empty to send to your site's admin email
  4. Under Send when, keep "A payment didn't match the order" and "A payment service marked the order Failed" ticked

See Emails for all the options.

Troubleshooting

"There was an error processing your payment"

Mollie refused to start the payment, and the reason from Mollie is shown in brackets after the message. The usual causes are:

  • The API key is wrong or in the wrong field. Live keys start with live_ and go in Live Transaction Key, and test keys start with test_ and go in Test Secret Key. Make sure Mode matches and there are no spaces before or after the key.
  • Your live key isn't ready yet because Mollie hasn't finished approving your account.
  • Your store currency isn't one your Mollie account can take.
  • Mollie can't reach your site, for example because it runs on your own computer or is behind a password or maintenance page.

An order is stuck on Pending Payment

Usually the customer left Mollie's payment page without paying, or chose a slower method like a bank transfer. Look the order number up in your Mollie Dashboard. If Mollie shows it as paid, Sunshine finishes the order as soon as Mollie's notice reaches your site.

If Mollie says it's paid but the order never updates, Mollie probably can't reach your website. A security plugin, firewall, maintenance mode or password protection on the site can block it. Make sure Mollie is still turned on in Sunshine, too.

If a customer leaves Mollie's page and then places the order again, Sunshine starts a new order rather than reusing the one still waiting on Mollie. The older one stays as Pending Payment and you can delete it.

An order has a note saying the payment was not accepted

Sunshine found that the paid Mollie payment didn't match the order, so it left the order unpaid. The note says why. Compare the payment in your Mollie Dashboard with the order. If the customer was charged but shouldn't have been, refund them in Mollie. If you're happy to accept it, change the order's status to New by hand.

"Refund could not be processed", or the refund option is missing

Mollie only allows a refund while there's money left on the payment to refund, so check the payment in your Mollie Dashboard. Sunshine also uses the keys for the mode it's in, so a test order can only be refunded while Mode is set to Test.

If you need more detail about what happened, turn on logging and try another test order.

Still need help?

If you have not yet found your answer in the documentation articles, please contact support

Sunshine Photo Cart for WordPress