PHPackages                             kayintveen/laravel-paynl - 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. kayintveen/laravel-paynl

ActiveLibrary[Payment Processing](/categories/payments)

kayintveen/laravel-paynl
========================

A clean and professional Laravel wrapper for Pay.nl payment gateway integration

v1.0.2(7mo ago)061MITPHPPHP ^8.1|^8.2|^8.3CI passing

Since Oct 8Pushed 4mo agoCompare

[ Source](https://github.com/kayintveen/laravel-pay-nl)[ Packagist](https://packagist.org/packages/kayintveen/laravel-paynl)[ RSS](/packages/kayintveen-laravel-paynl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Laravel Pay.nl Wrapper
======================

[](#laravel-paynl-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/229480868f7c95119bfc567d81d21c3fe0c52d4c85f40ed72cfb53f8a9f720b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6179696e747665656e2f6c61726176656c2d7061796e6c)](https://packagist.org/packages/kayintveen/laravel-paynl)[![Total Downloads](https://camo.githubusercontent.com/788edf0de777ae7e263c4b8b69e87307fb3579dda5c1e77bda23bbad2f64d7ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6179696e747665656e2f6c61726176656c2d7061796e6c)](https://packagist.org/packages/kayintveen/laravel-paynl)[![License](https://camo.githubusercontent.com/a365cb6f6e203c671227dfa67d4865f178a539e247d5b2a179e5c0f247f7d675/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b6179696e747665656e2f6c61726176656c2d7061796e6c)](https://packagist.org/packages/kayintveen/laravel-paynl)

A clean, modern, and professional Laravel wrapper for the [Pay.nl](https://www.pay.nl) payment gateway. This package provides a fluent interface for integrating Pay.nl payments into your Laravel 11 and Laravel 12 applications.

Features
--------

[](#features)

- ✅ **Laravel 11 &amp; 12 Compatible** - Full support for the latest Laravel versions
- 🚀 **Easy Installation** - Auto-discovery for seamless integration
- 🎯 **Fluent API** - Clean and intuitive method chaining
- 🔒 **Type-Safe** - Full PHP 8.1+ type hints and return types
- 🧪 **Test Mode Support** - Easy testing without real transactions
- 📦 **Comprehensive Coverage** - Transactions, refunds, payment methods, and QR codes
- 🎨 **Laravel Pint Ready** - Code formatted to Laravel standards
- 🛡️ **Exception Handling** - Clear error messages for debugging

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 11.0 or 12.0
- Pay.nl account with API credentials

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

[](#installation)

Install the package via Composer:

```
composer require kayintveen/laravel-paynl
```

The service provider and facade are automatically registered via Laravel's package auto-discovery.

### Configuration

[](#configuration)

Publish the configuration file (optional):

```
php artisan vendor:publish --tag=paynl-config
```

Add your Pay.nl credentials to your `.env` file:

```
PAYNL_TOKEN_CODE=your-token-code
PAYNL_API_TOKEN=your-api-token
PAYNL_SERVICE_ID=your-service-id
PAYNL_TESTMODE=false
```

You can find your API credentials in your [Pay.nl dashboard](https://admin.pay.nl) under Settings &gt; API tokens.

Usage
-----

[](#usage)

### Starting a Transaction

[](#starting-a-transaction)

```
use Kayintveen\LaravelPayNL\Facades\PayNL;

$transaction = PayNL::startTransaction([
    'amount' => 10.00,
    'returnUrl' => route('payment.return'),
    'exchangeUrl' => route('payment.webhook'),
    'description' => 'Order #12345',
    'enduser' => [
        'emailAddress' => 'customer@example.com',
        'initials' => 'J',
        'lastName' => 'Doe',
    ],
]);

// Redirect to payment URL
return redirect($transaction->getRedirectUrl());
```

### Getting Transaction Info

[](#getting-transaction-info)

```
$transaction = PayNL::getTransaction('1234567890X12ab34');

echo $transaction->isPaid() ? 'Paid' : 'Not paid';
```

### Checking Transaction Status

[](#checking-transaction-status)

```
$status = PayNL::getTransactionStatus('1234567890X12ab34');

if ($status->isPaid()) {
    // Payment successful
}
```

### Refunding a Transaction

[](#refunding-a-transaction)

```
// Full refund
$refund = PayNL::refundTransaction('1234567890X12ab34');

// Partial refund (amount in cents)
$refund = PayNL::refundTransaction(
    transactionId: '1234567890X12ab34',
    amount: 500, // €5.00
    description: 'Partial refund for order #12345'
);
```

### Getting Available Payment Methods

[](#getting-available-payment-methods)

```
$paymentMethods = PayNL::getPaymentMethods();

foreach ($paymentMethods as $method) {
    echo $method['name'];
}
```

### Managing Transactions

[](#managing-transactions)

```
// Approve a transaction
PayNL::approveTransaction('1234567890X12ab34');

// Decline a transaction
PayNL::declineTransaction('1234567890X12ab34');

// Void a transaction
PayNL::voidTransaction('1234567890X12ab34');

// Capture a transaction
PayNL::captureTransaction('1234567890X12ab34');
```

### Getting QR Code

[](#getting-qr-code)

```
$qr = PayNL::getQrCode('1234567890X12ab34');

echo $qr->getQrUrl(); // URL to QR code image
```

### Using Dependency Injection

[](#using-dependency-injection)

Instead of the facade, you can also inject the `PayNLClient` directly:

```
use Kayintveen\LaravelPayNL\PayNL;

class PaymentController extends Controller
{
    public function __construct(
        protected PayNL $payNL
    ) {}

    public function createPayment()
    {
        $transaction = $this->payNL->startTransaction([
            'amount' => 10.00,
            // ...
        ]);

        return redirect($transaction->getRedirectUrl());
    }
}
```

Available Methods
-----------------

[](#available-methods)

### Transaction Methods

[](#transaction-methods)

MethodDescription`startTransaction(array $options)`Start a new payment transaction`getTransaction(string $transactionId)`Get transaction details`getTransactionStatus(string $transactionId)`Get transaction status`approveTransaction(string $transactionId)`Approve a transaction`declineTransaction(string $transactionId)`Decline a transaction`voidTransaction(string $transactionId)`Void a transaction`captureTransaction(string $transactionId, ?array $options)`Capture a transaction### Refund Methods

[](#refund-methods)

MethodDescription`refundTransaction(string $transactionId, ?int $amount, ?string $description, ?array $options)`Refund a transaction`getRefund(string $refundId)`Get refund details### Payment Methods

[](#payment-methods)

MethodDescription`getPaymentMethods()`Get available payment methods### QR Code Methods

[](#qr-code-methods)

MethodDescription`getQrCode(string $transactionId, array $options)`Get QR code for transaction### Utility Methods

[](#utility-methods)

MethodDescription`getServiceId()`Get configured service ID`isTestMode()`Check if test mode is enabledTesting
-------

[](#testing)

Enable test mode in your `.env`:

```
PAYNL_TESTMODE=true
```

In test mode, no real transactions will be processed.

Exception Handling
------------------

[](#exception-handling)

The package throws `PayNLException` when operations fail:

```
use Kayintveen\LaravelPayNL\Exceptions\PayNLException;

try {
    $transaction = PayNL::startTransaction($options);
} catch (PayNLException $e) {
    Log::error('Payment failed: ' . $e->getMessage());

    return back()->with('error', 'Payment could not be processed');
}
```

Code Quality
------------

[](#code-quality)

This package follows Laravel coding standards and is formatted with [Laravel Pint](https://laravel.com/docs/pint):

```
composer require laravel/pint --dev
./vendor/bin/pint
```

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kay in 't Veen](https://github.com/kayintveen)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

About Pay.nl
------------

[](#about-paynl)

[Pay.nl](https://www.pay.nl) is a payment service provider that offers various payment methods including iDEAL, credit cards, PayPal, and many more. This package provides a Laravel-friendly wrapper around their PHP SDK.

Support
-------

[](#support)

- [Documentation](https://github.com/kayintveen/laravel-paynl)
- [Pay.nl Documentation](https://docs.pay.nl)
- [Issue Tracker](https://github.com/kayintveen/laravel-paynl/issues)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for recent changes.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance70

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Total

3

Last Release

217d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a93ba47645a5d56f718fff5206ea411f453e01fcf807c36afe51afbd73d843d?d=identicon)[kayintveen](/maintainers/kayintveen)

---

Top Contributors

[![kayintveen](https://avatars.githubusercontent.com/u/1884283?v=4)](https://github.com/kayintveen "kayintveen (7 commits)")

---

Tags

phplaravellaravel 11laravel 12paymentgatewaypay.nl

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kayintveen-laravel-paynl/health.svg)

```
[![Health](https://phpackages.com/badges/kayintveen-laravel-paynl/health.svg)](https://phpackages.com/packages/kayintveen-laravel-paynl)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[baklysystems/laravel-paymob

Laravel PayMob online payment gateway package

282.4k](/packages/baklysystems-laravel-paymob)

PHPackages © 2026

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