PHPackages                             epicbit/bill-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. [Payment Processing](/categories/payments)
4. /
5. epicbit/bill-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

epicbit/bill-php-sdk
====================

Simple way to use bill.pt sdk

v1.25.11(7y ago)54031MITPHP

Since Aug 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/carlosbranco/bill-php-sdk)[ Packagist](https://packagist.org/packages/epicbit/bill-php-sdk)[ RSS](/packages/epicbit-bill-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Bill.pt SDK PHP API
===================

[](#billpt-sdk-php-api)

SDK de PHP de desenvovimento usando a api do website bill.pt. Bill é um software de faturação certificado pela autoridade tributária. Para ter acesso a uma conta de desenvolvimento contacte o suporte.

A simple helper to use bill.pt API

Documentation:

Namespace:
----------

[](#namespace)

```
use EpicBit\BillPhpSdk\Api;

```

Instance:
---------

[](#instance)

```
$api = new Api();

```

Optional parameter (string) Define what server the API will try to connect. By default API will try to connect to portuguese server. But if you have a international account you would like to do:

```
Example : $api = new Api('world');

```

Valid: standard,portugal,world,dev

Turn On LOG:
------------

[](#turn-on-log)

Turn on LOG. Type can be: file or memory

```
$api->setlog(true, $type);

```

To return LOG from memory:

```
$api->getLogFromMemory();

```

How to login and get token:
---------------------------

[](#how-to-login-and-get-token)

```
$user = $api->getToken([
	'email' => "johndoe@example.com",
	'password' => 'XXXXX'
	]);

$api->setToken($user->api_token);

```

If you already have the token you can just setToken:
----------------------------------------------------

[](#if-you-already-have-the-token-you-can-just-settoken)

```
$api->setToken($user->api_token);

```

Currency
--------

[](#currency)

Get list of all valid currencies

```
$api->getCurrencyList();

```

Country
-------

[](#country)

Get list of all valid countries

```
$api->getCountriesList();

```

Validate
--------

[](#validate)

Verify if is a valid currency code Example: EUR\_€ is valid. Just dump the list to get all valid options.

```
$api->isValidCurrency($currency);

```

Validate user token (will return a boolean)

```
$api->validToken();

```

Validate Date time (or any format)

```
$api->isValidDateTime($date_time, $format); (by default if you dont pass $format will be : Y-m-d H:i:s")

```

Validate Portuguese Zip Code

```
$api->isValidZipCode($zip);

```

Success
-------

[](#success)

This method will return a boolean. You can check if your last request was valid or not.

```
$api->success();

```

DocumentType Requests:
----------------------

[](#documenttype-requests)

```
$api->getDocumentAllTypes();
$api->getDocumentTypesOf($category);

```

PaymentMethods Requests:
------------------------

[](#paymentmethods-requests)

```
$api->getPaymentMethods();

```

DeliveryMethods Requests:
-------------------------

[](#deliverymethods-requests)

```
$api->getDeliveryMethods();
$api->createDeliveryMethod($params);
$api->updateDeliveryMethod($id, $params);
$api->deleteDeliveryMethod($id);

```

MeasurementUnits Requests:
--------------------------

[](#measurementunits-requests)

```
$api->getMeasurementUnits();
$api->createMeasurementUnit($params);
$api->updateMeasurementUnit($id, $params);
$api->deleteMeasurementUnit($id);

```

Vehicles Requests:
------------------

[](#vehicles-requests)

```
$api->getVehicles();
$api->createVehicle($params);
$api->updateVehicle($id, $params);
$api->deleteVehicle($id);

```

DocumentSets Requests:
----------------------

[](#documentsets-requests)

```
$api->getDocumentSets();
$api->createDocumentSet($params);
$api->updateDocumentSet($id, $params);
$api->deleteDocumentSet($id);

```

Taxs Requests:
--------------

[](#taxs-requests)

```
$api->getTaxs();
$api->createTax($params);
$api->updateTax($id, $params);
$api->deleteTax($id);

```

TaxExemptions Requests:
-----------------------

[](#taxexemptions-requests)

```
$api->getTaxExemptions();

```

Warehouses Requests:
--------------------

[](#warehouses-requests)

```
$api->getWarehouses();
$api->createWarehouse($params);
$api->updateWarehouse($id, $params);
$api->deleteWarehouse($id);

```

Contacts(clients,suppliers etc) Requests:
-----------------------------------------

[](#contactsclientssuppliers-etc-requests)

```
$api->getContacts($params);
$api->getContactWithID($id, $params);
$api->createContact($params);
$api->updateContact($id, $params);
$api->deleteContact($id);

```

Items Requests:
---------------

[](#items-requests)

```
$api->getItems($params);
$api->getItemWithID($id, $params);
$api->createItem($params);
$api->updateItem($id, $params);
$api->deleteItem($id);

```

Documents Requests:
-------------------

[](#documents-requests)

```
$api->getDocuments($params);
$api->getDocumentWithID($id, $params);
$api->createDocument($params);
$api->deleteDocument($id);
$api->createDocumentOpeningBalance($params);
$api->communicateBillOfLanding($id);
$api->addTransportationCodeManually($params);
$api->emailDocument($params);
$api->addPrivateNoteToDocument($params);
$api->convertDocumentWithID($document_id, $convert_to, $data, $date_shipping, $date_delivery);

```

Stock Requests:
---------------

[](#stock-requests)

```
$api->getStock($params);
$api->getStockSingleItem($params);
$api->getStockMovements($params);

```

PendingMovements Requests:
--------------------------

[](#pendingmovements-requests)

```
$api->documentsWithPendingMovementsFromContact($params);
$api->pendingMovementsOfMultipleDocuments($params);
$api->pendingMovementsOfSingleDocument($id);

```

Receipts Requests:
------------------

[](#receipts-requests)

```
$api->createReceipt($params);
$api->createReceiptToDocumentWithID($id, $params);

```

Tax Authority Requests:
-----------------------

[](#tax-authority-requests)

```
$api->setTaxAuthorityLoginInformation($params);
$api->testTaxAuthorityLogin();
$api->taxAuthorityLoginState();
$api->taxAuthortiyCommunicationLog();

```

Contact Type Requests:
----------------------

[](#contact-type-requests)

```
$api->getContactTypes($params);
$api->createContactType($params);
$api->updateContactType($id,$params);

```

Document States Requests:
-------------------------

[](#document-states-requests)

```
$api->getDocumentStates($params);
$api->createDocumentState($params);
$api->updateDocumentState($id, $params);
$api->deleteDocumentState($id);
$api->changeDocumentState($params);

```

SMTP Requests:
--------------

[](#smtp-requests)

```
$api->getSmtp();
$api->createSmtp($params);
$api->deleteSmtp();
$api->sendSmtpEmailTest($params);

```

### If you are not sure what params you can use on each request please visit our api doc.

[](#if-you-are-not-sure-what-params-you-can-use-on-each-request-please-visit-our-api-doc)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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

Total

5

Last Release

2856d ago

### Community

Maintainers

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

---

Top Contributors

[![carlosbranco](https://avatars.githubusercontent.com/u/3804828?v=4)](https://github.com/carlosbranco "carlosbranco (3 commits)")

---

Tags

invoicebillbill.pt

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4174.3M18](/packages/horstoeko-zugferd)[atgp/factur-x

PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files

138825.5k3](/packages/atgp-factur-x)[num-num/ubl-invoice

A modern object-oriented PHP library to create and read valid UBL and EN 16931/Peppol BIS 3.0 files

135820.5k](/packages/num-num-ubl-invoice)[anam/phantommagick

PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images

161456.4k2](/packages/anam-phantommagick)[konekt/pdf-invoice

Library to generate PDF invoices

212200.7k](/packages/konekt-pdf-invoice)

PHPackages © 2026

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