PHP code example of brookside / avalara-tax-rates-api

1. Go to this page and download the library: Download brookside/avalara-tax-rates-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

brookside / avalara-tax-rates-api example snippets




use Brookside\TaxRates\TaxRates;

$tr = new TaxRates([
    'username' => 'YOUR_AVALARA_USERNAME',
    'password' => 'YOUR_AVALARA_PASSWORD',
]);

$rates = $tr->getRates(74114);

$rates = $tr->getRates(array(
    'street'  => '4145 E. 21st St',
    'city'    => 'Tulsa',
    'state'   => 'OK',
    'country' => 'USA',
    'postal'  => 74114,
));