Download the PHP package taxjar/taxjar-php without Composer

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

TaxJar Sales Tax API for PHP Packagist Build Status

Official PHP client for Sales Tax API v2. For the REST documentation, please visit https://developers.taxjar.com/api.


Requirements
Installation
Authentication
Usage
Custom Options
Sandbox Environment
Error Handling
Testing


Requirements

Installation

Use Composer and add taxjar-php as a dependency:

If you get an error with composer require, update your composer.json directly and run composer update.

Authentication

You're now ready to use TaxJar! Check out our quickstart guide to get up and running quickly.

Usage

categories - List all tax categories
taxForOrder - Calculate sales tax for an order
listOrders - List order transactions
showOrder - Show order transaction
createOrder - Create order transaction
updateOrder - Update order transaction
deleteOrder - Delete order transaction
listRefunds - List refund transactions
showRefund - Show refund transaction
createRefund - Create refund transaction
updateRefund - Update refund transaction
deleteRefund - Delete refund transaction
listCustomers - List customers
showCustomer - Show customer
createCustomer - Create customer
updateCustomer - Update customer
deleteCustomer - Delete customer
ratesForLocation - List tax rates for a location (by zip/postal code)
nexusRegions - List nexus regions
validateAddress - Validate an address
validate - Validate a VAT number
summaryRates - Summarize tax rates for all regions


List all tax categories (API docs)

The TaxJar API provides product-level tax rules for a subset of product categories. These categories are to be used for products that are either exempt from sales tax in some jurisdictions or are taxed at reduced rates. You need not pass in a product tax code for sales tax calculations on product that is fully taxable. Simply leave that parameter out.

Calculate sales tax for an order (API docs)

Shows the sales tax that should be collected for a given order.

List order transactions (API docs)

Lists existing order transactions created through the API.

Show order transaction (API docs)

Shows an existing order transaction created through the API.

Create order transaction (API docs)

Creates a new order transaction.

Update order transaction (API docs)

Updates an existing order transaction created through the API.

Delete order transaction (API docs)

Deletes an existing order transaction created through the API.

List refund transactions (API docs)

Lists existing refund transactions created through the API.

Show refund transaction (API docs)

Shows an existing refund transaction created through the API.

Create refund transaction (API docs)

Creates a new refund transaction.

Update refund transaction (API docs)

Updates an existing refund transaction created through the API.

Delete refund transaction (API docs)

Deletes an existing refund transaction created through the API.

List customers (API docs)

Lists existing customers created through the API.

Show customer (API docs)

Shows an existing customer created through the API.

Create customer (API docs)

Creates a new customer.

Update customer (API docs)

Updates an existing customer created through the API.

Delete customer (API docs)

Deletes an existing customer created through the API.

List tax rates for a location (by zip/postal code) (API docs)

Shows the sales tax rates for a given location.

Please note this method only returns the full combined rate for a given location. It does not support nexus determination, sourcing based on a ship from and ship to address, shipping taxability, product exemptions, customer exemptions, or sales tax holidays. We recommend using taxForOrder to accurately calculate sales tax for an order.

List nexus regions (API docs)

Lists existing nexus locations for a TaxJar account.

Validate an address (API docs)

Validates a customer address and returns back a collection of address matches. Address validation requires a TaxJar Plus subscription.

Validate a VAT number (API docs)

Validates an existing VAT identification number against VIES.

Summarize tax rates for all regions (API docs)

Retrieve minimum and average sales tax rates by region as a backup.

This method is useful for periodically pulling down rates to use if the TaxJar API is unavailable. However, it does not support nexus determination, sourcing based on a ship from and ship to address, shipping taxability, product exemptions, customer exemptions, or sales tax holidays. We recommend using taxForOrder to accurately calculate sales tax for an order.

Sandbox Environment

You can easily configure the client to use the TaxJar Sandbox:

For testing specific error response codes, pass the custom X-TJ-Expected-Response header:

Custom Options

Timeout

This package utilizes Guzzle which defaults to a request timeout value of 0s, allowing requests to remain pending for an indefinite period of time.

You can modify this behavior by configuring the client with a timeout value in seconds.

API Version

By default, TaxJar's API will respond to requests with the latest API version when a version header is not present on the request.

To request a specific API version, include the x-api-version header with the desired version string.

Error Handling

When invalid data is sent to TaxJar or we encounter an error, we’ll throw a TaxJar\Exception with the HTTP status code and error message. To catch these exceptions, refer to the example below:

For a full list of error codes, click here.

Testing

Make sure PHPUnit is installed via composer install and run the following:

To enable debug mode, set the following config parameter after authenticating:


All versions of taxjar-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
guzzlehttp/guzzle Version ^7.2
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 taxjar/taxjar-php contains the following files

Loading the files please wait ....