- How do I install contoweb/laravel-abacus-api in a Laravel app?
- Install via Composer using composer require contoweb/laravel-abacus-api, then publish config and set Abacus credentials. The package registers a service provider and exposes an AbacusClient through Laravel's container. Exact config keys and Laravel version constraints should be checked in the package's composer.json and README, since this assessment did not inspect source.
- Which Laravel and PHP versions does contoweb/laravel-abacus-api support?
- The provided context does not list Laravel or PHP version constraints, so verify them in the package's composer.json before adoption. Do not assume support for the latest Laravel release. Run a quick install spike in a branch matching your production PHP version.
- How do I configure Abacus API credentials in Laravel?
- The package is configuration-driven: publish its config file and supply your Abacus API credentials, likely base URL and auth details, through environment variables. Keep secrets in .env and never commit them. Confirm exact key names from the published config file because they are not included in the provided overview.
- What does AbacusClient::toException() do for API errors?
- AbacusClient::toException() maps HTTP error responses to package exception types. As of v0.2.0 it maps 404 responses to AbacusNotFoundException, alongside existing mappings for 400, 403, and 429. You should catch the specific exception or a shared base class if one exists, and log request context for 404s.
- Does contoweb/laravel-abacus-api throw AbacusNotFoundException on a 404?
- Yes, according to the v0.2.0 release note, AbacusClient::toException() maps 404 responses to AbacusNotFoundException. The release claims no breaking change, but you should verify whether that exception extends a common AbacusException base class. If it does not, existing broad catch blocks may behave differently after upgrading.
- Should I call contoweb/laravel-abacus-api from controllers or queued jobs?
- Prefer queued jobs rather than request-path controllers so Abacus latency and rate limits do not affect user-facing response times. Wrap the client behind your own AccountingGateway interface and call it from jobs. That also makes it easier to swap the transport if the pre-1.0 package changes.
- Is contoweb/laravel-abacus-api production-ready for accounting integrations?
- Treat it as an infrastructure adapter, not a domain dependency, because it is pre-1.0 and has thin vendor support. Start read-only, add reconciliation reporting, and keep write paths behind a feature flag. Validate the 404 mapping and rate-limit behavior in a spike before relying on it for ledger writes.
- How does contoweb/laravel-abacus-api handle rate limits and retries?
- The package maps 429 responses to an exception, but the provided context does not confirm automatic retry or backoff behavior. Check the source and Abacus API documentation for rate limits and retry guidance. Implement your own queued retry/backoff if the package does not provide it.
- Can contoweb/laravel-abacus-api fetch Abacus contacts, invoices, or bookings?
- The package provides a structured API client and an extensible foundation for adding endpoints, so it can support reads such as contacts, reference data, and invoices. Start with read-only calls and verify which endpoints are implemented in v0.2.0. Write paths such as bookings and invoice creation should be feature-flagged and reconciled.
- What are alternatives to contoweb/laravel-abacus-api for Laravel Abacus integration?
- Alternatives include calling the Abacus web services directly with Laravel's HTTP client, or building a thin in-house adapter around Guzzle. If you need a packaged client, compare maintenance activity, Laravel version constraints, and exception behavior. Given the package's pre-1.0 status and single contributor, an adapter boundary is advisable regardless of choice.