PHPackages                             felloh/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. [API Development](/categories/api)
4. /
5. felloh/php-sdk

ActiveLibrary[API Development](/categories/api)

felloh/php-sdk
==============

Official PHP SDK for the Felloh API

00PHPCI failing

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/felloh-org/php-sdk)[ Packagist](https://packagist.org/packages/felloh/php-sdk)[ RSS](/packages/felloh-php-sdk/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Felloh PHP SDK
==============

[](#felloh-php-sdk)

[![CI](https://github.com/felloh-org/php-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/felloh-org/php-sdk/actions/workflows/ci.yml)[![Packagist](https://camo.githubusercontent.com/aedd734975430ff847efa2a483b39d1e6fbdf45c32b32a1d695bce13958b1d11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66656c6c6f682f7068702d73646b)](https://packagist.org/packages/felloh/php-sdk)[![PHP Version](https://camo.githubusercontent.com/27eb16398e0e49805deab3ca1034c889f2b79f8a3b266f6d02fa51203ed4e739/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66656c6c6f682f7068702d73646b)](https://packagist.org/packages/felloh/php-sdk)

Official PHP SDK for the [Felloh](https://www.felloh.com) payments API.

[API Documentation](https://developers.felloh.com) | [Packagist](https://packagist.org/packages/felloh/php-sdk) | [GitHub](https://github.com/felloh-org/php-sdk)

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

[](#installation)

```
composer require felloh/php-sdk
```

Requires PHP 8.1 or later.

Quick Start
-----------

[](#quick-start)

```
use Felloh\FellohClient;
use Felloh\FellohConfig;

$client = new FellohClient(new FellohConfig(
    publicKey: 'pk_live_...',
    privateKey: 'sk_live_...',
));

// List bookings
$response = $client->bookings->list(['organisation' => 'org-id']);
$bookings = $response['data'];
```

Configuration
-------------

[](#configuration)

```
$client = new FellohClient(new FellohConfig(
    publicKey: 'pk_live_...',
    privateKey: 'sk_live_...',
    baseUrl: 'https://sandbox.felloh.com',  // Default: https://api.felloh.com
    timeout: 30.0,                           // Default: 30.0 seconds
    maxRetries: 2,                           // Default: 2
    tokenRefreshBuffer: 60,                  // Default: 60 seconds
    logger: function (\Felloh\LogEntry $entry) {
        echo "{$entry->method} {$entry->url} -> {$entry->statusCode} ({$entry->durationMs}ms)\n";
    },
));
```

Usage
-----

[](#usage)

### Bookings

[](#bookings)

```
// List
$response = $client->bookings->list(['organisation' => 'org-id']);

// Get
$response = $client->bookings->get('booking-id');

// Create
$response = $client->bookings->create([
    'organisation' => 'org-id',
    'booking_reference' => 'REF-001',
    'customer_name' => 'Jane Smith',
    'email' => 'jane@example.com',
]);

// Update
$response = $client->bookings->update('booking-id', ['booking_reference' => 'REF-002']);

// Delete
$response = $client->bookings->delete('booking-id');
```

### Transactions

[](#transactions)

```
$response = $client->transactions->list(['organisation' => 'org-id']);
$response = $client->transactions->get('transaction-id');
$response = $client->transactions->refund('transaction-id', ['amount' => 1000]);
$response = $client->transactions->complete('transaction-id');
$response = $client->transactions->reverse('transaction-id');
$response = $client->transactions->reassign('transaction-id', ['booking_id' => 'new-booking-id']);
```

### Payment Links

[](#payment-links)

```
$response = $client->paymentLinks->list(['organisation' => 'org-id']);
$response = $client->paymentLinks->get('payment-link-id');
$response = $client->paymentLinks->create(['organisation' => 'org-id', /* ... */]);
$response = $client->paymentLinks->delete('payment-link-id');
$response = $client->paymentLinks->assign('payment-link-id', ['booking_id' => 'booking-id']);
```

### Customers

[](#customers)

```
$response = $client->customers->list(['organisation' => 'org-id']);
$response = $client->customers->create(['name' => 'John Doe', 'email' => 'john@example.com']);
```

### Pagination

[](#pagination)

```
// Auto-pagination with foreach
foreach ($client->bookings->listAll(['organisation' => 'org-id']) as $booking) {
    echo $booking['id'] . "\n";
}

// Collect all items into an array
$allBookings = $client->bookings->listAll(['organisation' => 'org-id'])->toArray();
```

### Available Resources

[](#available-resources)

ResourcePropertyMethodsOrganisations`$client->organisations``list`Bookings`$client->bookings``list`, `listAll`, `get`, `create`, `update`, `delete`, `updateReference`Booking Components`$client->bookingComponents``create`, `delete`Transactions`$client->transactions``list`, `listAll`, `get`, `refund`, `complete`, `reverse`, `reassign`Customers`$client->customers``list`, `listAll`, `create`Payment Links`$client->paymentLinks``list`, `listAll`, `get`, `create`, `delete`, `assign`Ecommerce`$client->ecommerce``list`, `listAll`, `get`, `create`, `delete`, `assign`Refunds`$client->refunds``list`, `listAll`, `authorise`, `decline`Charges`$client->charges``list`, `listAll`Chargebacks`$client->chargebacks``list`, `listAll`Credit Notes`$client->creditNotes``list`, `listAll`, `get`, `create`, `assign`Suppliers`$client->suppliers``list`, `listAll`, `create`Beneficiaries`$client->beneficiaries``list`, `listAll`, `create`, `activate`Disbursements`$client->disbursements``list`, `listAll`, `get`Ledger`$client->ledger``list`, `listAll`Batches`$client->batches``list`, `listAll`, `get`API Keys`$client->apiKeys``list`, `create`, `delete`Audit`$client->audit``list`, `listAll`AISP`$client->aisp``accounts`, `transactions`, `statistics`Scheduled Payments`$client->scheduledPayments``list`, `listAll`, `availableTokens`, `createPayment`, `approvalLink`, `delete`Enums`$client->enums``list`Error Handling
--------------

[](#error-handling)

```
use Felloh\Exceptions\FellohAuthenticationError;
use Felloh\Exceptions\FellohNotFoundError;
use Felloh\Exceptions\FellohValidationError;
use Felloh\Exceptions\FellohRateLimitError;
use Felloh\Exceptions\FellohServerError;
use Felloh\Exceptions\FellohNetworkError;

try {
    $client->bookings->get('nonexistent-id');
} catch (FellohNotFoundError $e) {
    echo "Not found: {$e->getMessage()}\n";
    echo "Status: {$e->statusCode}\n";
    echo "Request ID: {$e->meta['request_id']}\n";
} catch (FellohAuthenticationError $e) {
    echo "Invalid credentials\n";
} catch (FellohValidationError $e) {
    echo "Validation: {$e->getMessage()}\n";
} catch (FellohRateLimitError $e) {
    echo "Rate limited\n";
} catch (FellohServerError $e) {
    echo "Server error (retries exhausted)\n";
} catch (FellohNetworkError $e) {
    echo "Network error: {$e->getMessage()}\n";
}
```

Webhook Verification
--------------------

[](#webhook-verification)

```
use Felloh\Webhooks;

// Returns boolean
$isValid = Webhooks::verifyWebhookSignature(
    payload: $requestBody,
    signature: $_SERVER['HTTP_X_SIGNATURE'],
    secret: 'your_webhook_secret',
);

// Throws FellohWebhookSignatureError on failure
Webhooks::assertWebhookSignature(
    payload: $requestBody,
    signature: $_SERVER['HTTP_X_SIGNATURE'],
    secret: 'your_webhook_secret',
);
```

Development
-----------

[](#development)

```
composer install
composer test
```

Other SDKs
----------

[](#other-sdks)

- [Node.js SDK](https://github.com/felloh-org/node-sdk) - `npm install @felloh-org/node-sdk`
- [Python SDK](https://github.com/felloh-org/python-sdk) - `pip install felloh`

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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://www.gravatar.com/avatar/f06b1798977e196e99c5d0b7f408c2c3a13cf09c0df2cf93841b6e1b73124b16?d=identicon)[adamclark-dev](/maintainers/adamclark-dev)

---

Top Contributors

[![adamclark-dev](https://avatars.githubusercontent.com/u/9998404?v=4)](https://github.com/adamclark-dev "adamclark-dev (2 commits)")

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

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

Hubspot API client

24016.2M18](/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)
