Download the PHP package sudiptpa/xero-php-sdk without Composer
On this page you can find all versions of the php package sudiptpa/xero-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sudiptpa/xero-php-sdk
More information about sudiptpa/xero-php-sdk
Files in sudiptpa/xero-php-sdk
Package xero-php-sdk
Short Description A fluent, framework-agnostic Xero PHP SDK for PHP 8.2 to 8.5 with rich models and a clean API.
License MIT
Informations about the package xero-php-sdk
If this package saves you time, GitHub Sponsors is a simple way to support it.
A fluent, framework-agnostic Xero SDK for PHP 8.2 to 8.5. No runtime dependencies. Drop it into Laravel, Symfony, or a plain PHP project; it runs anywhere PHP runs.
- Typed models and array responses for Xero resources
- Fluent builders for reads and writes
- Covers Accounting, Payroll, Files, Assets, Projects, Finance, App Store, Identity, and Webhooks
Installation
Requires:
- PHP 8.2 to 8.5
ext-jsonext-curl(for the built-in transport)
If ext-curl is not available, supply your own transport (see Custom transport).
Quick start
After Xero redirects back with a code:
Call tenant() to get a client scoped to that tenant. getClient() works too.
If you already know the tenant id:
Usage
Custom transport
Implement the Transport interface to use a different HTTP client.
Scopes
- Apps created on or after 2 March 2026 must use granular scopes
- Apps created before 2 March 2026 can start requesting granular scopes from April 2026
- All apps must migrate off broad scopes by September 2027
- Request only the scopes the integration actually uses
- Use
.readscopes for read-only work - A missing scope returns a
401insufficient-scope response
Tenants
Use identity()->connections() to list which tenants a token can access. Make tenant-scoped API calls (Accounting, Files, Projects, Assets, Finance, Payroll) only after calling tenant(...).
Auth flow
After callback:
See Auth for PKCE, token refresh, tenant selection, and custom connection flows.
Supported APIs
- Accounting
- Files
- Assets
- Projects
- Payroll AU
- Payroll NZ
- Payroll UK
- Finance
- App Store
- Identity
- Webhooks
Stability
This SDK is maintained against the official Xero OpenAPI specs and ships with full test coverage, static analysis, and formatting checks. Public API corrections that can affect existing callers are reserved for major releases. Patch and minor releases should remain backward compatible.
Documentation
- Field and method reference
- Architecture
- Auth
- Accounting
- Files
- Assets
- Projects
- Payroll AU
- Payroll NZ
- Payroll UK
- Finance
- App Store
- Webhooks
- Release process
Contributing
See Changelog.