PHPackages                             mmuodev/okra-php-wrapper - 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. mmuodev/okra-php-wrapper

ActiveLibrary[API Development](/categories/api)

mmuodev/okra-php-wrapper
========================

PHP Wrapper for Okra

41593[2 issues](https://github.com/mmuoDev/okra-php-wrapper/issues)[2 PRs](https://github.com/mmuoDev/okra-php-wrapper/pulls)PHP

Since Jul 11Pushed 3y ago3 watchersCompare

[ Source](https://github.com/mmuoDev/okra-php-wrapper)[ Packagist](https://packagist.org/packages/mmuodev/okra-php-wrapper)[ RSS](/packages/mmuodev-okra-php-wrapper/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

okra-php-wrapper
================

[](#okra-php-wrapper)

A PHP Wrapper for [Okra](https://okra.ng/)

[![drawing](https://camo.githubusercontent.com/7adcd154aa35147538ee4c660ed1357e9ffd340972930005525f6a77abfb1bd2/68747470733a2f2f7062732e7477696d672e636f6d2f70726f66696c655f696d616765732f313139393637373734353236323938393331342f5f44326a414d62755f343030783430302e6a7067)](https://camo.githubusercontent.com/7adcd154aa35147538ee4c660ed1357e9ffd340972930005525f6a77abfb1bd2/68747470733a2f2f7062732e7477696d672e636f6d2f70726f66696c655f696d616765732f313139393637373734353236323938393331342f5f44326a414d62755f343030783430302e6a7067)

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

[](#requirements)

- guzzlehttp/guzzle: ~6.0
- PHP 7.0 or more recent

Install
-------

[](#install)

### Via Composer

[](#via-composer)

```
$ composer require mmuodev/okra-php-wrapper
```

Usage
-----

[](#usage)

The wrapper provides a simple interface to use Okra's core products - Auth, Identity, Balance and Transaction. Each of these products are represented by its own trait. You need to initiate the `Client` class (and pass your Okra's bearer token), to access methods of these traits. All methods return an array, thus making it easy to use in your application.

```
$client = new Client(BEARER_TOKEN)
```

### 1. Auth

[](#1-auth)

Okra offers a path for a customer to successfully verify their bank. The customer enters their credentials and are authenticated immediately.

#### a. Get all Auth

[](#a-get-all-auth)

This returns auth information in an array or pdf format for all customers.

```
$client->getAllAuth();
```

> Optional: Pass the boolean value `true` to return the data in pdf format

#### b. Get Auth for a customer

[](#b-get-auth-for-a-customer)

This returns auth information for a cutomer using auth id

```
$client->getAuthById();
```

> Required: Pass the `auth id`

#### c. Get Auth by customer id

[](#c-get-auth-by-customer-id)

This returns auth information for a cutomer using customer id

```
$client->getAuthByCustomerId();
```

> Required: Pass the `customer id`

#### d. Get Auth by date range

[](#d-get-auth-by-date-range)

This returns auth information based on date range they were created.

```
$client->getAuthByDateRange(from, to);
```

> Method expects 5 parameters - first 2 are required while last 3 optional. The first 2 parameters - `from` and `to` are the date ranges in this format `2020-05-10`.
> Pass the boolean value `true` for the third parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

> For example, to fetch all auth records between `2020-05-01` and `2020-05-20`, you do this:

```
$client->getAuthByDateRange('2020-05-01', '2020-05-20', true)
```

> To fetch only page 2 and limit the number of records to 10 for the same date range as above, you do this:

```
$client->getAuthByDateRange('2020-05-01', '2020-05-20', ,2,10)
```

### 2. Transaction

[](#2-transaction)

Receive customer-authorized transaction data for current, savings, and domiciliary Accounts.

#### a. Get all Transactions

[](#a-get-all-transactions)

This returns summarized info on the transactions in an array or pdf format.

```
$client->getTransactions();
```

> Optional: Pass the boolean value `true` to return the data in pdf format

#### b. Get transactions for a customer

[](#b-get-transactions-for-a-customer)

This returns transactions for a particular customer

```
$client->getTransactionsPerCustomer(customer_id);
```

> Method expects 4 parameters - first is required while last 3 optional. The first - `customer_id` is the `id` of the customer returned from the previous method.
> Pass the boolean value `true` for the second parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

#### c. Get Transactions by date range

[](#c-get-transactions-by-date-range)

This returns transactions filtered by date range

```
$client->getTransactionsByDateRange();
```

> Method expects 5 parameters - first 2 are required while last 3 optional. The first 2 parameters - `from` and `to` are the date ranges in this format `2020-05-10`.
> Pass the boolean value `true` for the third parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

> For example, to fetch all transaction records between `2020-05-01` and `2020-05-20`, you do this:

```
$client->getTransactionsByDateRange('2020-05-01', '2020-05-20', true)
```

> To fetch only page 2 and limit the number of records to 10 for the same date range as above, you do this:

```
$client->getTransactionsByDateRange('2020-05-01', '2020-05-20', ,2,10)
```

#### d. Get Transactions per bank

[](#d-get-transactions-per-bank)

This returns transactions filtered by bank

```
$client->getTransactionsPerBank(bank_id);
```

> Method expects 4 parameters - first is required while last 3 optional. The first - `bank_id` is the id of the bank. Each bank has a unique id.
> Pass the boolean value `true` for the second parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

#### e. Get Spending Pattern

[](#e-get-spending-pattern)

This returns spending pattern for a cutomer using customer id

```
$client->getSpendingPatternPerCustomer(customer_id);
```

> Required: Pass the `customer id`

### 3. Identity

[](#3-identity)

Retrieve various account holder information on file with the bank, including names, emails, phone numbers, and addresses

#### a. Get all Identities

[](#a-get-all-identities)

This returns identities' information in an array or pdf format for all customers.

```
$client->getIdentities();
```

> Optional: Pass the boolean value `true` to return the data in pdf format

#### b. Get Identity for a customer using `id`

[](#b-get-identity-for-a-customer-using-id)

This returns identity information using `id` returned from the above method.

```
$client->getIdentityById(id);
```

> Required: Pass the `identity id`

#### c. Get Identity for a customer using `customer id`

[](#c-get-identity-for-a-customer-using-customer-id)

This returns identity information for a customer using customer id.

```
$client->getIdentityByCustomerId(customer_id);
```

> Required: Pass the `customer_id`

#### d. Get Identity by date range

[](#d-get-identity-by-date-range)

This returns identity information based on date range they were created.

```
$client->getIdentityByDateRange(from, to);
```

> Method expects 5 parameters - first 2 are required while last 3 optional. The first 2 parameters - `from` and `to` are the date ranges in this format `2020-05-10`.
> Pass the boolean value `true` for the third parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

> For example, to fetch all records between `2020-05-01` and `2020-05-20`, you do this:

```
$client->getIdentityByDateRange('2020-05-01', '2020-05-20', true)
```

> To fetch only page 2 and limit the number of records to 10 for the same date range as above, you do this:

```
$client->getIdentityByDateRange('2020-05-01', '2020-05-20', ,2,10)
```

### 4. Balance

[](#4-balance)

Retrieve retrieve the real-time balance for each of a record's accounts.

#### a. Get all Balances

[](#a-get-all-balances)

This returns balance information in an array or pdf format for all customers.

```
$client->getAllBalance();
```

> Optional: Pass the boolean value `true` to return the data in pdf format

#### b. Get balance for a customer using `id`

[](#b-get-balance-for-a-customer-using-id)

This returns balance information using `id` returned from the above method.

```
$client->getBalanceById(id);
```

> Required: Pass the `balance id`

#### c. Get balance for a customer using `customer id`

[](#c-get-balance-for-a-customer-using-customer-id)

This returns balance information for a customer using customer id.

```
$client->getBalanceByCustomerId(customer_id);
```

> Required: Pass the `customer_id`

#### d. Get balance by date range

[](#d-get-balance-by-date-range)

This returns balance information based on date range they were created.

```
$client->getBalanceByDateRange(from, to);
```

> Method expects 5 parameters - first 2 are required while last 3 optional. The first 2 parameters - `from` and `to` are the date ranges in this format `2020-05-10`.
> Pass the boolean value `true` for the third parameter to return all records. Ignore to return one page.
> The penultimate and last parameters - `page` and `limit` are integers stating the `page` number you wish to return and the number of records - limit - to return on this page. Ignore these if you are fetching all records.

> For example, to fetch all records between `2020-05-01` and `2020-05-20`, you do this:

```
$client->getBalanceByDateRange('2020-05-01', '2020-05-20', true)
```

> To fetch only page 2 and limit the number of records to 10 for the same date range as above, you do this:

```
$client->getBalanceByDateRange('2020-05-01', '2020-05-20', ,2,10)
```

Credit
------

[](#credit)

[Obioha Uche](https://mmuo.dev)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16281845?v=4)[obioha uche](/maintainers/mmuoDev)[@mmuoDev](https://github.com/mmuoDev)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/mmuodev-okra-php-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/mmuodev-okra-php-wrapper/health.svg)](https://phpackages.com/packages/mmuodev-okra-php-wrapper)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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