PHPackages                             ashraam/pennylane-laravel - 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. ashraam/pennylane-laravel

ActiveLibrary[API Development](/categories/api)

ashraam/pennylane-laravel
=========================

Pennylane API wrapper for Laravel

0.1.2(4y ago)22883[1 issues](https://github.com/Ashraam/PennylaneLaravel/issues)MITPHPPHP ^7.4|^8.0

Since Jul 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Ashraam/PennylaneLaravel)[ Packagist](https://packagist.org/packages/ashraam/pennylane-laravel)[ Docs](https://github.com/ashraam/pennylane-laravel)[ RSS](/packages/ashraam-pennylane-laravel/feed)WikiDiscussions master Synced 3d ago

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

Pennylane API wrapper for Laravel
=================================

[](#pennylane-api-wrapper-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a423065cc45d5b400ce5608961000f4f76dedaf4a6cbb4b5c5a87740e98d411d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6173687261616d2f70656e6e796c616e652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ashraam/pennylane-laravel)

Please read the [official API documentation](https://pennylane.readme.io/reference#presentation) to know what are the required fields for each endpoint.

---

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

[](#installation)

You can install the package via composer:

```
composer require ashraam/pennylane-laravel
```

Then add the Pennylance API KEY in the `.env` file.

```
PENNYLANE_API_KEY=my_api_key
```

---

Usage
-----

[](#usage)

### List all customers

[](#list-all-customers)

```
$customers = PennylaneLaravel::customers()->list();
```

---

### Get a customer by it's ID

[](#get-a-customer-by-its-id)

```
$customer = PennylaneLaravel::customers()->get(999);
```

---

### Create a new customer

[](#create-a-new-customer)

```
$customer = PennylaneLaravel::customers()->create([
    'source_id' => (string) 1,
    'customer_type' => 'individual',
    'first_name' => 'John',
    'last_name' => 'Doe',
    'gender' => 'mister',
    'address' => "Street",
    'postal_code' => 'zip code',
    'city' => 'City',
    'country_alpha2' => 'FR',
    'emails' => ['john.doe@gmail.com'],
    'phone' => '+33625478510'
]);
```

---

### Update a customer

[](#update-a-customer)

```
$customer = PennylaneLaravel::customers()->update(1, [
    'delivery_address' => 'Delivery address',
    'delivery_postal_code' => 'Delivery zip code',
    'delivery_city' => 'Delivery city',
    'delivery_country_alpha2' => 'FR'
]);
```

---

### List all products

[](#list-all-products)

```
$products = PennylaneLaravel::products()->list();
```

---

### Get a product by it's ID

[](#get-a-product-by-its-id)

```
$product = PennylaneLaravel::products()->get(1);
```

---

### Create a new product

[](#create-a-new-product)

```
$product = PennylaneLaravel::products()->create([
    'source_id' => (string) 1,
    'label' => 'Product 1',
    'unit' => 'piece',
    'price_before_tax' => 10,
    'price' => 12,
    'vat_rate' => 'FR_200',
    'currency' => 'EUR',
    'reference' => 'ref-001'
]);
```

---

### Update a product

[](#update-a-product)

```
$product = PennylaneLaravel::products()->update(1, [
    'description' => 'Updated description'
]);
```

---

### List all invoices

[](#list-all-invoices)

```
$invoices = PennylaneLaravel::invoices()->list();

// Invoices can be filtered
$invoices = PennylaneLaravel::invoices()->list([
    [
        'field' => 'customer_id',
        'operator' => 'eq',
        'value' => (string) 1
    ],
    [
        'field' => 'status',
        'operator' => 'eq',
        'value' => 'draft_status'
    ]
]);
```

---

### Get an invoice by it's ID

[](#get-an-invoice-by-its-id)

```
$invoice = PennylaneLaravel::invoices()->get('RNT9MXHXAD');
```

---

### Create an invoice

[](#create-an-invoice)

Second and third default value is set to **false**

```
$invoice = PennylaneLaravel::invoices()->create([
    'date' => today()->format('Y-m-d'),
    'deadline' => today()->addDays(15)->format('Y-m-d'),
    'draft' => false,
    'customer' => [
        'source_id' => (string) 1
    ],
    'line_items' => [
        [
            'label' => "My special item",
            'quantity' => 3,
            'product' => [
                'source_id' => (string) 1
            ]
        ],
        [
            'label' => "Remise",
            'quantity' => 1,
            'currency_amount' => -10,
            'unit' => 'piece',
            'vat_rate' => 'FR_200'
        ]
    ]
], $create_customers = false, $create_products = false);
```

---

### Import an invoice

[](#import-an-invoice)

Third default value is set to **false**

```
$invoice = PennylaneLaravel::invoices()->import([
    'date' => today()->format('Y-m-d'),
    'deadline' => today()->addDays(15)->format('Y-m-d'),
    'invoice_number' => 'F-874',
    'currency' => 'EUR',
    'customer' => [
        'source_id' => (string) 1
    ],
    'line_items' => [
        [
            'label' => "My special item",
            'quantity' => 3,
            'product' => [
                'source_id' => (string) 1
            ]
        ],
        [
            'label' => "Remise",
            'quantity' => 1,
            'currency_amount' => -10,
            'unit' => 'piece',
            'vat_rate' => 'FR_200'
        ]
    ]
], $file_url, $create_customer = false);
```

---

### List all estimates

[](#list-all-estimates)

```
$estimates = PennylaneLaravel::estimates()->list();
```

---

### Get an estimate by it's ID

[](#get-an-estimate-by-its-id)

```
$estimate = PennylaneLaravel::estimates()->get('VVAWLPY8QB');
```

---

### Create a new estimate

[](#create-a-new-estimate)

```
$estimate = PennylaneLaravel::estimates()->create([
    'date' => today()->format('Y-m-d'),
    'deadline' => today()->addDays(15)->format('Y-m-d'),
    'customer' => [
        'source_id' => (string) 1
    ],
    'line_items' => [
        [
            'label' => "My special item",
            'quantity' => 3,
            'product' => [
                'source_id' => (string) 1
            ]
        ],
        [
            'label' => "Random line",
            'quantity' => 1,
            'currency_amount' => 17.85,
            'unit' => 'piece',
            'vat_rate' => 'FR_200'
        ]
    ]
]);
```

---

### Get an enum

[](#get-an-enum)

The second parameter default value is **en**

```
$values = PennylaneLaravel::enums()->get('unit', 'fr');
```

---

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

---

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

---

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

---

Credits
-------

[](#credits)

- [Romain Bertolucci](https://github.com/ashraam)

---

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Total

3

Last Release

1715d ago

### Community

Maintainers

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

---

Tags

laravelinvoicescustomersPennylane

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ashraam-pennylane-laravel/health.svg)

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

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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