PHPackages                             ashraam/ipaidthat-php - 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/ipaidthat-php

ActiveLibrary[API Development](/categories/api)

ashraam/ipaidthat-php
=====================

IPaidThat PHP Api connector

1.0.0(4y ago)23MITPHPPHP ^7.3

Since Jul 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Ashraam/ipaidthat-php)[ Packagist](https://packagist.org/packages/ashraam/ipaidthat-php)[ RSS](/packages/ashraam-ipaidthat-php/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

IPaidThat-PHP
=============

[](#ipaidthat-php)

[![Latest Stable Version](https://camo.githubusercontent.com/ca5159e70f0ef8ec4683439aa96f2137c93cff4b2dacecf1f9e00b576987f59d/687474703a2f2f706f7365722e707567782e6f72672f6173687261616d2f6970616964746861742d7068702f76)](https://packagist.org/packages/ashraam/ipaidthat-php)[![Build Status](https://camo.githubusercontent.com/9c293a38b43a0fe50244a42ede50fde6a6f4eaed3d27727df29b71484e40e159/68747470733a2f2f7472617669732d63692e636f6d2f4173687261616d2f6970616964746861742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Ashraam/ipaidthat-php)[![License](https://camo.githubusercontent.com/33d16c1f6cec8ae5c3aeb7e7aef0c9a8f46575744bbfa513f06df41b0890ca73/687474703a2f2f706f7365722e707567782e6f72672f6173687261616d2f6970616964746861742d7068702f6c6963656e7365)](https://packagist.org/packages/ashraam/ipaidthat-php)

A PHP wrapper for [IPaidThat](https://ipaidthat.io/)'s API (V2).

You can manage customers, invoices, invoice's items.

Table of contents
-----------------

[](#table-of-contents)

- [IPaidThat-PHP](#ipaidthat-php)
    - [Table of contents](#table-of-contents)
    - [Installation](#installation)
    - [Usage](#usage)
        - [List or filter customers](#list-or-filter-customers)
        - [Get a customer](#get-a-customer)
        - [Create a customer](#create-a-customer)
        - [Update a customer](#update-a-customer)
        - [Delete a customer](#delete-a-customer)
        - [List or filter invoices](#list-or-filter-invoices)
        - [Get an invoice](#get-an-invoice)
        - [Create an invoice](#create-an-invoice)
        - [Update an invoice](#update-an-invoice)
        - [Download an invoice](#download-an-invoice)
        - [Validate an invoice](#validate-an-invoice)
        - [Delete an invoice](#delete-an-invoice)
        - [List or filter invoice items](#list-or-filter-invoice-items)
        - [Get an invoice item](#get-an-invoice-item)
        - [Add an item to an invoice](#add-an-item-to-an-invoice)
        - [Update an invoice item](#update-an-invoice-item)
        - [delete an invoice item](#delete-an-invoice-item)
    - [Contributing](#contributing)
    - [License](#license)

---

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

[](#installation)

Using composer

```
composer require ashraam/ipaidthat-php
```

Usage
-----

[](#usage)

---

### List or filter customers

[](#list-or-filter-customers)

This method returns an array of customers

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$customers = $api->customers()->list();

// With filters
$customers = $api->customers()->list([
   'last_name' => 'Doe',
   'email' => 'john.doe@gmail.com'
]);
```

***Available filters:*** external\_id, name, last\_name, first\_name, email, siren

Please refer to the official documentation for more informations about types and requirements.

---

### Get a customer

[](#get-a-customer)

This methods returns a customer

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$customers = $api->customers()->get(123);
```

---

### Create a customer

[](#create-a-customer)

this methods returns the newly created customer

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\Customer`

```
use Ashraam\IpaidthatPhp\Ipaidthat;
use Ashraam\IpaidthatPhp\Entity\Customer;

$api = new Ipaidthat('your_token');

$customer = $api->customers()->create(new Customer([
   'external_id' => 'string',
   'name' => 'string',
   'first_name' => 'string',
   'last_name' => 'string',
   'siren' => 'string',
   'vat' => 'string',
   'address' => 'string',
   'email' => 'string',
   'phone' => 'phone',
   'extra' => 'string'
]));
```

---

### Update a customer

[](#update-a-customer)

this methods returns the updated customer

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\Customer`

```
use Ashraam\IpaidthatPhp\Ipaidthat;
use Ashraam\IpaidthatPhp\Entity\Customer;

$api = new Ipaidthat('your_token');

$customer = $api->customers()->get(123);

$customer->first_name = 'Chuck';
$customer->last_name = 'Norris';

$customer = $api->customers()->update($customer);
```

---

### Delete a customer

[](#delete-a-customer)

This methods returns an empty response

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$api->customers()->delete(123);
```

---

### List or filter invoices

[](#list-or-filter-invoices)

This methods returns an array of invoices

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$invoices = $api->invoices()->list();

// With filters
$invoices = $api->invoices()->list([
    'issue_date' => '2021-01-25',
    'customer_id' => 123
])
```

***Available filters :*** external\_id, type, status, issue\_date, number, generated\_number, due\_date, sent, customer\_id, sender\_id, customer, sender.

Please refer to the official documentation for more informations about types and requirements.

---

### Get an invoice

[](#get-an-invoice)

This methods returns an invoice by it's ID (without items)

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$invoice = $api->invoices()->get(750);
```

---

### Create an invoice

[](#create-an-invoice)

This methods returns the newly created invoice

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\Invoice`

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$invoice = $api->invoices()->create(new Invoice([
    'external_id' => 'string, nullable',
    'issue_date' => 'Y-m-d',
    'type' => 'invoice|quote|order|credit|other',
    'due_date' => 'Y-m-d',
    'shipping' => 10.5,
    'c_field_name_1' => 'string',
    'c_field_value_1' => 'string',
    'c_field_name_2' => 'string',
    'c_field_value_2' => 'string',
    'sender' => 'integer, nullable',
    'customer' => 'interger, nullable',
    'multi_page' => 'boolean',
    'status' => 'draft|updating|not paid|paid',
    'paid' => 'boolean'
]));
```

---

### Update an invoice

[](#update-an-invoice)

This methods returns the updated invoice

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\Invoice`

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$invoice = $api->invoices()->get(123);

$invoice->due_date = '2021-12-15';
$invoice->multi_page = true;

$invoice = $api->invoices()->update($invoice);
```

---

### Download an invoice

[](#download-an-invoice)

This methods returns the string raw content of the PDF

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$contents = $api->invoices()->download(123);

file_put_contents('invoice.pdf', $contents);
```

---

### Validate an invoice

[](#validate-an-invoice)

This methods validate an invoice,

if the second parameter is set to true the invoice will be sent to the customer email address (default set to `false`)

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$invoice = $api->invoices()->validate(123, true);
```

---

### Delete an invoice

[](#delete-an-invoice)

This methods returns an empty response

Validated document can't be delete

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$api->invoices()->delete(123);
```

---

### List or filter invoice items

[](#list-or-filter-invoice-items)

This methods returns an array of InvoiceItem

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$items = $api->invoiceItems()->list();

// With filters
$items = $api->invoiceItems()->list([
    'invoice_id' => 13255
]);
```

***Available filters:*** invoice\_id, name, additionnal\_info, invoice

---

### Get an invoice item

[](#get-an-invoice-item)

This methods returns the item by it's ID

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$item = $api->invoiceItems()->get(455874);
```

---

### Add an item to an invoice

[](#add-an-item-to-an-invoice)

This methods returns the newly created item

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\InvoiceItem`

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$item = $api->invoiceItems()->create(new InvoiceItem([
    'invoice' => $invoice_id,   // Required
    'name' => 'name',           // Required
    'unit_price' => 12.15       // Required
    'quantity' => 1,
    'tax_percent' => 20,
    'discount_percent' => 5,
    'additionnal_info' => '',
    'position' => 1
]));
```

---

### Update an invoice item

[](#update-an-invoice-item)

This methods returns the updated item

The method only accept an instance of `Ashraam\IpaidthatPhp\Entity\InvoiceItem`

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$item = $api->invoiceItems()->get(455874);

$item->name = 'Edited name';
$item->quantity = 6;

$item = $api->invoiceItems()->update($item);
```

---

### delete an invoice item

[](#delete-an-invoice-item)

This methods returns an empty response

```
use Ashraam\IpaidthatPhp\Ipaidthat;

$api = new Ipaidthat('your_token');

$api->invoiceItems()->delete(455874);
```

---

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](./LICENCE.md)

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

1772d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

api-wrapperipaidthatphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ashraam-ipaidthat-php/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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