PHPackages                             niceperson/truelayer - 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. niceperson/truelayer

ActiveLibrary[API Development](/categories/api)

niceperson/truelayer
====================

v2.0.5(5y ago)0620MITPHPPHP &gt;=7.0.0CI failing

Since May 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/niceperson/truelayer)[ Packagist](https://packagist.org/packages/niceperson/truelayer)[ RSS](/packages/niceperson-truelayer/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (10)Used By (0)

Truelayer Helper
================

[](#truelayer-helper)

requesting Truelayer API made simple

Usage
=====

[](#usage)

```
use Niceperson\Truelayer\Authorization;
use Niceperson\Truelayer\Credentials;
use Niceperson\Truelayer\Request;
use Niceperson\Truelayer\Data;

// best if taken from .env below's example is to make life easier
defined('TRUELAYER_CLIENT_ID') or define('TRUELAYER_CLIENT_ID', 'xxxx');
defined('TRUELAYER_CLIENT_SECRET') or define('TRUELAYER_CLIENT_SECRET', 'yyyyy');
defined('TRUELAYER_REDIRECT_URI') or define('TRUELAYER_REDIRECT_URI', 'https://localhost:3000/callback');
defined('TRUELAYER_USE_SANDBOX') or define('TRUELAYER_USE_SANDBOX', 'true');

$credentials = new Credentials(
    TRUELAYER_CLIENT_ID,
    TRUELAYER_CLIENT_SECRET,
    TRUELAYER_REDIRECT_URI,
    TRUELAYER_USE_SANDBOX,  // this will add mock provider when generatingn auth link
);

$truelayer_request = new Request(['timeout' => 60]); // options as per Guzzle client
$auth = new Authorization($truelayer_request, $credentials, TRUELAYER_USE_SANDBOX);

// to generate auth link
$auth_link = $auth->getAuthLink();

// to exchange code
$token = $auth->getAccessToken($code); // $code given by truelayer

// to perform data request using token.
$data = new Data($truelayer_request, $token, TRUELAYER_USE_SANDBOX);

//------------------------------------------------------------| data requests

$result = $data->fetch('META_ME');
$result = $data->fetch('ACCT_LIST');
$result = $data->fetch('CARD_LIST');
$result = $data->fetch('ACCT_LIST');
$result = $data->fetch('CARD_LIST');
$result = $data->fetch('ACCT_VIEW', $account_id);
$result = $data->fetch('CARD_VIEW', $account_id);
$result = $data->fetch('ACCT_BALANCE', $account_id);
$result = $data->fetch('CARD_BALANCE', $account_id);
$result = $data->fetch('ACCT_TRANSACTIONS', $account_id);
$result = $data->fetch('CARD_TRANSACTIONS', $account_id);
$result = $data->fetch('ACCT_TRANSACTIONS_PENDING', $account_id);
$result = $data->fetch('CARD_TRANSACTIONS_PENDING', $account_id);
$result = $data->fetch('ACCT_DIRECT_DEBITS', $account_id);
$result = $data->fetch('ACCT_STANDING_ORDER', $account_id);

//------------------------------------------------------------| Payment requests

/*          PAYMENT is NOT Completed yet. will be done in next release        */
```

### Payment is in progress

[](#payment-is-in-progress)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

9

Last Release

2173d ago

Major Versions

v1.0.2 → v2.0.02020-06-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11325087?v=4)[Nice Person](/maintainers/niceperson)[@niceperson](https://github.com/niceperson)

---

Top Contributors

[![niceperson](https://avatars.githubusercontent.com/u/11325087?v=4)](https://github.com/niceperson "niceperson (16 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/niceperson-truelayer/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M971](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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