Download the PHP package chrisjohnleah/sage-business-cloud-accounting-api without Composer

On this page you can find all versions of the php package chrisjohnleah/sage-business-cloud-accounting-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sage-business-cloud-accounting-api

Sage Business Cloud Accounting API — PHP SDK

CI Packagist Version Total Downloads PHP Version

A modern, framework-agnostic PHP SDK for the Sage Business Cloud Accounting API (v3.1), built on Saloon. Typed responses, OAuth2 with rotating-refresh handling, X-Business targeting, automatic $next pagination, and rate-limit / 429 backoff — all baked in.

Using Laravel? Reach for the companion bridge chrisjohnleah/sage-business-cloud-accounting-api-laravel for a service provider, an Eloquent token store, and sage:connect / sage:sync commands.

Why this package

The Sage Accounting API has sharp edges that this SDK smooths over for you:

Sage quirk What the SDK does
5-minute access tokens Refreshes proactively before expiry
Rotating refresh tokens (single-use) Surfaces the rotated token so you can persist it
Mandatory X-Business header Applied automatically once a business is selected
No webhooks First-class incremental polling via updated_or_created_since / deleted_since
Body-based $next pagination Iterated transparently — foreach over every record
Rate limits (100/min per company) Honours 429 Retry-After and backs off exponentially

Requirements

Installation

Quick start

1. Send the user to Sage to authorise

2. Handle the callback

3. Read data (auto-refreshes, auto-paginates)

Persisting tokens

Implement Contracts\TokenStore to store tokens wherever you like (the Laravel bridge ships an Eloquent one). Sage rotates the refresh token on every refresh, so your put() must always overwrite the previous record:

Coverage

The entire Sage Accounting v3.1 API. Every schema (200+) has a typed DTO and every operation (280+, including writes) has a request class — generated from the OpenAPI spec and verified by contract tests, so coverage can't silently regress.

Ergonomic, lazily-paginated resources are provided for the common entities (businesses(), contacts(), purchaseInvoices()); every other endpoint is reachable by sending its generated request through $sage->connector():

Regenerating from the spec

The hand-crafted core (connector, OAuth, paginator, client, Reference/Paginated) is never touched — only the leaf DTOs and request classes are generated.

Testing

Tests never hit the network — every request is faked with Saloon's MockClient.

Contributing

Issues and PRs welcome — see SECURITY.md.

Licence

MIT © Chris John Leah. See LICENSE.

Not affiliated with or endorsed by The Sage Group plc. "Sage" is a trademark of its respective owner.


All versions of sage-business-cloud-accounting-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
saloonphp/saloon Version ^4.0
saloonphp/pagination-plugin Version ^2.0
saloonphp/rate-limit-plugin Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chrisjohnleah/sage-business-cloud-accounting-api contains the following files

Loading the files please wait ...