PHPackages                             mollie/mollie-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mollie/mollie-api-php

ActiveLibrary[API Development](/categories/api)

mollie/mollie-api-php
=====================

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

v3.9.0(3mo ago)60014.4M—1.2%201[2 issues](https://github.com/mollie/mollie-api-php/issues)[1 PRs](https://github.com/mollie/mollie-api-php/pulls)20BSD-2-ClausePHPPHP ^7.4|^8.0CI passing

Since Dec 9Pushed today61 watchersCompare

[ Source](https://github.com/mollie/mollie-api-php)[ Packagist](https://packagist.org/packages/mollie/mollie-api-php)[ Docs](https://www.mollie.com/en/developers)[ RSS](/packages/mollie-mollie-api-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (277)Used By (20)

 [![](https://private-user-images.githubusercontent.com/7265703/259758037-140510a5-ede5-41bf-9d77-0d09b906e8f4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzkxODE1NjksIm5iZiI6MTc3OTE4MTI2OSwicGF0aCI6Ii83MjY1NzAzLzI1OTc1ODAzNy0xNDA1MTBhNS1lZGU1LTQxYmYtOWQ3Ny0wZDA5YjkwNmU4ZjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QU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UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.Np_lwommxzpNbhGm_labDjEoVpaRaQo7yQyls9y8ql4)

Mollie API client for PHP
=========================

[](#mollie-api-client-for-php)

[![Build Status](https://github.com/mollie/mollie-api-php/workflows/tests/badge.svg)](https://github.com/mollie/mollie-api-php/actions)[![Latest Stable Version](https://camo.githubusercontent.com/6e3e44395fa18a91bb1f1fbe338cd38ebc3d38b2581c68150ae830b85802cdce/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6c6c69652f6d6f6c6c69652d6170692d7068702f762f737461626c65)](https://packagist.org/packages/mollie/mollie-api-php)[![Total Downloads](https://camo.githubusercontent.com/39b6e14eed3e93115c97ce9b22aa46ff6c1f89cdba637ad2ac0788cd7da943cb/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6c6c69652f6d6f6c6c69652d6170692d7068702f646f776e6c6f616473)](https://packagist.org/packages/mollie/mollie-api-php)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4dacd825c3918b5b696b39f087f64ddf263d9ba06925a9da5e1297cf73221862/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f6c6c69652f6d6f6c6c69652d6170692d7068702f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mollie/mollie-api-php/actions?query=workflow%3A%22Fix+Code+Style%22+branch%3Amain)

Accepting [iDEAL](https://www.mollie.com/payments/ideal/), [Apple Pay](https://www.mollie.com/payments/apple-pay), [Google Pay](https://www.mollie.com/payments/googlepay), [Creditcard](https://www.mollie.com/payments/credit-card/), [Bancontact](https://www.mollie.com/payments/bancontact/), [SOFORT Banking](https://www.mollie.com/payments/sofort/), [SEPA Bank transfer](https://www.mollie.com/payments/bank-transfer/), [SEPA Direct debit](https://www.mollie.com/payments/direct-debit/), [PayPal](https://www.mollie.com/payments/paypal/), [Belfius Direct Net](https://www.mollie.com/payments/belfius/), [KBC/CBC](https://www.mollie.com/payments/kbc-cbc/), [paysafecard](https://www.mollie.com/payments/paysafecard/), [ING Home'Pay](https://www.mollie.com/payments/ing-homepay/), [Giropay](https://www.mollie.com/payments/giropay/), [EPS](https://www.mollie.com/payments/eps/), [Przelewy24](https://www.mollie.com/payments/przelewy24/), [Postepay](https://www.mollie.com/en/payments/postepay), [In3](https://www.mollie.com/payments/in3/), [Klarna](https://www.mollie.com/payments/klarna-pay-later/) ([Pay now](https://www.mollie.com/payments/klarna-pay-now/), [Pay later](https://www.mollie.com/payments/klarna-pay-later/), [Slice it](https://www.mollie.com/payments/klarna-slice-it/), [Pay in 3](https://www.mollie.com/payments/klarna-pay-in-3/)), [Giftcard](https://www.mollie.com/payments/gift-cards/) and [Voucher](https://www.mollie.com/en/payments/meal-eco-gift-vouchers) online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.

Requirements
------------

[](#requirements)

To use the Mollie API client, the following things are required:

- Get yourself a free [Mollie account](https://www.mollie.com/signup). No sign up costs.
- Now you're ready to use the Mollie API client in test mode.
- Follow [a few steps](https://www.mollie.com/dashboard/?modal=onboarding) to enable payment methods in live mode, and let us handle the rest.
- PHP &gt;= 7.4
- cUrl &gt;= 7.19.4
- Up-to-date OpenSSL (or other SSL/TLS toolkit)

For leveraging [Mollie Connect](https://docs.mollie.com/oauth/overview) (advanced use cases only), we recommend also installing our [OAuth2 client](https://github.com/mollie/oauth2-mollie-php).

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

The easiest way to install the Mollie API client is by using [Composer](http://getcomposer.org/doc/00-intro.md). You can require it with the following command:

```
composer require mollie/mollie-api-php
```

Usage
-----

[](#usage)

Initializing the Mollie API client, and setting your API key.

```
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setToken("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
```

The `setToken` method automatically detects whether you're using an API key (`test_`/`live_`) or an OAuth access token (`access_`). You can also use `setApiKey()` or `setAccessToken()` directly if you prefer to be explicit.

Find our full documentation online on [docs.mollie.com](https://docs.mollie.com).

#### Example usage

[](#example-usage)

```
use Mollie\Api\Http\Data\Money;
use Mollie\Api\Http\Requests\CreatePaymentRequest;

/** @var Mollie\Api\Resources\Payment $payment */
$payment = $mollie->send(new CreatePaymentRequest(
    description: 'My first API payment',
    amount: new Money('EUR', '10.00'),
    redirectUrl: 'https://webshop.example.org/order/12345/',
    webhookUrl: 'https://webshop.example.org/mollie-webhook/'
));
```

Documentation
-------------

[](#documentation)

For an in-depth understanding of our API, please explore the [Mollie Developer Portal](https://www.mollie.com/developers). Our API documentation is available in English.

For detailed documentation about using this PHP client, see the following guides:

- [Endpoint Collections](docs/endpoint-collections.md) - Learn how to interact with all available API endpoints.
- [HTTP Adapters](docs/http-adapters.md) - Information on customizing HTTP communication.
- [Idempotency](docs/idempotency.md) - Best practices and setup for idempotent requests.
- [Payments](docs/payments.md) - Comprehensive guide on handling payments.
- [Requests](docs/requests.md) - Overview and usage of request objects in the API client.
- [Responses](docs/responses.md) - Handling and understanding responses from the API.
- [Testing](docs/testing.md) - Guidelines for testing with the Mollie API client.
- [Debugging](docs/debugging.md) - How to debug API requests and responses safely.
- [Webhooks](docs/webhooks.md) - How to process Webhook requests

These guides provide in-depth explanations and examples for advanced usage of the client.

Recipes
-------

[](#recipes)

The Mollie API client comes with a variety of recipes to help you understand how to implement various API features. These recipes are a great resource for learning how to integrate Mollie payments into your application.

Here are some of the key recipes included:

- **Payments**: Demonstrates how to handle various payment scenarios.

    - [Create a payment](docs/recipes/payments/create-payment.md)
    - [Create a capturable payment](docs/recipes/payments/create-capturable-payment.md)
    - [Handle webhooks](docs/recipes/payments/handle-webhook.md)
    - [Refund payments](docs/recipes/payments/refund-payment.md)
- **Customers**: Shows how to manage customers and their payments.

    - [Manage customers](docs/recipes/customers/manage-customers.md)
    - [Customer payments](docs/recipes/customers/customer-payments.md)
- **Subscriptions and Recurring Payments**:

    - [Manage mandates](docs/recipes/mandates/manage-mandates.md)
    - [Manage subscriptions](docs/recipes/subscriptions/manage-subscriptions.md)

For a full list of recipes, please refer to the [recipes directory](docs/recipes/).

These recipes are designed to help you integrate Mollie into your application. Make sure to use your test API keys when testing the integration.

Upgrading
---------

[](#upgrading)

Please see [UPGRADING](UPGRADING.md) for details.

Contributing to Our API Client
------------------------------

[](#contributing-to-our-api-client)

Would you like to contribute to improving our API client? We welcome [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr). But, if you're interested in contributing to a technology-focused organization, Mollie is actively recruiting developers and system engineers. Discover our current [job openings](https://jobs.mollie.com/) or [reach out](mailto:personeel@mollie.com).

License
-------

[](#license)

[BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php). Copyright (c) 2013-2018, Mollie B.V.

Support
-------

[](#support)

Contact: [www.mollie.com](https://www.mollie.com) —  — +31 20 820 20 70

###  Health Score

79

—

ExcellentBetter than 100% of packages

Maintenance92

Actively maintained with recent releases

Popularity71

Solid adoption and visibility

Community53

Growing community involvement

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~26 days

Total

233

Last Release

99d ago

Major Versions

v1.9.12 → v2.3.02019-01-03

v1.19.13 → v2.8.22019-04-02

v2.78.0 → v3.0.0-beta.12025-02-28

v2.79.0 → v3.0.0-beta.22025-03-11

v2.79.1 → v3.0.62025-06-02

PHP version history (6 changes)1.6.3PHP &gt;=5.2

v1.9.5PHP &gt;=5.3

v2.0.0-beta-1PHP &gt;=5.6

v2.42.0PHP ^7.0|^8.0

v2.47.0PHP ^7.2|^8.0

v3.0.0-beta.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/23d4c374cd27da6bed534538eb3514a06d2c15485e9d63a8991b277909ecfca8?d=identicon)[willemmollie](/maintainers/willemmollie)

![](https://www.gravatar.com/avatar/dabb609ac7cf4f097fb06aa0f774363ab1cd044cb785f154466564027bd46646?d=identicon)[lvgunst](/maintainers/lvgunst)

![](https://www.gravatar.com/avatar/945b9f760957f60f6f8e1704a70d419f6846017da6b7e1e7f51c5111c9d920b0?d=identicon)[Daanvm](/maintainers/Daanvm)

![](https://avatars.githubusercontent.com/u/6184158?v=4)[Robbert Schreuder Hes](/maintainers/mollierobbert)[@mollierobbert](https://github.com/mollierobbert)

![](https://www.gravatar.com/avatar/0db6d714561c942dd2d7f9f97bd7543886d7bfdd61372b594b2312850fd99f2c?d=identicon)[molops](/maintainers/molops)

---

Top Contributors

[![Naoray](https://avatars.githubusercontent.com/u/10154100?v=4)](https://github.com/Naoray "Naoray (712 commits)")[![sandervanhooft](https://avatars.githubusercontent.com/u/7265703?v=4)](https://github.com/sandervanhooft "sandervanhooft (678 commits)")[![ciungulete](https://avatars.githubusercontent.com/u/742128?v=4)](https://github.com/ciungulete "ciungulete (120 commits)")[![ndijkstra](https://avatars.githubusercontent.com/u/3372841?v=4)](https://github.com/ndijkstra "ndijkstra (45 commits)")[![mollierobbert](https://avatars.githubusercontent.com/u/6184158?v=4)](https://github.com/mollierobbert "mollierobbert (22 commits)")[![lvgunst](https://avatars.githubusercontent.com/u/130915?v=4)](https://github.com/lvgunst "lvgunst (21 commits)")[![kloentje2](https://avatars.githubusercontent.com/u/4500111?v=4)](https://github.com/kloentje2 "kloentje2 (21 commits)")[![RickWong](https://avatars.githubusercontent.com/u/40102?v=4)](https://github.com/RickWong "RickWong (17 commits)")[![shirshir](https://avatars.githubusercontent.com/u/660457?v=4)](https://github.com/shirshir "shirshir (14 commits)")[![Thijs-Riezebeek](https://avatars.githubusercontent.com/u/14027813?v=4)](https://github.com/Thijs-Riezebeek "Thijs-Riezebeek (14 commits)")[![fjbender](https://avatars.githubusercontent.com/u/7370694?v=4)](https://github.com/fjbender "fjbender (12 commits)")[![tom-mollie](https://avatars.githubusercontent.com/u/22675340?v=4)](https://github.com/tom-mollie "tom-mollie (9 commits)")[![vernondegoede](https://avatars.githubusercontent.com/u/2484832?v=4)](https://github.com/vernondegoede "vernondegoede (8 commits)")[![SanderVanLeeuwen](https://avatars.githubusercontent.com/u/1685007?v=4)](https://github.com/SanderVanLeeuwen "SanderVanLeeuwen (8 commits)")[![arondeparon](https://avatars.githubusercontent.com/u/7697?v=4)](https://github.com/arondeparon "arondeparon (7 commits)")[![maikel-mollie](https://avatars.githubusercontent.com/u/263946459?v=4)](https://github.com/maikel-mollie "maikel-mollie (7 commits)")[![robin-mollie](https://avatars.githubusercontent.com/u/20555147?v=4)](https://github.com/robin-mollie "robin-mollie (6 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (5 commits)")[![it-can](https://avatars.githubusercontent.com/u/644288?v=4)](https://github.com/it-can "it-can (5 commits)")[![dmdijkslag](https://avatars.githubusercontent.com/u/17169266?v=4)](https://github.com/dmdijkslag "dmdijkslag (5 commits)")

---

Tags

apiservicerecurringpaymentpaymentsgatewaypaypalidealmolliepaysafecardsepasubscriptionscreditcardsofortdirect debitmistercashklarnabancontactsofortbankingchargesCBCbanktransferbelfiusbelfius direct netrefundsPrzelewy24podiumcadeaukaartkbcApple Paygift cardsintersolvefashionchequeinghomepaypaylatersliceit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mollie-mollie-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/mollie-mollie-api-php/health.svg)](https://phpackages.com/packages/mollie-mollie-api-php)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[mollie/magento

iDEAL, Creditcard, Bancontact/Mister Cash, SOFORT, Bank transfer, Bitcoin, PayPal &amp; paysafecard for Magento https://www.mollie.com/

397.9k](/packages/mollie-magento)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[mage2pro/stripe

Stripe integration with Magento 2

605.3k](/packages/mage2pro-stripe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
