laravel-accurate maintained by chrislorando
Description
Laravel package for Accurate Online API integration.
Author
Last update
2026/08/10 17:13
(dev-main)
License
Downloads
57
Tags
Laravel Accurate
Laravel package for integrating with the Accurate Online accounting API. Provides OAuth 2.0 authentication, database management, and a fluent API client.
📘 Refer to the Accurate Online API Documentation for full API reference.
Installation
You can install the package via composer:
composer require chrislorando/laravel-accurate
You can publish and run the migrations with:
php artisan vendor:publish --tag="accurate-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="accurate-config"
This is the contents of the published config file:
return [
'client_id' => env('ACCURATE_CLIENT_ID'),
'client_secret' => env('ACCURATE_CLIENT_SECRET'),
'redirect_uri' => env('ACCURATE_REDIRECT_URI'),
'base_url' => env('ACCURATE_BASE_URL', 'https://account.accurate.id'),
'timeout' => 30,
'verify_ssl' => true,
'scopes' => ['item_view', 'invoice_view', 'customer_view'],
];
Usage
OAuth Connect Flow
Add the following environment variables to your .env:
ACCURATE_BASE_URL=https://account.accurate.id
ACCURATE_CLIENT_ID=your-client-id
ACCURATE_CLIENT_SECRET=your-client-secret
ACCURATE_REDIRECT_URI=https://your-app.test/accurate/callback
Then register the callback route in your routes/web.php:
use ChrisLorando\LaravelAccurate\Http\Controllers\CallbackController;
Route::get('accurate/callback', CallbackController::class)->name('accurate.callback');
Then visit /accurate/connect to start the OAuth flow.
Using the Facade
use ChrisLorando\LaravelAccurate\Facades\Accurate;
// Get the authorization URL
$url = Accurate::authorizationUrl();
// Get database list for a connection
$databases = Accurate::connection('default')->databases();
// Open a specific database
$db = Accurate::connection('default')->openDatabase('123456');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.