PHPackages                             cba85/wave-api-php-client - 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. cba85/wave-api-php-client

AbandonedArchivedLibrary[API Development](/categories/api)

cba85/wave-api-php-client
=========================

Wave GraphQL API PHP client

10PHP

Since Jun 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cba85/wave-api-php-client)[ Packagist](https://packagist.org/packages/cba85/wave-api-php-client)[ RSS](/packages/cba85-wave-api-php-client/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Wave API PHP client
===================

[](#wave-api-php-client)

A PHP client for [Wave](https://www.waveapps.com/) API.

> Note: I've created this package for my personal need. Not all the Wave API operation has been implemented. But you can add an operation by creating a new class in `src/Operations`.

Install
-------

[](#install)

```
$ composer require cba85/wave-api-php-client
```

Usage
-----

[](#usage)

```
use Wave\Wave;

$wave = new Wave('YOUR_WAVE_FULL_ACCESS_TOKEN');
```

### Available methods

[](#available-methods)

#### Get user

[](#get-user)

```
$optionalFields = ['user' => ['id', 'firstName']];
$user = $wave->getUser($optionalFields);
```

#### List businesses

[](#list-businesses)

```
$optionalFields = ['pageInfo' => ['totalCount']];
$optionalArguments = ['businesses' => ['pageSize' => 25]];
$businesses = $wave->listbusinesses($optionalFields, $optionalArguments);
```

#### List products

[](#list-products)

```
 $wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));
$products = $wave->listProducts([], [], [
    'businessId' => getenv('WAVE_BUSINESS_ID'),
    'page' => 1,
    'pageSize' => 1
]);
```

#### Get customer by ID

[](#get-customer-by-id)

```
$optionalFields = ['customer' => ['id', 'name', 'email']];
$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));
$customer = $wave->getCustomerById($optionalFields, [], [
    'businessId' => getenv('WAVE_BUSINESS_ID'),
    'customerId' => getenv('WAVE_CUSTOMER_ID')
]);
```

#### Create customer

[](#create-customer)

```
$optionalFields = ['customer' => ['id', 'name', 'email']];
$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));
$customerCreate = $wave->createCustomer($optionalFields, [], [
    'input' => [
        'businessId' => getenv('WAVE_BUSINESS_ID'),
        'name' => "Santa",
        'firstName' => "Saint",
        'lastName' => "Nicolas",
        'email' => "santa@claus.com",
        'address' => [
            'city' => "North Pole",
            'postalCode' => "H0H H0H",
            'countryCode' => "CA"
        ],
        'currency' => "EUR"
    ]
]);
```

#### Patch customer

[](#patch-customer)

```
$optionalFields = ['customer' => ['id', 'name', 'email']];
$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));
$customerPatch = $wave->patchCustomer([], [], [
    'input' => [
        'id' => getenv('WAVE_CUSTOMER_ID'),
        'email' => "new@email.com"
    ]
]);
```

#### Create invoice

[](#create-invoice)

```
$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));
$invoiceCreate = $wave->createInvoice([], [], [
    'input' => [
        'businessId' => getenv('WAVE_BUSINESS_ID'),
        'customerId' => getenv('WAVE_CUSTOMER_ID'),
        'status' => "DRAFT",
        'items' => [
            'productId' => getenv('WAVE_PRODUCT_ID'),
            'description' => "test",
            'quantity' => 1,
            'unitPrice' => 14.99,
            'taxes' => [
                'salesTaxId' => getenv('WAVE_TAX_ID'),
            ]
        ]
    ]
]);
```

### GraphQL query

[](#graphql-query)

It's also possible to manually send a GraphQL query using the [GraphQL client](https://github.com/mghoneimy/php-graphql-client) included behind the scene:

```
 $query = client->runRawQuery($query, false);
```

Wave API documentation
----------------------

[](#wave-api-documentation)

See [Wave API documentation](https://developer.waveapps.com/hc/en-us/articles/360019968212) for reference.

Tests
-----

[](#tests)

Add Wave tokens and ids in an `.env` file based on `.env.example` file example to test Wave API.

- `WAVE_FULL_ACCESS_TOKEN` : You Wave account full access token.
- `WAVE_BUSINESS_ID` : Wave Business ID you can use for tests only.
    - List them and pick one using :

    ```
    $ ./vendor/bin/phpunit --filter testListBusiness
    ```
- `WAVE_CUSTOMER_ID` : Wave Customer ID you can use for tests only.
- `WAVE_PRODUCT_ID` : Wave Product ID you can use for tests only.
    - List them and pick one using :

    ```
    $ ./vendor/bin/phpunit --filter testListProducts
    ```
- `WAVE_TAX_ID` : A Wave Tax ID used for invoice creation tests.
    - Find your defaultSalesTaxes using :

    ```
    $ ./vendor/bin/phpunit --filter testListProducts
    ```

Then launch tests:

```
$ ./vendor/bin/phpunit
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f8dae5dac31d448b3ae83800c9c084dd576e2c5ef16b6313710048b2904c5db?d=identicon)[cba85](/maintainers/cba85)

---

Top Contributors

[![cba85](https://avatars.githubusercontent.com/u/720547?v=4)](https://github.com/cba85 "cba85 (9 commits)")

---

Tags

phpwave

### Embed Badge

![Health badge](/badges/cba85-wave-api-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/cba85-wave-api-php-client/health.svg)](https://phpackages.com/packages/cba85-wave-api-php-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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