Looking to hire Laravel developers? Try LaraJobs

laravel-avalara maintained by jwohlfert23

Description
This is my package laravel-avalara
Author
Last update
2026/03/20 14:05 (dev-main)
License
Downloads
14 593

Comments
comments powered by Disqus

Simple Avalara Client for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

We built this client because of problems with the existing SDK provided by Avalara:

  1. Lack of support for PHP8.
  2. No transformation of responses to PHP models/objects.
  3. Avalara only has a 99.5% SLA, and we thought built-in retries for certain endpoints would be helpful.

Installation

You can install the package via composer:

composer require jwohlfert23/laravel-avalara

You should publish the config file:

php artisan vendor:publish --tag="avalara-config"

Usage

$transaction = new CreateTransaction();

$transaction->date = now();
$transaction->type = AvalaraDocType::SALES_ORDER;
$transaction->customerCode = 'jack@gmail.com';

$transaction->addresses['ShipFrom'] = new \App\Services\Avalara\Models\AddressModel();
$transaction->addresses['ShipTo'] = new \App\Services\Avalara\Models\AddressModel();
  
$transaction->lines[] = new CreateLineItem(
    number: 0,
    amount: 50.00,
    quantity: 2,
    taxCode: 'P0000000'
);

return AvalaraClient::createTransaction($transaction);
// or
return $transaction->create();

License

The MIT License (MIT). Please see License File for more information.