PHPackages                             adman9000/gocardless-laravel - 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. adman9000/gocardless-laravel

ActiveLibrary[API Development](/categories/api)

adman9000/gocardless-laravel
============================

GoCardless Pro PHP Client package integration for Laravel.

v0.1.1(2y ago)041MITPHPPHP &gt;=8.2

Since Jan 26Pushed 2y agoCompare

[ Source](https://github.com/adman9000/gocardless-laravel)[ Packagist](https://packagist.org/packages/adman9000/gocardless-laravel)[ RSS](/packages/adman9000-gocardless-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

gocardless-laravel
==================

[](#gocardless-laravel)

[![Build Status](https://camo.githubusercontent.com/d495dc6377d311b9c5860b813574bce23c9d7a3c96ba245b8479478695f8f54e/68747470733a2f2f7472617669732d63692e636f6d2f4e65737465646e65742f676f636172646c6573732d6c61726176656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Nestednet/gocardless-laravel)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/059f3d079aa897e1a1cb8b828f45fc1c837f8f008ddf10edc144f8237d734f80/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e65737465646e65742f676f636172646c6573732d6c61726176656c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Nestednet/gocardless-laravel/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/07cf863a31138d1c63006156e807ab070fcbbd2f1f6fad818e59b5c6b2c03a16/68747470733a2f2f706f7365722e707567782e6f72672f6e65737465646e65742f676f636172646c6573732d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/nestednet/gocardless-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/e1521a5b4a1fd13d58c3ae4357d9748067e9b8fe6ab670f019cc589d2a036764/68747470733a2f2f706f7365722e707567782e6f72672f6e65737465646e65742f676f636172646c6573732d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/nestednet/gocardless-laravel)[![License](https://camo.githubusercontent.com/d97e78ad3d3aff09c097683ce06c1c20258c9d304987c8fdad38112bda2180f3/68747470733a2f2f706f7365722e707567782e6f72672f6e65737465646e65742f676f636172646c6573732d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/nestednet/gocardless-laravel)

##### GoCardless Pro PHP Client package integration for Laravel.

[](#gocardless-pro-php-client-package-integration-for-laravel)

This package tries to provide an easy, scalable and maintainable way to integrate Gocardless into your laravel project.

It provides a Facade that wraps the Gocardless PHP client and also an easy way to handle the webhooks that Gocardless sends. This is done following the steps that [Spatie](https://spatie.be/opensource/php) uses for their [Stripe Laravel Webhooks package](https://github.com/spatie/laravel-stripe-webhooks).

##### Installation

[](#installation)

Get the package with composer:

```
composer require nestednet/gocardless-laravel
```

**1.** If you are using Laravel &gt;5.5 the package will be autodiscobered, for older versions add the service provider at your config/app.php file.

**2.** Publish the configuration file

```
$ php artisan vendor:publish --provider="Nestednet\Gocardless\GocardlessServiceProvider"
```

This will publish both the configuration file and the migration file.

**3.** Review the configuration file

```
config/gocardless.php

```

and add your Gocardless API token and environment to the `.env` file.

**4.** After publishing the migration you can run the migration and create the `gocardless_webhooks_table`

**5.** The package provides a Macro route (`gocardlessWebhooks`). You can create a route at your routes file of your app. This route will be the endpoint where Gocardless will send the webhooks, you should register this webhook endpoint at your Gocardless dashboard.

```
Route::gocardlessWebhooks('gocardless-webhook-endpoint');
```

This will register a `POST` route to a the controller provided by this package. You should add the route to the `except` array of the `VerifyCsrfToken` middleware.

```
protected $except = [
    'gocardless-webhook-endpoint',
];
```

##### Usage

[](#usage)

Once the package is properly installed you can use the `Gocardless` facade to access the methods of the Gocardless PHP client. The documentation of this methods can be found here: [Gocardless PHP cleint documentation](https://github.com/gocardless/gocardless-pro-php)

If you use Gocardless at your project you provably will use webhooks to handle the asynchronous payment states. This package provides an easy way to handle the webhooks.

Gocardless will send you webhooks with events. This events will contain the updates of your Gocardless resources.

This package will verify the signature of the requests and if it's valid. Unless something goes terribly wrong, and even if one of the events inside the webhook fails the controller will reposnd with a `200` to Gocardless. This prevents Gocardless from spamming retries to the endpoint.

If an event fails to be processed the exception will be saved to the database into the `gocardless_webhook_calls` table, you can find the failed events there.

This package provides two ways to handle the webhook requests:

- Using jobs
- Using events

##### Using jobs

[](#using-jobs)

You can find a jobs array inside the `config\gocardless.php`.

You can register any job that you want to the gocardless events. An event from Gocardless references one resource `resource_type` and one `action`. In order to register a job to an action you should add it with the key `{resource_type}_{action}`.

```
'jobs' => [
 // '{resource_type}_{action} => path/to/job::class,
    'payments_created' => App\Jobs\PaymentConfirmed::class,
]
```

In order to avoid timeouts it's highly recommended to use queued jobs.

##### Using events

[](#using-events)

Every time an event is processed by the package it will trigger an event with this structure:

`gocardless-webhooks::{resource_type}_{action}`

The payload of the event will be the `GocardlessWebhookCall` (or an extended model) instance created with the request.

You can register listeners to this events in the `EventServiceProvider`:

```
/**
 * The event listener mappings for the application.
 *
 * @var array
 */
protected $listen = [
    'gocardless-webhooks::payments_created' => [
        App\Listeners\ListenerOfPaymentsCreated::class,
    ],
];
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.4% 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

2

Last Release

837d ago

### Community

Maintainers

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

---

Top Contributors

[![eaarranz](https://avatars.githubusercontent.com/u/20563513?v=4)](https://github.com/eaarranz "eaarranz (42 commits)")[![adman9000](https://avatars.githubusercontent.com/u/4179099?v=4)](https://github.com/adman9000 "adman9000 (12 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

phplaravelgocardlessnestednet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adman9000-gocardless-laravel/health.svg)

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

###  Alternatives

[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[nestednet/gocardless-laravel

GoCardless Pro PHP Client package integration for Laravel.

1316.4k](/packages/nestednet-gocardless-laravel)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[madeitbelgium/wordpress-php-sdk

WordPress Laravel PHP SDK

4422.9k1](/packages/madeitbelgium-wordpress-php-sdk)[dystcz/lunar-api

Dystore API layer for Lunar e-commerce package

411.1k3](/packages/dystcz-lunar-api)

PHPackages © 2026

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