picqer/moneybird-php-client
A PHP client for the Moneybird API that simplifies access to invoices, contacts, products, financial data, and administration resources. It handles authentication and API requests, making Moneybird integration straightforward for Laravel and PHP applications.
Architecture fit. The package is a thin, framework-agnostic PHP API client over the Moneybird REST API. It exposes Moneybird's resources (administrations, contacts, sales invoices, products) as fluent model objects with save(), delete(), filtering, and pagination. It is an infrastructure dependency, not a domain library: it owns HTTP transport, OAuth plumbing, and model hydration, but no persistence, no queueing, no webhook handling, and no sync state. The correct architectural placement in a Laravel app is behind a domain-level port (an AccountingGateway interface plus adapters), so application code never touches Moneybird-shaped objects. Fit is strong if Moneybird is a downstream destination we write to and read back for reconciliation; it is weaker if we intend to mirror Moneybird as a system of record inside our own data model, because that mapping and idempotency layer is entirely ours to build.
Integration feasibility. Low code barrier. Composer install, register an OAuth app in Moneybird, implement the redirect/callback flow, persist access and refresh tokens, bind a singleton via a service provider, configure credentials. The real effort is not the client but the OAuth lifecycle (token storage encryption, refresh scheduling, per-administration scoping) and the surrounding orchestration. The 85-star count and single-vendor ownership (Picqer) signal a small community; the package is a convenience wrapper, not a platform. The overall score of 2.835 is consistent with "usable but thin" — do not treat it as a batteries-included SDK.
Technical risk.
Key questions.
Stack fit. Composer-native, Laravel-friendly, Guzzle-backed. Wrap it: a config file for client credentials and scopes, a service provider binding the client, and a repository/adapter exposing domain DTOs. All writes should run on queued jobs, never inside a synchronous request cycle — accounting APIs are external, rate-limited, and failure-prone.
Migration path. Stage the integration, don't big-bang it. Phase 1: OAuth spike — prove the authorization-code flow, token persistence, and refresh against a test administration. Phase 2: read-only pull (administrations, contacts, invoices) into an internal staging table to validate mapping and rate-limit behavior. Phase 3: a single outbound write path (create sales invoice) behind a queue with idempotency keys and reconciliation. Phase 4: broaden resource coverage. Phase 5: per-customer rollout.
Compatibility. Confirm the minimum PHP version against our Laravel version (likely PHP 8.x, but verify). Lock the Composer version explicitly rather than floating. The OAuth callback requires HTTPS and CSRF/state handling; ensure the redirect URI is registered per environment.
Sequencing.
Maintenance. Small dependency footprint and low churn, but we own the glue: token refresh scheduling, error taxonomy, retry policy, and model-to-domain mapping. Pin versions; track the package's releases against Moneybird's API changelog. Budget a small recurring engineering allowance for API drift and occasional upstream fixes.
Support. Community-driven; no SLA. Escalation splits two ways — API/account issues go to Moneybird support, client bugs to the maintainer via issues. Keep the adapter boundary thin so a direct-HTTP fallback is a contained, low-risk task if the package goes stale.
Scaling. The client is stateless HTTP; scale constraints are rate limits and sync throughput, not CPU. Design a per-administration token bucket, cap queue worker concurrency, and handle pagination explicitly. Bulk operations (mass invoice import, contact backfills) require batching and deliberate throttling; naive loops will hit 429s and slow the whole sync.
Failure modes. Refresh-token expiry or revoked app access → forced re-authorization UX, not a silent failure. 429 rate limits → exponential backoff with jitter. 5xx and duplicate POSTs → idempotency keys plus reconciliation, otherwise duplicate invoices land in a customer's books. Partial writes → transaction-style compensation or reconciliation jobs. Model validation exceptions → surfaced to ops, not swallowed. API version changes and field drift → contract tests in CI against a sandbox.
Ramp-up. A mid-level Laravel engineer can wire the client in days; the difficulty is concentrated in OAuth lifecycle, reliable sync, and accounting domain semantics (journal posting, invoice numbering, VAT handling). Plan for finance/accounting SME time alongside engineering. Documentation is adequate but shallow — expect engineers to read the source and Moneybird's API docs, and budget for that in the estimate rather than discovering it mid-sprint.
How can I help you explore Laravel packages today?