PHPackages                             jeffgreco13/laravel-wave - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. jeffgreco13/laravel-wave

ActiveProject[API Development](/categories/api)

jeffgreco13/laravel-wave
========================

A wrapper to use the Wave GraphQL API in your Laravel apps.

v1.1.0(2mo ago)0144↓100%[1 issues](https://github.com/jeffgreco13/laravel-wave/issues)1MITPHPPHP ^8.2

Since Nov 22Pushed 2mo agoCompare

[ Source](https://github.com/jeffgreco13/laravel-wave)[ Packagist](https://packagist.org/packages/jeffgreco13/laravel-wave)[ RSS](/packages/jeffgreco13-laravel-wave/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (14)Used By (1)

Laravel Wave
============

[](#laravel-wave)

A wrapper to use the [Wave](https://www.waveapps.com/)'s graphql api in your laravel apps. This package was originally forked from [subbe/waveapp](https://github.com/subbe/waveapp) and adds some QOL improvements for Laravel devs.

Wave API documentation can be located at:

- [Wave - Developer Portal](https://developer.waveapps.com/hc/en-us/categories/360001114072)
- [API Reference](https://developer.waveapps.com/hc/en-us/articles/360019968212-API-Reference)

Application Setup
-----------------

[](#application-setup)

To use Laravel Wave, you will need to [create an app](https://developer.waveapps.com/hc/en-us/articles/360019762711) on the developer portal.

After you have created a new app, click in to edit its settings. Create a new Full Access token and copy this to a save place. You will need this in your .env

OAuth flow is not supported by this package. Consider using the [Socialite Wave Provider](https://github.com/SocialiteProviders/Providers/tree/master/src/Wave) then pass the Access Token to the Wave class at runtime.

Installation
------------

[](#installation)

Require the package using composer:

```
composer require jeffgreco13/laravel-wave
```

Update your .env file to include:

```
WAVE_ACCESS_TOKEN= *your full access token*
WAVE_BUSINESS_ID= *ID for the business you wish to interact with*
WAVE_GRAPHQL_URI= *defaults to https://gql.waveapps.com/graphql/public*

```

If you do not know the ID for your business, you can use the following tinker command:

```
php artisan tinker
> (new \Jeffgreco13\Wave\WaveService())->getBusinesses()
```

Usage
-----

[](#usage)

### Query

[](#query)

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$businesses = $wave->getBusinesses();
```

or, with parameters...

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$invoices = $wave->getInvoices([
    "page" => 5,
    "pageSize" => 20
    "sort" => InvoiceSort::MODIFIED_AT_DESC,
    "modifiedAtStart" => now()->copy()->subHours(24)->toIso8601String()
]);
```

### Pagination

[](#pagination)

Queries like `businesses` and `customers` may require pagination. Some shortcut methods exist:

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$allInvoices = $wave->getAllInvoices([
  "modifiedAtStart" => now()
    ->subHours(5)
    ->toISOString()
]);
```

Or, you can create your own loop:

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$allRecords = collect();
$parameters = [
    "page" => 1,
    "pageSize" => 100
];
do {
    $records = $wave->getInvoices($parameters);
    $allRecords = $allRecords->merge($records);
    $parameters["page"]++;
} while ($wave->hasNextPage());
```

### Mutation

[](#mutation)

Refer to the Wave [API Reference](https://developer.waveapps.com/hc/en-us/articles/360019968212-API-Reference#invoicecreateinput) for input formats and required fields.

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$invoice = $wave->createInvoice([
    // 'businessId' => 'Qwxyz...'
    "customerId" => "Qwxyz...",
    "invoiceDate" => "yyyy-MM-dd",
    "items" => [
        [
            "productId" => "Qwxyz...",
            //
            "quantity" => 2.5, // Supports decimal. Default: 1
            "unitPrice" => 115.50, // Default: price set in Wave for this product.
            "taxes" => ["QwSalesTaxId..."] // Default: tax(es) set in Wave for this product.
        ],

        // More line items can go here...

    ]
]);

// Approve the invoice
$wave->approveInvoice($invoice->id);

// Send the invoice
$wave->sendInvoice([
    "invoiceId" => $invoice->id,
    "to" => [
        "customer@email.com"
    ]
])
```

### Raw Query

[](#raw-query)

You can perform any raw query or mutation like so:

```
use Jeffgreco13\Wave\WaveService;

$wave = new WaveService();

$graphQl =  [
        "name" => "Business name"
    ]
];
$response = $wave->rawQuery($graphQl,$variables);
```

### Available methods

[](#available-methods)

- rawQuery(string $query, ?array $variables)
- getUser()
- getAllCountries()
- getAllCurrencies()
- getAllBusinesses()
- getBusiness(?string $id)
- getAllProducts()
- getAllTaxes()
- getCustomers()
- getAllCustomers()
- createCustomer(array $input)
- patchCustomer(array $input)
- getInvoices()
- getAllInvoices()
- createInvoice(array $input)
- approveInvoice(string $invoiceId)
- sendInvoice(array $input)

### Currency

[](#currency)

A simple way to download Wave's currencies and cache them for use in your app:

First run the artisan command. This downloads the static currencies to a json file and saves them in your storage path:

```
php artisan wave:pull-currencies

```

You may now use the Currency class like so:

```
use Jeffgreco13\Wave\WaveCurrency;

$currencies = WaveCurrency::all(); // returns a Collection of Currency objects

$currency = WaveCurrency::firstWhere("code","ARS"); // returns a single Currency object if found, or null
echo $currency->name; // output: Argentinian peso

// Currency array attributes
array:5 [
  "code" => "ARS"
  "symbol" => "$"
  "name" => "Argentinian peso"
  "plural" => "Argentinian pesos"
  "exponent" => 2
]
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

[MIT](./LICENSE.md)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~23 days

Total

11

Last Release

73d ago

Major Versions

v0.4.0 → v1.0.02025-11-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/89c96adbc3b802ff12fb5ccfab0e0d6e352039505e9ee0cd13496c205a1d933e?d=identicon)[jeffgreco13](/maintainers/jeffgreco13)

---

Top Contributors

[![subbe](https://avatars.githubusercontent.com/u/3587988?v=4)](https://github.com/subbe "subbe (22 commits)")[![murraycollingwood](https://avatars.githubusercontent.com/u/5810216?v=4)](https://github.com/murraycollingwood "murraycollingwood (19 commits)")[![jeffgreco13](https://avatars.githubusercontent.com/u/12453974?v=4)](https://github.com/jeffgreco13 "jeffgreco13 (18 commits)")[![mrpangak](https://avatars.githubusercontent.com/u/44047484?v=4)](https://github.com/mrpangak "mrpangak (1 commits)")[![nhantrandev96](https://avatars.githubusercontent.com/u/43448496?v=4)](https://github.com/nhantrandev96 "nhantrandev96 (1 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffgreco13-laravel-wave/health.svg)

```
[![Health](https://phpackages.com/badges/jeffgreco13-laravel-wave/health.svg)](https://phpackages.com/packages/jeffgreco13-laravel-wave)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sburina/laravel-whmcs-up

WHMCS API client and user provider for Laravel

271.3k](/packages/sburina-laravel-whmcs-up)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
