PHPackages                             goatandcow7/pennylane-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. [HTTP &amp; Networking](/categories/http)
4. /
5. goatandcow7/pennylane-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

goatandcow7/pennylane-sdk
=========================

Unofficial PHP SDK for the Pennylane API, the French accounting and invoicing platform

v0.4.0(4w ago)36[1 issues](https://github.com/GoatAndCow7/pennylane-sdk-php/issues)MITPHPPHP ^8.2CI passing

Since Jul 9Pushed 4w ago1 watchersCompare

[ Source](https://github.com/GoatAndCow7/pennylane-sdk-php)[ Packagist](https://packagist.org/packages/goatandcow7/pennylane-sdk)[ Docs](https://goatandcow7.github.io/pennylane-sdk-php/)[ RSS](/packages/goatandcow7-pennylane-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (39)Versions (5)Used By (0)

pennylane-sdk (PHP)
===================

[](#pennylane-sdk-php)

> The unofficial PHP SDK for the [Pennylane](https://www.pennylane.com) API, the French accounting and invoicing platform.

🇫🇷 [Version française](README.fr.md)

[![CI](https://github.com/GoatAndCow7/pennylane-sdk-php/actions/workflows/ci.yml/badge.svg)](https://github.com/GoatAndCow7/pennylane-sdk-php/actions/workflows/ci.yml)[![Packagist](https://camo.githubusercontent.com/c14427141dafeed3a9c3b4b13ba2db27b9c7955413d67dc400b0f2d81248aa90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676f6174616e64636f77372f70656e6e796c616e652d73646b3f63616368655365636f6e64733d33363030)](https://packagist.org/packages/goatandcow7/pennylane-sdk)[![PHP](https://camo.githubusercontent.com/dd751edf6770f6ef9c5c12477a4e5ee162174f844129e223f2d9b04a3368e847/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f676f6174616e64636f77372f70656e6e796c616e652d73646b2f7068703f63616368655365636f6e64733d33363030)](https://packagist.org/packages/goatandcow7/pennylane-sdk)[![License: MIT](https://camo.githubusercontent.com/e19d32ddd0fe35c406741f25b9b857f291780424f61b66afa7f884354256b8ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d7465616c2e737667)](LICENSE)

**[Documentation](https://goatandcow7.github.io/pennylane-sdk-php/)** | [API coverage: 213/213 operations](#complete-api-coverage)

- **Complete**: every operation of the Company API v2 (165) and the Firm API v1 (48), audited against the official OpenAPI specs in CI.
- **Typed**: readonly response objects with full IDE autocompletion, tolerant to API additions; monetary amounts are strings, never floats.
- **Safe for accounting**: the API has no idempotency, so POST is never retried after a server error. No duplicate invoices from a network hiccup.
- **Rate-limit proof**: built-in client-side throttling to the official limits, plus retry-after aware retries on 429.
- **Effortless pagination**: foreach over a list call, the SDK fetches the pages.

> Not affiliated with Pennylane SAS. Unrelated to the PennyLane quantum computing framework. There is a [Python sibling SDK](https://github.com/GoatAndCow7/pennylane-sdk) with the same design.

Install
-------

[](#install)

```
composer require goatandcow7/pennylane-sdk
```

PHP 8.2+. The SDK is PSR-18 based: any HTTP client works, Guzzle is the suggested default (`composer require guzzlehttp/guzzle`). Allow the `php-http/discovery` composer plugin when prompted.

Quickstart
----------

[](#quickstart)

Create an API token in Pennylane (**Settings &gt; Connectivity &gt; Developers**), then:

```
use Pennylane\Sdk\Pennylane;
use Pennylane\Sdk\Filter;

$client = new Pennylane(); // reads PENNYLANE_API_TOKEN

// List and filter, with transparent pagination
foreach ($client->customerInvoices->list(
    filter: [Filter::gte('date', '2026-01-01')],
    sort: '-date',
) as $invoice) {
    echo $invoice->invoiceNumber, ' ', $invoice->currencyAmount, PHP_EOL;
}

// Create, finalize, send
$invoice = $client->customerInvoices->create(
    date: '2026-07-08',
    deadline: '2026-08-07',
    customerId: 123,
    invoiceLines: [['product_id' => 45, 'quantity' => '2']],
);
$client->customerInvoices->finalize($invoice->id);
$client->customerInvoices->sendByEmail($invoice->id);
```

Accounting firms, across the whole portfolio:

```
use Pennylane\Sdk\PennylaneFirm;

$firm = new PennylaneFirm(); // reads PENNYLANE_FIRM_API_TOKEN

foreach ($firm->companies->list() as $company) {
    foreach ($firm->trialBalance->list(
        $company->id,
        periodStart: '2026-01-01',
        periodEnd: '2026-06-30',
    ) as $row) {
        // ...
    }
}
```

French e-invoicing (2026 reform), Pennylane being an accredited Plateforme Agréée:

```
use Pennylane\Sdk\FileUpload;

$client->customerInvoices->sendToPa($invoice->id);                                   // emit through the PA
$client->supplierInvoices->importEInvoice(FileUpload::fromPath('factur-x.pdf'));     // ingest Factur-X/UBL/CII
```

Complete API coverage
---------------------

[](#complete-api-coverage)

APIOperationsResourcesCompany v2165/165customer and supplier invoices, quotes, customers, products, billing subscriptions, banking and reconciliation, journals, ledger entries, lettering, trial balance, analytics, FEC/GL/AGL exports, SEPA/GoCardless/Pro mandates, e-invoicing, changelogs, webhooksFirm v148/48client portfolio, accounting, DMS, exports, invoicing (read), banking, analytics, changelogsCoverage is not a promise: `scripts/check-coverage.php` verifies in CI that every operation in the vendored official OpenAPI specs exists in the SDK.

Learn more
----------

[](#learn-more)

- [Getting started](https://goatandcow7.github.io/pennylane-sdk-php/getting-started/)
- [Guides](https://goatandcow7.github.io/pennylane-sdk-php/guides/authentication/): authentication, pagination and filtering, errors and retries, invoicing lifecycle, e-invoicing 2026, accounting, Firm API, webhooks, OAuth apps
- [API reference](https://goatandcow7.github.io/pennylane-sdk-php/api/clients/)
- [Examples](examples/)
- [Contributing](CONTRIBUTING.md)

Using with AI coding assistants
-------------------------------

[](#using-with-ai-coding-assistants)

The documentation is indexed on [Context7](https://context7.com/goatandcow7/pennylane-sdk-php): point your assistant at it and it gets the whole SDK reference with usage rules. The docs are also published as [llms.txt](https://goatandcow7.github.io/pennylane-sdk-php/llms.txt) / [llms-full.txt](https://goatandcow7.github.io/pennylane-sdk-php/llms-full.txt), and [AGENTS.md](AGENTS.md) sums up the ground rules any tool should follow.

License
-------

[](#license)

[MIT](LICENSE). Build whatever you want with it.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance87

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

29d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aad7d7c356f0300a61c25e54440cd3123b056335aa716abb3ed8582f9feabd0d?d=identicon)[GoatAndCow7](/maintainers/GoatAndCow7)

---

Top Contributors

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

---

Tags

accounting-apie-invoicingpennylanephp-sdkapisdkpsr-18factur-xinvoicingAccountingfrancee-invoicingPennylanecomptabilitéfacturation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/goatandcow7-pennylane-sdk/health.svg)

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

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36826.2k2](/packages/telnyx-telnyx-php)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k29.9M348](/packages/openai-php-client)[getbrevo/brevo-php

Official PHP SDK for the Brevo API.

1004.1M59](/packages/getbrevo-brevo-php)[anthropic-ai/sdk

Anthropic PHP SDK

176884.4k25](/packages/anthropic-ai-sdk)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9082.3k](/packages/n1ebieski-ksef-php-client)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)

PHPackages © 2026

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