PHPackages                             partfire/onfido - 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. partfire/onfido

ActiveLibrary[API Development](/categories/api)

partfire/onfido
===============

A composer package version of the Onfido php library.

1.0(9y ago)21091MITPHPPHP &gt;=5.3.0

Since Nov 9Pushed 9y ago2 watchersCompare

[ Source](https://github.com/PartFire/onfido)[ Packagist](https://packagist.org/packages/partfire/onfido)[ Docs](http://partfire.co.uk)[ RSS](/packages/partfire-onfido/feed)WikiDiscussions master Synced 4w ago

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

PartFire onfido
===============

[](#partfire-onfido)

This is a PHP API client for Onfido's REST API.

We have kept this library as close to [the original](https://github.com/onfido/php-onfido) as possible and so can be used as the [documentation](https://onfido.com/documentation#documents) states.

In order to run the tests, you must update the AbstractTest file with your api token. The tests are poor as they depend upon data on your Onfido account (e.g. customer ids).

These are the original unit tests that Onfido provided.

Installation
============

[](#installation)

You can obtain onfido-php from source

```
$ git clone https://github.com/onfido/php-onfido.git

```

or you can install via composer:

```
$ composer require partfire/onfido

```

Usage
=====

[](#usage)

At the beginning, You need is to import the autoload.php file, Initiate the Config, and Set the Token:

```
require_once('autoload.php');

\Onfido\Config::init()->set_token('YOUR TOKEN');

```

Applicants
----------

[](#applicants)

The [applicant](https://onfido.com/documentation#applicants) endpoint supports two operations - `create()` and `get()`:

### Create applicant

[](#create-applicant)

```
$applicant = new \Onfido\Applicant();
$applicant->first_name = 'John';
$applicant->last_name = 'Smith';
$applicant->email = 'email@server.com';

$address1 = new \Onfido\Address();
$address1->postcode = 'abc';
$address1->town = 'London';
$address1->country = 'GBR';

$applicant->addresses = Array($address1);

$response = $applicant->create();

```

### Retrieve applicant

[](#retrieve-applicant)

`APPLICANT_ID` to be the ID of the Applicants You want to retrieve.

```
$applicant = (new \Onfido\Applicant())->get(APPLICANT_ID);

```

### List applicants

[](#list-applicants)

`->paginate(2, 5)` means to get page #2 where each page has 5 Applicants, Any of both can be null to ignore

```
\Onfido\Config::init()->set_token('YOUR TOKEN')->paginate(2, 5);

$applicants = (new \Onfido\Applicant())->get();

```

Documents
---------

[](#documents)

The [documents](https://onfido.com/documentation#documents) endpoint supports one operation - upload\_for():

### Upload document

[](#upload-document)

```
$document = new \Onfido\Document();

$document->file_name = 'file.jpg';
$document->file_path = '/path/to/file.jpg';
$document->file_type = 'image/jpg';
$document->type = 'passport';
$document->side = 'front';

$response = $document->upload_for(APPLICANT_ID);

```

Checks
------

[](#checks)

The [checks](https://onfido.com/documentation#checks) endpoint supports two operations - `create_for()` and `get()`:

### Create check

[](#create-check)

```
$check = new \Onfido\Check();
$check->type = 'standard';

$report1 = new \Onfido\CheckReport();
$report1->name = 'identity';

$check->reports = Array(
    $report1
);
$response = $check->create_for(APPLICANT_ID);

```

### Retrieve check

[](#retrieve-check)

```
$check = (new \Onfido\Check())->get(APPLICANT_ID, CHECK_ID);

```

### List checks

[](#list-checks)

```
\Onfido\Config::init()->set_token('YOUR TOKEN')->paginate(null, 5);

$checks = (new \Onfido\Check())->get(APPLICANT_ID);

```

Reports
-------

[](#reports)

The [reports](https://onfido.com/documentation#reports) endpoint supports one operation - `get()`:

### Retrieve report

[](#retrieve-report)

```
$report = (new \Onfido\Report())->get(CHECK_ID, REPORT_ID);

```

### List reports

[](#list-reports)

```
$report = (new \Onfido\Report())->get(CHECK_ID);

```

Address Picker
--------------

[](#address-picker)

You can get use of the Onfido [Address Picker](https://onfido.com/documentation#address-picker), like:

```
$address = new \Onfido\AddressPicker();
$address->postcode = 'SW4 6EH';
$addresses = $address->pick();

```

Running tests
=============

[](#running-tests)

You will need to have latest version of [phpunit](https://phpunit.de/manual/current/en/installation.html) installed. Then:

```
phpunit Applicants.php

```

will run the tests related to Applicant endpoint operations, and shows the results in a readable way. You can run other tests like: Checks, Documents and Reports.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

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

Unknown

Total

1

Last Release

3521d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64096104?v=4)[CarlaMorosan](/maintainers/carlamo)[@CarlaMo](https://github.com/CarlaMo)

---

Top Contributors

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

---

Tags

onfidoonfido-phponfido composer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/partfire-onfido/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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