Laravel wrapper for the Paymill API

1.3.2 2016-09-30 16:20 UTC

This package is auto-updated.

Last update: 2021-05-19 02:30:05 UTC


Build Status Latest Stable Version Packagist Packagist

Laravel Paymill is a Laravel 5 specific wrapper for the Paymill PHP library.

Please use the 1.0.0 release for Laravel 4


Simply add the following line to your composer.json and run install/update:

"threesquared/laravel-paymill": "~1.3"


Publish the package config files to configure your api keys:

php artisan vendor:publish

You will also need to add the service provider and the facade alias to your config/app.php:

'providers' => array(

'aliases' => array(
  'Paymill'   => Threesquared\LaravelPaymill\Facades\Paymill::class

By default the package will use your test keys. In order to use the live Paymill keys you need to set the PAYMILL_ENV enviroment variable.



Please see the Paymill API for full documentation on all available entities, actions and methods.

First start with instantiating the Paymill entity you want to work with.

$transaction = Paymill::Transaction();

Available entities are:

Then add in any additional information the request requires with setter methods.

    ->setDescription('Test Transaction');

Finally chose which action you want to perform.


Available actions are:

  • create()
  • details()
  • update()
  • all()
  • delete()

So an example to create a transaction would be:

try {

        ->setDescription('Test Transaction')

} catch(PaymillException $e) {



You can set the ID of an entity by passing it as an argument.


Payment create can also take the token as an argument.


You can also use the $paymill_public_key variable across all blade views.

<script type="text/javascript">
  var PAYMILL_PUBLIC_KEY = '{{ $paymill_public_key }}';