-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
nejcc edited this page Jul 7, 2026
·
2 revisions
A Laravel SDK for the Minimax accounting API (SI / HR / RS). It handles OAuth2 auth and token caching, and wraps issued invoices, orders, customers, items and the code lists behind a small fluent API.
- Zero-config auth — OAuth2 password grant with automatic, leeway-aware token caching.
- Fake mode — canned fixtures so the SDK and admin UI run end-to-end before your credentials arrive.
- Fluent resources — typed CRUD helpers plus a generic escape hatch for any endpoint.
- MCP server — read the API from AI coding agents (Boost, Claude, Codex).
- PHP 8.4+
- Laravel 13
composer require nejcc/minimax-sdk
php artisan vendor:publish --tag=minimax-configAdd your credentials to .env (see Configuration):
MINIMAX_LOCALIZATION=SI
MINIMAX_CLIENT_ID=...
MINIMAX_CLIENT_SECRET=...
MINIMAX_USERNAME=...
MINIMAX_PASSWORD=...
MINIMAX_ORG_ID=123456No credentials yet? Set MINIMAX_FAKE=true and everything runs off canned fixtures.
use Nejcc\Minimax\Facades\Minimax;
// which orgs can this user see
$orgs = Minimax::orgs()->all();
// customers in the default org
$customers = Minimax::customers()->all()['Rows'];
// switch org for one chain
Minimax::forOrg(654321)->items()->all();
// create a draft invoice, issue it, grab the PDF
$invoice = Minimax::invoices()->create([...]);
$pdf = Minimax::invoices()->pdf($invoice['IssuedInvoiceId'], $invoice['RowVersion']);Minimax SDK