PHPackages                             karlsen-technologies/gocardless-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. karlsen-technologies/gocardless-php

ActiveLibrary[API Development](/categories/api)

karlsen-technologies/gocardless-php
===================================

Unofficial PHP package for using the GoCardless API

1.0.0(2y ago)06MITPHPPHP ^8.2

Since Oct 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/karlsen-technologies/gocardless-php)[ Packagist](https://packagist.org/packages/karlsen-technologies/gocardless-php)[ RSS](/packages/karlsen-technologies-gocardless-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Unofficial GoCardless PHP Library
=================================

[](#unofficial-gocardless-php-library)

This is an unofficial PHP library for the [GoCardless Bank Account Data API](https://gocardless.com/bank-account-data/).

It provides the same endpoints and uses the same arguments as the official api, see a full list of endpoints [here](https://developer.gocardless.com/bank-account-data/endpoints).

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

[](#requirements)

- **PHP:** 8.2 or above

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

[](#installation)

You can install the library using composer:

```
composer require karlsen-technologies/gocardless-php
```

Usage
-----

[](#usage)

In order to use this library you first need to setup an application and get your credentials from the [GoCardless Dashboard](https://bankaccountdata.gocardless.com/).

### Creating a client

[](#creating-a-client)

```
use KarlsenTechnologies\GoCardless\DataObjects\Api\Credentials;
use KarlsenTechnologies\GoCardless\Client;

$credentials = new Credentials('secret_id', 'secret_key');
$client = new Client($credentials);
```

### Using a client

[](#using-a-client)

See the official [API documentation](https://developer.gocardless.com/bank-account-data/endpoints) for a more detailed explanation of the endpoints and their arguments.

```
use KarlsenTechnologies\GoCardless\Client;

$client = new Client(...);

$client->getInstitutions();
$client->getInstitutions('COUNTRY');
$client->getInstitution('INSTITUTION_ID');

$client->getAgreements(); // Default limit of 100, offset of 0
$client->getAgreements(100, 10);  // Limit of 100, offset of 10
$client->getAgreement('AGREEMENT_ID');
$client->createAgreement('INSTIUTION_ID', 90, 90, ['SCOPES']);
$client->deleteAgreement('AGREEMENT_ID');
$client->acceptAgreement('AGREEMENT_ID', 'GoCardless-PHP', '127.0.0.1');

$client->getRequisitions(); // Default limit of 100, offset of 0
$client->getRequisitions(100, 10);  // Limit of 100, offset of 10
$client->getRequisition('REQUISITION_ID');
$client->createRequisition('http://localhost', 'INSTIUTION_ID', 'AGREEMENT_ID', 'REFRENCE', 'LANGUAGE', 'SSN', true, true);
$client->deleteRequisition('REQUISITION_ID');

$client->getAccount('ACCOUNT_ID');
$client->getAccountBalances('ACCOUNT_ID');
$client->getAccountDetails('ACCOUNT_ID');
$client->getAccountTransactions('ACCOUNT_ID', 'FROM_DATE', 'TO_DATE');
```

### Getting and setting the access and refresh tokens

[](#getting-and-setting-the-access-and-refresh-tokens)

If you want to get and set the authentication tokens you may do so like this. This is useful if you want to cache the tokens and reuse them so you don't have to authenticate every time you want to use the api.

**NOTE:** At the moment the library automatically authenticates when you try to use the API. There is currently no way to force the library to authenticate without using the API.

```
use KarlsenTechnologies\GoCardless\DataObjects\Api\Tokens;

$client = new Client(...);

$tokens = $client->getTokens();

$newTokens = new Tokens('access_token', 3600, 'refresh_token', 86400);

$client->setTokens($newTokens);
```

Testing
-------

[](#testing)

Run the tests using:

```
composer test
```

License
-------

[](#license)

This library is licensed under the [MIT License](LICENSE.md).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

954d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91ad58d83b0ffa6319fe3171b989c0b5c4d8f9c6df62b9d6242fe51754e528f2?d=identicon)[thomasakarlsen](/maintainers/thomasakarlsen)

---

Top Contributors

[![thomasakarlsen](https://avatars.githubusercontent.com/u/4692471?v=4)](https://github.com/thomasakarlsen "thomasakarlsen (35 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/karlsen-technologies-gocardless-php/health.svg)

```
[![Health](https://phpackages.com/badges/karlsen-technologies-gocardless-php/health.svg)](https://phpackages.com/packages/karlsen-technologies-gocardless-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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