PHPackages                             omnipay/mollie - 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. [Payment Processing](/categories/payments)
4. /
5. omnipay/mollie

ActiveLibrary[Payment Processing](/categories/payments)

omnipay/mollie
==============

Mollie driver for the Omnipay payment processing library

v5.5.0(3y ago)631.7M↓13.6%44[7 issues](https://github.com/thephpleague/omnipay-mollie/issues)[1 PRs](https://github.com/thephpleague/omnipay-mollie/pulls)10MITPHPPHP ^7.2|^8.0CI failing

Since Nov 17Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/thephpleague/omnipay-mollie)[ Packagist](https://packagist.org/packages/omnipay/mollie)[ Docs](https://github.com/thephpleague/omnipay-mollie)[ GitHub Sponsors](https://github.com/barryvdh)[ RSS](/packages/omnipay-mollie/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (28)Used By (10)

Omnipay: Mollie
===============

[](#omnipay-mollie)

**Mollie driver for the Omnipay PHP payment processing library**

[![Unit Tests](https://github.com/thephpleague/omnipay-mollie/actions/workflows/run-tests.yml/badge.svg)](https://github.com/thephpleague/omnipay-mollie/actions/workflows/run-tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/680839f149ffe23b15e60f9b75bf85064c8f529bb085c0700fc9b94cfa3b5161/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6f6c6c69652f76657273696f6e2e706e67)](https://packagist.org/packages/omnipay/mollie)[![Total Downloads](https://camo.githubusercontent.com/34653d19964e2380daf677cdba971be070f7447d9bf7bfea5c751508dc0f2cf7/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6f6c6c69652f642f746f74616c2e706e67)](https://packagist.org/packages/omnipay/mollie)

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Mollie support for Omnipay.

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay` and `omnipay/mollie` with Composer:

```
composer require league/omnipay omnipay/mollie

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Mollie

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

### Basic purchase example

[](#basic-purchase-example)

```
$gateway = \Omnipay\Omnipay::create('Mollie');
$gateway->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$response = $gateway->purchase(
    [
        "amount" => "10.00",
        "currency" => "EUR",
        "description" => "My first Payment",
        "returnUrl" => "https://webshop.example.org/mollie-return.php"
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Payment was successful
    print_r($response);

} elseif ($response->isRedirect()) {

    // Redirect to offsite payment gateway
    $response->redirect();

} else {

    // Payment failed
    echo $response->getMessage();
}
```

### Example using the Order API

[](#example-using-the-order-api)

1. Create the order and pass the order items in the parameters.

```
$response = $gateway->createOrder(
    [
           'amount'       => '1027.99',
            'currency'     => 'EUR',
            'orderNumber'  => '1337',
            'lines'        => [
                [
                    'type' => 'physical',
                    'sku' => '5702016116977',
                    'name' => 'LEGO 42083 Bugatti Chiron',
                    'productUrl' => 'https://shop.lego.com/nl-NL/Bugatti-Chiron-42083',
                    'imageUrl' => 'https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$',
                    'quantity' => 2,
                    'vatRate' => '21.00',
                    'unitPrice' => '399.00',
                    'totalAmount' => '698.00',
                    'discountAmount' => '100.00',
                    'vatAmount' => '121.14',
                ],
                [
                    'type' => 'physical',
                    'sku' => '5702015594028',
                    'name' => 'LEGO 42056 Porsche 911 GT3 RS',
                    'productUrl' => 'https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056',
                    'imageUrl' => 'https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$',
                    'quantity' => 1,
                    'vatRate' => '21.00',
                    'unitPrice' => '329.99',
                    'totalAmount' => '329.99',
                    'vatAmount' => '57.27',
                ]
            ],
            'card' => [
                'company' => 'Mollie B.V.',
                'email' => 'norris@chucknorrisfacts.net',
                'birthday' => '1958-01-31',
                'billingTitle' => 'Dhr',
                'billingFirstName' => 'Piet',
                'billingLastName' => 'Mondriaan',
                'billingAddress1' => 'Keizersgracht 313',
                'billingCity' => 'Amsterdam',
                'billingPostcode' => '1234AB',
                'billingState' => 'Noord-Holland',
                'billingCountry' => 'NL',
                'billingPhone' => '+31208202070',
                'shippingTitle' => 'Mr',
                'shippingFirstName' => 'Chuck',
                'shippingLastName' => 'Norris',
                'shippingAddress1' => 'Prinsengracht 313',
                'shippingAddress2' => '4th floor',
                'shippingCity' => 'Haarlem',
                'shippingPostcode' => '5678AB',
                'shippingState' => 'Noord-Holland',
                'shippingCountry' => 'NL',
            ],
            'metadata' => [
                'order_id' => '1337',
                'description' => 'Lego cars',
            ],
            'locale' => 'nl_NL',
            'returnUrl'    => 'https://example.org/redirect',
            'notifyUrl'    => 'https://example.org/webhook',
            'paymentMethod' => 'klarnapaylater',
            'billingEmail' => 'piet@mondriaan.com',
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Payment was successful
    print_r($response);

} elseif ($response->isRedirect()) {

    // Redirect to offsite payment gateway
    $response->redirect();

} else {

    // Payment failed
    echo $response->getMessage();
}
```

2. On return/notify, complete the order. This will not always be completed, because for Klarna the shipments needs to be created first.

```
$response = $gateway->completeOrder(
    [
        "transactionReference" => "ord_xxxx",
    ]
)->send();
```

3. When shipping the items, create the shipment for this order. You can leave the `items` emtpy to ship all items.

```
$response = $gateway->createShipment(
    [
        "transactionReference" => "ord_xxx",
        'items' => [
            [
                'id' => 'odl_xxx',
                'quantity' => 1,
            ]
        ]
    ]
)->send();
```

4. As long as the order is `created`, `authorized` or `shipping`, it may be cancelled (voided)

```
$response = $gateway->void(["transactionReference" => "ord_xxx"])->send();
```

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/thephpleague/omnipay-mollie/issues), or better yet, fork the library and submit a pull request.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance52

Moderate activity, may be stable

Popularity56

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity78

Established project with proven stability

 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 ~127 days

Total

26

Last Release

1371d ago

Major Versions

v2.0.2 → v3.0.02014-04-14

v3.2.0 → v4.0-alpha.12018-03-20

v4.0.1 → v5.0.02018-07-24

PHP version history (2 changes)v5.4.0PHP ^7.3|^8.0

v5.4.1PHP ^7.2|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/534693?v=4)[Frank de Jonge](/maintainers/frankdejonge)[@frankdejonge](https://github.com/frankdejonge)

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

![](https://www.gravatar.com/avatar/12d34e4d0259dc2a2460d2803beeffb06e778064b93cac1b8f289f2d7e13b23f?d=identicon)[greydnls](/maintainers/greydnls)

---

Top Contributors

[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (61 commits)")[![amacneil](https://avatars.githubusercontent.com/u/637671?v=4)](https://github.com/amacneil "amacneil (37 commits)")[![bouke-nederstigt](https://avatars.githubusercontent.com/u/3441985?v=4)](https://github.com/bouke-nederstigt "bouke-nederstigt (15 commits)")[![greydnls](https://avatars.githubusercontent.com/u/1276798?v=4)](https://github.com/greydnls "greydnls (8 commits)")[![rudott](https://avatars.githubusercontent.com/u/1164638?v=4)](https://github.com/rudott "rudott (8 commits)")[![frederikbosch](https://avatars.githubusercontent.com/u/1552577?v=4)](https://github.com/frederikbosch "frederikbosch (6 commits)")[![jarnovanleeuwen](https://avatars.githubusercontent.com/u/1358997?v=4)](https://github.com/jarnovanleeuwen "jarnovanleeuwen (5 commits)")[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (5 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (4 commits)")[![eileenmcnaughton](https://avatars.githubusercontent.com/u/336308?v=4)](https://github.com/eileenmcnaughton "eileenmcnaughton (4 commits)")[![larsjeh](https://avatars.githubusercontent.com/u/129921?v=4)](https://github.com/larsjeh "larsjeh (4 commits)")[![emielmolenaar](https://avatars.githubusercontent.com/u/2470795?v=4)](https://github.com/emielmolenaar "emielmolenaar (3 commits)")[![nvindice](https://avatars.githubusercontent.com/u/18614852?v=4)](https://github.com/nvindice "nvindice (3 commits)")[![delatbabel](https://avatars.githubusercontent.com/u/2335362?v=4)](https://github.com/delatbabel "delatbabel (3 commits)")[![robin-mollie](https://avatars.githubusercontent.com/u/20555147?v=4)](https://github.com/robin-mollie "robin-mollie (3 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (3 commits)")[![Fuhrmann](https://avatars.githubusercontent.com/u/1160365?v=4)](https://github.com/Fuhrmann "Fuhrmann (2 commits)")[![WHITE-developer](https://avatars.githubusercontent.com/u/22771556?v=4)](https://github.com/WHITE-developer "WHITE-developer (1 commits)")[![adronitis](https://avatars.githubusercontent.com/u/1169705?v=4)](https://github.com/adronitis "adronitis (1 commits)")[![Archanium](https://avatars.githubusercontent.com/u/295426?v=4)](https://github.com/Archanium "Archanium (1 commits)")

---

Tags

paymentgatewaymolliepaymerchantomnipay

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1017.2k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

154.6k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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