Download the PHP package quineworks/taxlane without Composer

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

quineworks/taxlane

Latest Stable Version Total Downloads

Nigeria PAYE, VAT, WHT, CIT, CGT & 9 more tax calculators, as static PHP method calls — no API key, no Guzzle, no account.

Every method returns ['data' => ..., 'rateLimit' => ...] — data is the parsed JSON response as a plain associative array, not a generated class/DTO (see Response shape below for why), and rateLimit is the ceiling that request was measured against (see Rate limits).

Install

Quickstart

Every method throws TaxLane\TaxLaneApiException (a \RuntimeException -- getMessage()/getCode() carry the API's error string/HTTP status) on a non-200 response, and accepts an optional trailing $baseUrl argument to point at a local/staging API instead of the production default:

Endpoints

Method Calculates
calculatePaye PAYE on an employee's gross annual income
calculatePayrollBatch PAYE for up to 1,000 employees in one call
calculateVat VAT on an amount, inclusive or exclusive
calculatePresumptive Presumptive tax on turnover
calculateDirectAssessment Direct Assessment tax on turnover + expenses
calculateCit Companies Income Tax eligibility + liability
calculateWht Withholding tax on a transaction
calculateEmployerCost Full employer cost of a salary package
calculateCgt Capital Gains Tax on a disposal
calculateStampDuty Stamp duty on an instrument
calculateImportDuty Import duty + landed cost on a shipment
calculateNhfContribution NHF contribution on basic salary
calculatePensionContribution Pension contribution + balance projection
calculateCapitalAllowances Taxable profit from assessable profit, capital allowances & loss relief

calculatePaye

Only grossAnnualIncome is required — every other field defaults to 0.

calculatePayrollBatch

Calculates PAYE for up to 1,000 employees in one request — results[i] is exactly what calculatePaye($employees[i]) would return, in the same order. An invalid item throws with an employees[i].-prefixed message; there's no partial-success mode.

calculateVat

calculatePresumptive

calculateDirectAssessment

calculateCit

eligibility is always returned. standardRate is included only when taxableProfit is sent; developmentLevy is included only when assessableProfit is sent — the three are independently computed.

calculateWht

calculateEmployerCost

calculateCgt

digitalAssetCategory is required when assetType is 'digital-asset', ignored otherwise.

calculateStampDuty

calculateImportDuty

calculateNhfContribution

calculatePensionContribution

Only annualBasicSalary is required — yearsToProject defaults to 10 (clamped to 50) and every other field defaults to 0/0.07.

calculateCapitalAllowances

Only assessableProfit is required. Unlike every other method above, this one takes a nested capitalAllowances array (keyed rate10/rate20/ rate25) and flattens it to the API's nine flat wire fields internally, since POST /v1/capital-allowances has never accepted a nested body.

Response shape

Every method returns ['data' => ..., 'rateLimit' => ...]. data is the parsed JSON response body as a plain associative array, not a generated readonly class/DTO. PHP has no structural-typing import across a package boundary the way the JS/TS SDK's cross-package TS type import does, and hand-duplicating every response shape in a third, PHP-only schema would be exactly the kind of extra place to maintain and drift from that SDK avoided in the first place. A plain array is also the common pattern lightweight PHP API-wrapper packages use for response bodies when they don't need strict typing for a stateless, no-auth JSON POST. Each method's PHPDoc block documents data's top-level keys so an IDE isn't left guessing without a shape entirely.

Errors

A missing or non-numeric/non-boolean required field, or an invalid enum value, throws TaxLane\TaxLaneApiException with getCode() of 400 and a getMessage() describing the offending field. See the full field-by-field reference at taxlane.ng/developers or the OpenAPI spec.

Rate limits

Every response's rateLimit key (['limit' => int, 'remaining' => int, 'reset' => int]) is parsed from that response's X-RateLimit-Limit/ X-RateLimit-Remaining/X-RateLimit-Reset headers — present on every successful and 4xx response. On a 429, TaxLaneApiException:: getRetryAfter() returns the number of seconds to wait before retrying, parsed from the Retry-After header:

Limits

No API key required, no daily cap. The underlying API is limited to 50 requests/second (100 burst) at the shared Gateway level to keep the service available for everyone — this SDK does no client-side retry/backoff, since there's no rate limit to work around on a per-caller basis.

Distribution

Published to Packagist as quineworks/taxlane. This README's source of truth is quineworks/tax-lane's sdk-php/ directory — the code here in quineworks/taxlane-php is a public mirror, kept in sync by that repo's sdk-php-publish CI workflow on every tagged release, so that Packagist (which needs anonymous access to a public VCS repo, and can't index a subdirectory of a larger repo) has something to actually publish. Don't edit this copy directly — the next sync will overwrite it.

License

MIT — see LICENSE.


All versions of taxlane with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-curl Version *
ext-json Version *
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 quineworks/taxlane contains the following files

Loading the files please wait ...