PHPackages                             mradhi/ibanfirst-sdk - 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. mradhi/ibanfirst-sdk

ActiveLibrary[API Development](/categories/api)

mradhi/ibanfirst-sdk
====================

iBanFirst PHP Client Library

1.0.5(5y ago)210MITPHPPHP &gt;=7.4

Since Aug 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mradhi/ibanfirst-sdk)[ Packagist](https://packagist.org/packages/mradhi/ibanfirst-sdk)[ Docs](https://ibanfirst.com/)[ RSS](/packages/mradhi-ibanfirst-sdk/feed)WikiDiscussions master Synced today

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

iBanFirst PHP client library
============================

[](#ibanfirst-php-client-library)

[![Build Status](https://camo.githubusercontent.com/1cc2dd2f9cd01d5d973041b9faf4c8864273a36a95baa6541fa7c315a9dea4dd/68747470733a2f2f7472617669732d63692e6f72672f6d72616468692f6962616e66697273742d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mradhi/ibanfirst-sdk)

A PHP client for interacting with the iBanFirst API.

- [Guide](https://api.ibanfirst.com/APIDocumentation/IbanfirstAPI/)
- [API Reference](https://api.ibanfirst.com/APIDocumentation/IbanfirstAPI/Endpoints/)

### Installation

[](#installation)

The recommended way to install `ibanfirst-sdk` is using [Composer](https://getcomposer.org/).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of `ibanfirst-sdk`.

```
php composer.phar require mradhi/ibanfirst-sdk
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

### Initialising A Client

[](#initialising-a-client)

Create a `IBanFirst\IBanFirst` instance, providing your credentials, and the environment you want to use. We strongly advise to store your credentials as an environment variable, rather than directly in your code. you can easily load the environment variables from a `.env` file by using something like [phpdotenv](https://github.com/vlucas/phpdotenv), though keep it out of version control!

```
$username = getenv('IBANFIRST_USERNAME');
$password = getenv('IBANFIRST_PASSWORD');

$client = new IBanFirst\IBanFirst(array(
    'username'    => $username,
    'password'    => $password,
    'environment' => IBanFirst\IBanFirstEnvironment::SANDBOX
));
```

The environment can either be `IBanFirst\IBanFirstEnvironment::SANDBOX` or `IBanFirst\IBanFirstEnvironment::LIVE`, depending on whether you want to use the sandbox or live API.

### GET requests

[](#get-requests)

You can make a request to get a list of resources using the `getList` method.

```
/**
 * @var IBanFirst\IBanFirst $client
 */
$client->wallets()->getList();
```

*Note: This README will use wallets throughout but each of the resources in the API is available in this library.*

If you need to pass any options, the last argument in `getList()` method is an array of options, check [HttpClient - Query String Parameters](https://symfony.com/doc/current/http_client.html#query-string-parameters)for more information, so in our case if we want to add some parameters to the URL, we can do so as below:

```
/**
 * @var IBanFirst\IBanFirst $client
 */
$wallets = $client->wallets()->getList(['query' => ['page' => 3]]);
```

A call to `getList()` returns an instance of `IBanFirst\Response\ListResponse`. You can use its `getRecords()`attribute to iterate through the results.

```
/**
 * @var IBanFirst\Response\ListResponse $wallets
 */
echo count($wallets->getRecords());

/** @var IBanFirst\Resources\Wallet $wallet */
foreach ($wallets->getRecords() as $wallet) {
  echo $wallet->bookingAmount->value;
}
```

In the case where a URL parameter is required, the method signature will contain the required arguments:

```
/**
 * @var IBanFirst\IBanFirst $client
 */
$wallet = $client->wallets()->getDetails('some_id');
echo $wallet->accountNumber;
```

As with `getList()`, the last argument can be options array, with any URL parameters given:

```
/**
 * @var IBanFirst\IBanFirst $client
 */
$client->wallets()->getDetails('some_id', ['query' => ['some_flag' => true]]);
```

### Handling Failures

[](#handling-failures)

When there is an error, the library will return a corresponding subclass of `IBanFirst\Exception\SDKException`, one of:

- `IBanFirst\Exception\AuthenticatorException` - The authenticator config is invalid
- `IBanFirst\Exception\ResourceException` - The call to a given resource is invalid
- `IBanFirst\Exception\ResponseException` - The response returned by the API is an error

### Tests

[](#tests)

1. Create a sandbox account on iBanFirst, check [iBanFirst API - Get started](https://api.ibanfirst.com/APIDocumentation/IbanfirstAPI/)
2. Create `tests/config.php` from `tests/config.php.dist` and edit it to add your credentials.
3. The tests can be executed by running this command from the root directory:

```
$ ./vendor/bin/phpunit
```

By default, the tests will send live HTTP requests to the iBanFirst API. If you are without an internet connection you can skip these tests by excluding the `client` group.

```
$ ./vendor/bin/phpunit --exclude-group client
```

### Perspective

[](#perspective)

- Behind the scene, this library uses the [HttpClient](https://github.com/symfony/http-client)component to communicate with the iBanFirst APIs, but you can use your own HttpClient which should implement `Symfony\Contracts\HttpClient\HttpClientInterface`, and then you can use it by configuring the `IBanFirst\IBanFirst` object as below:

```
/**
* @var Symfony\Contracts\HttpClient\HttpClientInterface $customClient
*/
$client = new IBanFirst\IBanFirst(array(
   // ... the required options here
   'http_client' => $customClient
));
```

Check [HttpClient - HttpPlug documentation](https://symfony.com/doc/current/http_client.html#httplug)for more information in this subject.

- Currently, the library supports only one authentication method `IBanFirst\Authenticator\UsernameTokenAuthenticator`, but it's built in a way that we can easily add more authenticators by just implementing the interface `IBanFirst\Authenticator\AuthenticatorInterface`.
- Currently, the library supports only two APIs services:

    - `IBanFirst\Service\WalletsService` - Service for interacting with **/wallets/** endpoints.
    - `IBanFirst\Service\FinancialMovementsService` - Service for interacting with **/financialMovements/** endpoints.

We can easily add more services to this wrapper, each service should extend `IBanFirst\Service\AbstractService` class, and the return value for each public method call should be an instance of `IBanFirst\Response\ListResponse`or `IBanFirst\Resources\AbstractResource`, this is so useful to ensure a great typehint.

Supporting PHP &gt;= 7.4
------------------------

[](#supporting-php--74)

This client library only supports the latest version PHP &gt;= 7.4 , Check [Supported Versions](https://www.php.net/supported-versions.php)for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

5

Last Release

2077d ago

### Community

Maintainers

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

---

Tags

apifinanceibanfirst

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mradhi-ibanfirst-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mradhi-ibanfirst-sdk/health.svg)](https://phpackages.com/packages/mradhi-ibanfirst-sdk)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[scheb/yahoo-finance-api

PHP library for accessing Yahoo Finance data

318204.8k5](/packages/scheb-yahoo-finance-api)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[bunq/sdk_php

bunq PHP SDK

89222.7k2](/packages/bunq-sdk-php)[jeffreyhyer/alpaca-trade-api-php

PHP SDK for the Alpaca trade API

285.0k](/packages/jeffreyhyer-alpaca-trade-api-php)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)

PHPackages © 2026

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