Download the PHP package picqer/moneybird-php-client without Composer
On this page you can find all versions of the php package picqer/moneybird-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download picqer/moneybird-php-client
More information about picqer/moneybird-php-client
Files in picqer/moneybird-php-client
Package moneybird-php-client
Short Description A PHP Client for the Moneybird V2 API
License MIT
Homepage https://github.com/picqer/moneybird-php-client
Informations about the package moneybird-php-client
Moneybird PHP Client
PHP Client for the Moneybird API. This client lets you integrate with Moneybird, for example by:
- Creating and sending invoices
- Creating and updating contact
- Uploading incoming invoices of purchases
- Create manual journal bookings
This library is created and maintained by Picqer. We are looking for PHP developers to join our team!
Installation
This project can easily be installed through Composer.
Usage
You need to have to following credentials and information ready. You can get this from your Moneybird account.
- Client ID
- Client Secret
- Callback URL
You need to be able to store some data locally:
- The three credentials mentioned above
- Authorizationcode
- Accesstoken
Authorization code
If you have no authorization code yet, you will need this first. The client supports fetching the authorization code as follows.
This will perform a redirect to Moneybird at which you can login and authorize the app for a specific Moneybird administration. After login, Moneybird will redirect you to the callback URL with request param "code" which you should save as the authorization code.
Setting the administration ID
Most methods require you to set the Administration ID to fetch the correct data. You can get the Administration ID from the URL at MoneyBird, but you can also list the administrations your user has access to running the following method after connecting. In the code samples below there's an example on how to set the first administrations from the results of the call below:
Normal actions
After you have the authorization code as described above, you can perform normal requests. The client will take care of the accesstoken automatically.
Code example
See for example: example/example.php
TODO
- Receiving webhooks support (would be nice)
- Some linked/nested entities (notes, attachments etcetera)
- Dedicated Exception for RateLimit reached and return of Retry-After value
All versions of moneybird-php-client with dependencies
guzzlehttp/guzzle Version ^6.3.1|^7.0
psr/http-client Version ^1.0
ext-json Version *