- The Mollie API is a REST API. You create a payment, send your customer to Mollie's checkout and receive a webhook notification when the status changes.
- Mollie only sends an id to your webhook. You retrieve the status yourself. Understand that and you avoid most mistakes.
- For online payments you pay no subscription, only per successful transaction. iDEAL costs €0.32 per payment (as of November 2026).
If you search for "mollie api", you probably want more than the standard plugin offers: a payment link from your ERP, payments in a B2B portal or refunds that run automatically. This guide follows Mollie's own documentation and also covers the costs and pitfalls you want to know about in advance.
What is the Mollie API and what can you do with it?
The Mollie API is the interface your software uses to create, retrieve, refund and process payments itself, without a plugin in between.
The API consists of separate parts. Mollie calls each one its own API [1]:
- Receiving payments: the Payments API (create, retrieve, update, cancel), the Methods API for the payment methods in your checkout, the Refunds API, the Chargebacks API, the Captures API and the Payment Links API.
- Recurring payments: the Customers, Mandates and Subscriptions APIs, for subscriptions and direct debit.
- Business operations: the Balances, Settlements, Invoices and Payouts APIs. These show what Mollie pays out and which transactions are in each payout.
- Mollie Connect: the OAuth and Organizations APIs, for platforms that handle payments on behalf of other sellers.
Mollie has official client libraries. You install the PHP client via Composer with composer require mollie/mollie-api-php. This requires PHP 8.2 or higher [13]. Because it is a standard REST API, you can call it from any language that can make HTTP requests. Not quite sure what an API is? Read What is an API? first.
Do you need the Mollie API, or is a plugin enough?
If your webshop runs on a standard platform and you only want checkout in the shopping cart, a plugin is enough. Mollie itself calls these ready-made integrations the easiest route [8]. You need the API when payments have to happen outside that cart.
A few situations where a plugin falls short:
- B2B portal or your own app. Your customers order in an environment you had built for you. No plugin exists for that.
- Payment links from your own system. A wholesaler wants to automatically include a payment link with a quote or an outstanding invoice. That is what the Payment Links API is for.
- Subscriptions and recurring deliveries. With Customers, Mandates and Subscriptions, Mollie collects payments periodically [1].
- Reconciliation with your accounting. The Settlements and Balances APIs show which transactions are in which payout [1].
Our view. Most webshops use the plugin for the cart and build a small integration on the API alongside it for one specific process, such as payment links or reconciling payouts. So you do not have to replace everything at once. How to approach such an integration is covered in Having an API integration built.
How does a payment via the Mollie API work, step by step?
A payment runs in four steps. Your software creates the payment, the customer pays on Mollie's page, Mollie calls your webhook and your software retrieves the new status. You redirect the customer to the link in _links.checkout from the response [3].
You create a payment with a POST request to https://api.mollie.com/v2/payments [3]. The most important fields are:
amount: a currency (such asEUR) and an amount as a string, for example"10.00".description: the description the customer sees, up to 255 characters.redirectUrl: where the customer returns after paying. This field is normally required, except for recurring payments.webhookUrl: where Mollie notifies you that something has changed. Technically this is optional, but Mollie warns that without a webhook you will miss important status changes [3].
In PHP, according to the README of the official client, it looks like this [13]:
$payment = $mollie->send(new CreatePaymentRequest(
description: 'My first API payment',
amount: new Money(currency: 'EUR', value: '10.00'),
redirectUrl: 'https://webshop.example.org/order/12345/',
webhookUrl: 'https://webshop.example.org/mollie-webhook/'
));
Every payment has a status. Mollie documents seven statuses and states for each one whether your webhook is called [5]:
| Status | Meaning | Webhook |
|---|---|---|
open | Created, the customer can still pay | No |
pending | Payment started, not yet completed | Yes |
authorized | Authorised, the money has yet to be collected | Yes |
paid | Paid, final | Yes |
canceled | Cancelled by the customer, final | Yes |
expired | Expired, final | Yes |
failed | Failed, final | Yes |
On one point the pages contradict each other: the webhook page does not list pending among the moments when Mollie calls you [4]. So do not count on a notification for pending.
With authorized, the money has not yet been collected. That only happens with a capture via the Captures API, for example once you ship the order.
How do webhooks work in the Mollie API?
A Mollie webhook contains only the payment id, never the status. Your software then has to retrieve the payment itself and only then update the order [4].
Mollie sends a POST to your webhookUrl with a single parameter, for example id=tr_5B8cwPMGnU6qLbRvo7qEZo. The format is application/x-www-form-urlencoded, not JSON. Mollie does this deliberately: that way a forged webhook can never cause an unpaid order to be processed [4]. Anyone who guesses your webhook address can at most make you check whether something has changed.
The rules for these calls are on the webhook page [4]:
- Respond with
200 OK. Nothing more is needed. Do so even if you do not recognise the id. - Within 15 seconds. After that the call counts as failed, even if you still return 200 later.
- Ten attempts. If a call fails, Mollie retries at increasing intervals: after 1, 2, 4, 8, 16 and 29 minutes, then after 1, 2 and 22 hours. The last attempt comes roughly 26 hours after the first.
- No 301 or 302. With such a redirect, the POST becomes a GET and you lose the id. If you must redirect, use 307 or 308.
- No
localhost. Mollie must be able to reach your address. For local testing, Mollie suggests ngrok [3].
Note. Do not use the redirectUrl to determine whether payment has been made. That is where the customer returns, but it says nothing about the status. A customer who closes the tab never gets there. Only the webhook and retrieving the status are reliable.
How long does a Mollie payment stay open before it expires?
That depends on the payment method: with iDEAL and credit card after 15 minutes, with a bank transfer after 12 days [5]. A payment with status open then becomes expired.
| Payment method | Expires after |
|---|---|
| iDEAL, credit card, paysafecard | 15 minutes |
| MyBank, TWINT | 45 minutes |
| Bancontact, Belfius, KBC, EPS, Przelewy24 | 1 hour |
| Vouchers | 2 hours |
| PayPal | 6 hours |
| Klarna, in3 | 48 hours |
| Bank transfer | 12 days (plus 1 or 2 if day 12 falls on a weekend) |
Mollie advises against predicting expiry yourself. Wait for the webhook and then retrieve the status [5]. It does matter for your stock, though. If you reserve products as soon as a payment is created, that stock stays tied up for up to twelve days with a bank transfer. With iDEAL it is fifteen minutes.
What does paying via Mollie cost per transaction?
For online payments, Mollie charges no fixed monthly fee, only a fee per successful transaction [6]. The amount depends on the payment method. The API itself costs nothing extra.
| Payment method (Netherlands) | Fee per transaction |
|---|---|
| iDEAL | Wero | € 0,32 |
| Mastercard and Visa, consumer card from the EEA | 1,80% + € 0,25 |
| Mastercard and Visa, business card from the EEA | 2,90% + € 0,25 |
| American Express | 2,90% + € 0,25 |
| Apple Pay, Google Pay | rate of the card used |
| PayPal | PayPal fees + €0.10 |
| Klarna (Netherlands and Belgium) | 2,99% + € 0,45 |
| Bancontact | 1,40% + € 0,25 |
| SEPA Direct Debit | € 0,35 |
| SEPA bank transfer | € 0,25 |
| Riverty, Billink | 2,99% + € 0,35 |
| in3 | 3,99% + € 0,95 |
| Billie | 3,49% + € 0,35 |
As of November 2026, source: Mollie's pricing page [6].
Two items are easy to overlook. If you process less than €500,000 a year, five payouts per month are free and each extra payout costs €0.25. If you process more than €100,000 a month, Mollie offers volume discounts [6].
Our assessment. For a wholesaler with business customers, the choice of payment method affects your margin. A business credit card costs 2.90% + €0.25, a SEPA bank transfer €0.25. On a €2,000 order, that is €58.25 versus €0.25. To see what such costs do per channel, read Calculating your real margin per sales channel.
How do you test a Mollie API integration before going live?
You test with the test key of your website profile. Everything you create in test mode is completely separate from your real data, and the API works the same in both modes, webhooks included [7].
Keys come in pairs: a test key and a live key per website profile. You find them in the dashboard under Developers > API keys. You see the secret value once, when you create it. You can now create a second key per profile, so you can replace a key without the integration going down [2]. If a third party integrates on your behalf, Mollie requires OAuth instead of an API key.
A few things from the testing documentation worth knowing [7]:
- Instead of the regular checkout, you get a test screen where you choose the outcome yourself.
- Testing is only possible in euros.
- For card payments there are test cards, such as Visa
4543 4740 0224 9996with any expiry date and CVV. - Specific amounts trigger an error. A credit card payment of €1,007.00 returns
insufficient_funds. - Payment methods work immediately in test mode, even if they are still "pending" in your account. In live mode that may differ.
- The endpoints for business operations, such as payouts and settlements, have no test mode.
Mollie has a go-live checklist. First complete your business profile so verification starts, check your bank account and enable your payment methods. Then make a test API call, create a first test payment and only then put the live key into your integration [8].
Where does a Mollie API integration go wrong in practice?
Most problems don't arise when creating payments, but in the edge cases: duplicate requests, too many requests, slow webhooks and refunds. Mollie documents each of these cases, but you have to handle them yourself.
1. Duplicate payments or refunds. If the connection drops and your software resends a request, a refund can be made twice. To prevent this, give every POST request a unique value in the Idempotency-Key header. Mollie recommends a UUID4. If the same request comes in again within an hour, Mollie returns the first response. If the first request is still being processed, you get 409 Conflict [10]. Such a key is tied to the API key or token you used for the first request. If you replace that, your idempotency keys start over.
2. Too many requests at once. Mollie doesn't publish fixed limits. They are calculated per merchant based on traffic, separately for reads and writes. All keys and OAuth apps of the same merchant share one bucket [9]. So your plugin, your ERP integration and your reporting script all draw on the same allowance. Go over the limit and you get 429 Too Many Requests with a Retry-After header, which tells you how many seconds to wait.
3. A webhook that does too much. If your webhook first creates an invoice, updates stock and sends an email, you may not make the 15 seconds [4]. Store the id, respond with 200 and do the heavy work afterwards.
4. Refunding without balance. A refund is deducted from your Mollie balance. If that balance is too low, the refund waits and Mollie retries automatically as soon as there is enough again [11]. Partial refunds are possible: the amount may be lower than the original payment.
5. Errors that don't go away on their own. An error in the 4xx range is caused by your request and usually won't resolve itself. An error in the 5xx range is on Mollie's side [12]. With a 422, the field field shows which value is wrong. So don't blindly retry 4xx errors. Put them in a list that someone reviews.
Takeaway. For every integration with the Mollie API: fetch the status after the webhook, respond within 15 seconds, send an idempotency key with every POST, handle 429 using the Retry-After value and test with the same webhook URL you use in live.
Build a Mollie integration yourself or have it built?
If you have a developer in-house and it concerns one process, such as payment links from your ERP, building it yourself is doable: test mode lets you practise everything without real money. Having it built makes more sense when the integration touches several systems, for example orders, stock, accounting and customer service at once.
SolidDeploy is a dedicated tech team for e-commerce, retail and wholesale. The team builds integrations, portals and custom software on top of the systems you already use. After a free consultation, the team gets started within two weeks, and within 30 days the first system is running. Packages start from €1,495 per month; see pricing. Want to understand first what having an integration built involves? Start with Having an API integration built.
Frequently asked questions
Is the Mollie API free to use?
Yes. You don't pay for the API itself, nor a monthly fee for online payments. You only pay per successful transaction, for example €0.32 for iDEAL (as of November 2026) [6].
Where do I find my Mollie API key?
In the Mollie dashboard under Developers > API keys. You have a test key and a live key per website profile. You only see the secret once, when you create it, so store it securely straight away [2].
Can I partially refund an order with the Mollie API?
Yes. You send a POST to a payment's refunds with an amount lower than the original amount. The money is deducted from your Mollie balance [11].
How many requests per second can you make to the Mollie API?
Mollie does not publish a fixed number. Limits are calculated per merchant and differ between reads and writes. You can see your remaining capacity in the headers RateLimit and RateLimit-Policy [9].
Why is my Mollie webhook not arriving?
Usually Mollie cannot reach the address, for example with localhost, or the request is redirected with a 301 or 302, which loses the id. If you only respond after 15 seconds, the call also counts as failed [4]. Mollie then retries up to ten times, spread over about 26 hours.
What would this do for you?
Describe in the Idea scan what you want to improve. You get a few targeted questions, your idea is then laid out clearly and we prepare a free consultation.
Sources
- Mollie, "Mollie API overview", accessed 23 November 2026
- Mollie, "Authentication", updated 11 September 2026
- Mollie, "Create payment", accessed 23 November 2026
- Mollie, "Webhooks", accessed 23 November 2026
- Mollie, "Handling payment status", accessed 23 November 2026
- Mollie, "Pricing", accessed 23 November 2026
- Mollie, "Testing", updated 13 July 2026
- Mollie, "Go-live checklist", updated 24 November 2025
- Mollie, "Rate limiting", updated 18 November 2026
- Mollie, "API idempotency", accessed 23 November 2026
- Mollie, "Refunds API" and "Create payment refund", accessed 23 November 2026
- Mollie, "Handling errors", updated 19 November 2026
- Mollie, "mollie-api-php" on GitHub, accessed 23 November 2026
- Getting an API integration built · how to approach an integration, from requirements to delivery
- What is an API? · the basics, with examples from your own webshop
- Calculating your real margin per sales channel · where transaction fees end up in your margin
- AFAS API: connecting it to your webshop



