lasserafn/php-dinero
PHP Dinero REST wrapper
This is a PHP wrapper for Dinero. Forked from lasserafn/laravel-dinero.
Installation
- Require using composer
composer require lasserafn/php-dinero
Requirements
- PHP +5.6
Getting started
-
Apply as a developer at Dinero
-
Get your client id and secret
-
Find the organisation id when logged into Dinero (bottom left)

-
Create an API key inside Dinero
-
Utilize the wrapper as below
$dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret );
$dinero->auth( $apiKey, $orgId ); // this WILL send a request to the auth API.
$contacts = $dinero->contacts()->perPage(10)->page(2)->get();
// Do something with the contacts.
$invoices = $dinero->invoices()->all();
$products = $dinero->products()->deletedOnly()->all();
You can also use an old auth token, if you dont want to auth everytime you setup a new instance of Dinero.
$dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret );
$dinero->setAuth($token, $orgId); // this will NOT send a request to the auth API.
$products = $dinero->products()->deletedOnly()->all();
Usage
Creating Contacts
// Create Instance
$dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret );
// Auth to a Dinero account
$dinero->auth( $apiKey, $orgId );
// Create the contact
$contact = $dinero->contacts()->create([ 'IsPerson' => true, 'Name' => 'Test', 'CountryKey' => 'DK' ]);
// if the request succeeded, $contact will be a \LasseRafn\Dinero\Models\Contact object.
Related Packages
redeman/imgur-laravel
Laravel Package for Imgur API. Provides easy access to the adyg/php-imgur-api-cl...
2,639
9
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.0.3 | >=7.0 | MIT | |
| 1.0.2 | >=7.0 | MIT | |
| 1.0.1 | >=7.0 | MIT | |
| 1.0.0 | >=7.0 | MIT | |
| v0.65 | >=7.0 | MIT | |
| 0.7.8 | >=7.0 | MIT | |
| 0.7.7 | >=7.0 | MIT | |
| 0.7.6 | >=7.0 | MIT | |
| 0.7.5 | >=7.0 | MIT | |
| 0.7.4 | >=7.0 | MIT | |
| 0.7.3 | >=7.0 | MIT | |
| 0.7.2 | >=7.0 | MIT | |
| 0.7.1 | >=7.0 | MIT | |
| v0.7 | >=7.0 | MIT | |
| 0.6 | >=7.0 | MIT | |
| v0.5 | >=7.0 | MIT |