Download the PHP package elvesora/allocora-laravel without Composer

On this page you can find all versions of the php package elvesora/allocora-laravel. 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 allocora-laravel

Allocora Laravel

elvesora/allocora-laravel is the self-contained Laravel client for Allocora's public v1 API. It supports Laravel 12 and 13 and provides automatic discovery, dependency injection, a facade, publishable configuration, typed exceptions, and explicit resource methods.

Requirements

Laravel Supported PHP versions
12 8.2, 8.3, 8.4, or 8.5
13 8.3, 8.4, or 8.5

The JSON and Mbstring PHP extensions are required. You also need an Allocora API key with the scopes required by your operations.

Installation

Composer resolves stable releases through Packagist. Pin the compatible ^0.1 series as shown above and review the changelog before upgrading.

Add the key to your deployment environment. Never commit it:

Laravel package discovery registers AllocoraServiceProvider. The published config/allocora.php is the only place that reads these environment values.

Quick start

Inject the contract into a controller, job, listener, or service:

The concrete client resolves from the container as well:

The optional facade provides the same resource methods:

Write methods accept associative arrays that match the public API payload. For example, revenue records are append-only:

The public API reference documents the complete request and response shapes for every resource.

Authentication and scopes

Every request uses Authorization: Bearer <key>. Create keys with only the scopes your integration needs:

Resource Read scope Write scope
Payees read:payees write:payees
Products read:products write:products
Revenues read:revenues write:revenues
Rules read:rules write:rules

Invalid keys raise AuthenticationException; insufficient scope raises AuthorizationException.

Resource methods

All methods return Elvesora\Allocora\Laravel\ApiResponse.

Revenue records have no update or delete methods. Correct an error through Allocora's documented refund or adjustment model. Product archival changes status rather than deleting financial history.

Revenue listing alone is paginated. It accepts page, per_page (default 25, maximum 100), type, revenue_source_id, currency, date_from, date_to, and search; pagination details are returned in meta() as current_page, last_page, per_page, and total.

Batch methods accept 1 to 100 keyed records and send the required {"records":[...]} envelope. Update and archive records require an id UUID. A successful batch response can contain both successful and failed records, so inspect data() and the processed, succeeded, and failed values in meta().

Responses

ApiResponse is immutable:

Successful responses must be JSON objects with a JSON content type. Malformed, non-object, non-JSON, compressed, oversized, or abnormally header-heavy successful responses raise InvalidResponseException. Response bodies and header values are available only through the explicit accessors above; debug and export output expose metadata rather than their contents, and native serialization is blocked. HTTP error responses remain status-typed even when their bodies are malformed, compressed, or oversized.

Errors and retries

The package maps 401, 403, 404, 422, 429, and 5xx responses to AuthenticationException, AuthorizationException, NotFoundException, ValidationException, RateLimitException, and ServerException. Other non-2xx responses raise ApiException; network failures raise TransportException.

Client-side failures use ConfigurationException for invalid or missing package configuration and InvalidInputException for invalid identifiers, query parameters, payloads, or batch input. These failures are raised before an HTTP request is sent; correct the input or configuration instead of retrying it unchanged.

ApiException exposes statusCode, a fixed status-category errorCode, retryAfterSeconds, and a sanitized requestId. Error response bodies are untrusted and are never copied into exception messages, codes, traces, or debug output. The fixed codes are AUTHENTICATION_ERROR, AUTHORIZATION_ERROR, NOT_FOUND, VALIDATION_ERROR, RATE_LIMIT_ERROR, SERVER_ERROR, and API_ERROR.

The client never retries automatically. Writes can represent financial facts and are not assumed idempotent. Reconcile the result before retrying a create, update, upsert, batch, archive, or rule-status operation, use stable external identifiers when supported, and respect retryAfterSeconds for 429 responses.

Transport and credential safety

Applications remain responsible for keeping keys out of source control, logs, queues, caches, telemetry, browser output, and user-visible errors. Rotate a disclosed key immediately.

The package surface is locked to the 32 operations in resources/public-api-manifest.json across payees, products, revenue records, and rules.

Development

See CHANGELOG.md.

License

MIT. See LICENSE.


All versions of allocora-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.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 elvesora/allocora-laravel contains the following files

Loading the files please wait ...