PHPackages                             craigpotter/fca-php-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. craigpotter/fca-php-sdk

ActiveLibrary

craigpotter/fca-php-sdk
=======================

An unofficial PHP SDK consuming the FCA API

v3.0.0(1mo ago)234.7k↑41.9%1MITPHPPHP ^8.2CI passing

Since Jun 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/craigpotter/fca-php-sdk)[ Packagist](https://packagist.org/packages/craigpotter/fca-php-sdk)[ Docs](https://github.com/craigpotter)[ RSS](/packages/craigpotter-fca-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (12)Versions (12)Used By (0)

FCA API SDK for PHP
===================

[](#fca-api-sdk-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bee7bbcc217c59b227e6cff6cf8d374b7d4aad9e57172bd0f3249e3141155cf8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6372616967706f747465722f6663612d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/craigpotter/fca-php-sdk)[![Tests](https://camo.githubusercontent.com/69a75557904fd141bc6f6e23bab2c3a21af130d358397d6eaf7f909c76765045/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372616967706f747465722f6663612d7068702d73646b2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/craigpotter/fca-php-sdk/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/c3a5a41d2083008d8300dbc1c3aa26eb3f812a69a41aaa762a2bcc5a2341239a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6372616967706f747465722f6663612d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/craigpotter/fca-php-sdk)

This is an unofficial PHP SDK for [FCA's API](https://register.fca.org.uk/Developer/s/) and is powered by [Saloon](https://github.com/Sammyjo20/Saloon).

> **Note:** This SDK is still in development and is not yet ready for production use. Use at your own risk.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require craigpotter/fca-php-sdk
```

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

[](#requirements)

You will need to have a valid API key from FCA to use this SDK.

You can obtain one by [registering as a developer](https://register.fca.org.uk/Developer/s/).

Example Usage
-------------

[](#example-usage)

```
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
$fca = new Fca('my.email@dev.test', 'my-api-key');

// 12345 is the FCA firm reference number

$firmFrnExists = $fca->firm(12345)->exists(); // Returns a boolean

$response = $fca->firm(12345)->get();

$firm = $response->dto(); // Returns a Firm DTO
$json = $response->json(); // Returns the raw JSON response
```

Documentation
-------------

[](#documentation)

> **Warning:** This documentation is still a work in progress.

Some responses have the option of a DTO (Data Transfer Object) which can be used to access the response data.

This does not work for all responses, but is documented where it is available.
For all other responses, you can access the raw JSON response using `$response->json()`.

### Firms

[](#firms)

#### Check an FRN exists

[](#check-an-frn-exists)

```
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
$fca = new Fca('my.email@dev.test', 'my-api-key');

// 12345 is the FCA firm reference number

$firmFrnExists = $fca->firm(12345)->exists(); // Returns a boolean
```

#### Get a firm by FRN

[](#get-a-firm-by-frn)

```
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
$fca = new Fca('my.email@dev.test', 'my-api-key');

// 12345 is the FCA firm reference number

$response = $fca->firm(12345)->get(); // Returns a Saloon response object

$firm = $response->dto(); // Returns a Firm DTO
$firm->frn; // 12345
$firm->name; // "My Firm"
$firm->status; // "Active"
$firm->statusDate; // "2021-01-01"
$firm->statusReason; // "Active"
$firm->companiesHouseNumber; // "12345678"

$json = $response->json(); // Returns the raw JSON response
```

#### Get the individuals associated with a firm by FRN

[](#get-the-individuals-associated-with-a-firm-by-frn)

This endpoint is paginated and will return a maximum of 20 results per page.
You should loop through the pages to get all results.

```
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
$fca = new Fca('my.email@dev.test', 'my-api-key');

// 12345 is the FCA firm reference number

$paginatedData = $fca->firm(12345)->individuals(); // Returns a Saloon response object

$paginatedData->totalPages(); // Returns the total number of pages
$paginatedData->totalResults(); // Returns the total number of results
foreach ($paginatedData as $page) {
    $paginatedData->getCurrentPage(); // Returns the current page number
    $individuals = $page->dto(); // Returns an array of Individual DTOs for this page
    $json = $page->json(); // Returns the raw JSON response for this page

    foreach ($individuals as $individual) {
        $individual->irn; // "JOHNSMITH12345"
        $individual->name; // "John Smith"
        $individual->status; // "Approved by regulator"
    }
}
```

#### Get the addresses associated with a firm by FRN

[](#get-the-addresses-associated-with-a-firm-by-frn)

This endpoint is paginated and will return a maximum of 20 results per page.
You should loop through the pages to get all results.

```
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
use CraigPotter\Fca\Fca;

// Create a new FCA instance (This is required for all requests)
$fca = new Fca('my.email@dev.test', 'my-api-key');

// 12345 is the FCA firm reference number

$paginatedData = $fa->firm(12345)->addresses(); // Returns a Saloon response object

$paginatedData->totalPages(); // Returns the total number of pages
$paginatedData->totalResults(); // Returns the total number of results
foreach ($paginatedData as $page) {
    $paginatedData->getCurrentPage(); // Returns the current page number
    $addresses = $page->dto(); // Returns an array of Address DTOs for this page
    $json = $page->json(); // Returns the raw JSON response for this page

    foreach ($addresses as $address) {
        $address->website; // "www.example.org"
        $address->phoneNumber; // "44123456778"
        $address->type; // "Principal Place of Business"
        $address->contactName; // "John Smith"
        $address->addressLine1; // "1 Example Street"
        $address->addressLine2; // "Aberdeen"
        $address->addressLine3; // "Aberdeen"
        $address->addressLine4; // "Aberdeen"
        $address->town; // "Aberdeen"
        $address->county; // "Aberdeenshire"
        $address->country; // "United Kingdom"
        $address->postcode; // "AB1 2CD"
    }
}
```

Testing
-------

[](#testing)

Copy `.env.example` to `.env` and update accordingly.

```
vendor/bin/pest
```

Credits
-------

[](#credits)

- [Craig Potter](https://github.com/craigpotter)
- [All Contributors](../../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](../LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~222 days

Total

9

Last Release

53d ago

Major Versions

v0.2.0 → v1.0.02023-10-21

v1.0.1 → v2.0.02023-10-21

v2.x-dev → v3.0.02026-03-26

PHP version history (2 changes)v0.1PHP ^8.1

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a56cd4733b15c1e79ac26bc1658eb59a35a102250f9f48b929811c29f86bc60?d=identicon)[craigpotter](/maintainers/craigpotter)

---

Top Contributors

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

---

Tags

fcahacktoberfestphpsaloonphp

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/craigpotter-fca-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/craigpotter-fca-php-sdk/health.svg)](https://phpackages.com/packages/craigpotter-fca-php-sdk)
```

###  Alternatives

[ohdearapp/ohdear-php-sdk

An SDK to easily work with the Oh Dear API

742.6M13](/packages/ohdearapp-ohdear-php-sdk)[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

805.7M125](/packages/saloonphp-laravel-plugin)[saloonphp/rate-limit-plugin

Handle rate limits beautifully in your Saloon API integrations or SDKs

201.3M44](/packages/saloonphp-rate-limit-plugin)[saloonphp/cache-plugin

Official plugin for caching Saloon responses

122.0M64](/packages/saloonphp-cache-plugin)[myoutdeskllc/salesforce-php

salesforce library for php8+

1560.8k](/packages/myoutdeskllc-salesforce-php)

PHPackages © 2026

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