PHPackages                             jesobreira/bankly - 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. jesobreira/bankly

ActiveLibrary[API Development](/categories/api)

jesobreira/bankly
=================

PHP SDK for Bankly (Acesso)

2.0.3(5y ago)128MITPHP

Since Apr 30Pushed 5y agoCompare

[ Source](https://github.com/jesobreira/bankly-php)[ Packagist](https://packagist.org/packages/jesobreira/bankly)[ RSS](/packages/jesobreira-bankly/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)DependenciesVersions (5)Used By (0)

Bankly (Acesso)
===============

[](#bankly-acesso)

Unnofficial PHP class to access [Bankly](http://bankly.com.br/) (by [Acesso](https://www.meuacesso.com.br/)) API.

[API Docs here.](https://bankly.readme.io/)

[Javascript port here.](https://github.com/jesobreira/bankly-js)

Usage
-----

[](#usage)

Authentication and token refreshing is handled by the class itself.

Start by including the class and creating an instance supplying your client\_id and client\_secret provided by Acesso.

```
composer require jesobreira/bankly

```

```
use BanklyPHP\Bankly;
use BanklyPHP\BankAccount;
```

```
$bankly = new Bankly('client_id', 'client_secret');
```

### Getting account balance

[](#getting-account-balance)

Provide the branch and account number (without hyphen) to get the balance.

```
$bankly->getBalance('0001', '1234');
```

This method returns [a JSON object](https://bankly.readme.io/reference#accountbalance).

### Getting account statement

[](#getting-account-statement)

Provide:

- Branch (string)
- Account number (string)
- Offset (number, starts at 0)
- Limit (number, `> 0`)
- Details (optional, boolean, default true)
- DetailsLevelBasic (optional, boolean, default true)

```
$bankly->getStatement('0001', '1234', 0, 10);
```

This method returns [a JSON object](https://bankly.readme.io/reference#accountstatement).

### Getting account events

[](#getting-account-events)

Provide:

- Branch (string)
- Account number (string)
- Page (number, starts at 1)
- Pagesize (number, `> 0`)
- IncludeDetails (optional, boolean, default true)

```
$bankly->getEvents('0001', '1234', 1, 10);
```

This method returns [a JSON object](https://bankly.readme.io/reference#events).

### Performing transfers

[](#performing-transfers)

**Note**: this method causes subtraction of real money.

In order to specify an origin and destination bank account, you must create two BankAccount objects.

A bank account instance must be created receiving an object with the following properties:

- **branch** (string): account branch
- **account** (string): account number (no hyphen)
- **document** (string): account holder's CPF or CNPJ (numbers only)
- **name** (string): account holder name
- **bankCode** (string, optional): bank code (see below, defaults to Acesso's 332)

Then you will use the `transfer()` method to perform the actual transfer, providing:

- The amount in *centavos* (1 BRL = 100 centavos)
- Reference or description (human-readable string)
- Sender (a BankAccount object)
- Recipient (a BankAccount Object)

Example:

```
$from = new BankAccount;
$from->branch = '0001';
$from->account = '1234';
$from->document = '00000000000000';
$from->name = 'Company LTDA';

$to = new BankAccount;
$to->bankCode = '123';
$to->branch = '1234';
$to->account = '12345';
$to->document = '00000000000';
$to->name = 'John Doe';

// transfer BRL 5 (R$ 5)
$bankly->transfer(500, 'test', $from, $to);
```

This method returns [an object](https://bankly.readme.io/reference#testinput). This object contains an "authenticationCode" property with a string, with a reference code for the transaction that you will use to check its status later.

### Getting transfer status

[](#getting-transfer-status)

Use the following method to retrieve a transaction's status. You will need to provide:

- The origin branch
- The origin account number
- The AuthenticationId (that you receive as `authenticationCode` from the `transfer` method)

```
$bankly->getTransferStatus('0001', '1234', 'AuthenticationId');
```

This method returns [a JSON object](https://bankly.readme.io/reference#testinput-1).

### Getting banks list

[](#getting-banks-list)

You can get a list of banks and payment institutions with respective codes from the Central Bank (Bacen). No authentication is needed. You can either call this getter from your instance:

```
$banks = bankly->bankList;
```

Or use this static method directly (no class instancing needed):

```
$banks = Bankly::bankList();
```

This returns [a JSON array](https://bankly.readme.io/reference#banklist). You can also perform this request using your browser by [clicking here](https://api.bankly.com.br/baas/banklist).

### Debugging

[](#debugging)

You can define a function that receives debug logs (as strings) from your instance of the class.

```
$bankly.debug = function ($msg) {
	echo $msg . "\r\n";
};
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Total

4

Last Release

1898d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cad19dafdf9bb28fd1bf74a734f4c8d7aabf3abdaa67879ca07126cecf7afc8?d=identicon)[jesobreira](/maintainers/jesobreira)

---

Top Contributors

[![jesobreira](https://avatars.githubusercontent.com/u/3002249?v=4)](https://github.com/jesobreira "jesobreira (7 commits)")

---

Tags

Bankbaas

### Embed Badge

![Health badge](/badges/jesobreira-bankly/health.svg)

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

###  Alternatives

[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M26](/packages/azuyalabs-yasumi)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[starkbank/sdk

SDK to facilitate PHP integrations with Stark Bank

15167.8k](/packages/starkbank-sdk)[stichoza/nbg-currency

National Bank of Georgia (NBG) currency service API wrapper

2925.2k1](/packages/stichoza-nbg-currency)[bornfight/erste-bank-client

Client written in PHP for Erste Bank API

106.1k](/packages/bornfight-erste-bank-client)[paybook/sync-php

A package to consume Syncfy REST for humans without pain

114.0k](/packages/paybook-sync-php)

PHPackages © 2026

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