{"id":20375287,"url":"https://github.com/cba85/wave-api-php-client","last_synced_at":"2026-06-10T14:31:45.675Z","repository":{"id":62500253,"uuid":"260859094","full_name":"cba85/wave-api-php-client","owner":"cba85","description":"🧾 Wave API php client","archived":false,"fork":false,"pushed_at":"2020-06-01T14:17:16.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T21:44:21.843Z","etag":null,"topics":["php","wave"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cba85.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T08:25:56.000Z","updated_at":"2023-04-25T11:11:11.000Z","dependencies_parsed_at":"2022-11-02T11:47:35.756Z","dependency_job_id":null,"html_url":"https://github.com/cba85/wave-api-php-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cba85/wave-api-php-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cba85%2Fwave-api-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cba85%2Fwave-api-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cba85%2Fwave-api-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cba85%2Fwave-api-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cba85","download_url":"https://codeload.github.com/cba85/wave-api-php-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cba85%2Fwave-api-php-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34157453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","wave"],"created_at":"2024-11-15T01:29:44.801Z","updated_at":"2026-06-10T14:31:45.633Z","avatar_url":"https://github.com/cba85.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wave API PHP client\n\nA PHP client for [Wave](https://www.waveapps.com/) API.\n\n\u003e 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`.\n\n## Install\n\n```bash\n$ composer require cba85/wave-api-php-client\n```\n\n## Usage\n\n```php\nuse Wave\\Wave;\n\n$wave = new Wave('YOUR_WAVE_FULL_ACCESS_TOKEN');\n```\n\n### Available methods\n\n#### Get user\n\nhttps://developer.waveapps.com/hc/en-us/articles/360032552912-Query-Get-user\n\n```php\n$optionalFields = ['user' =\u003e ['id', 'firstName']];\n$user = $wave-\u003egetUser($optionalFields);\n```\n\n#### List businesses\n\nhttps://developer.waveapps.com/hc/en-us/articles/360032908111-Query-List-businesses\n\n```php\n$optionalFields = ['pageInfo' =\u003e ['totalCount']];\n$optionalArguments = ['businesses' =\u003e ['pageSize' =\u003e 25]];\n$businesses = $wave-\u003elistbusinesses($optionalFields, $optionalArguments);\n```\n\n#### List products\n\nhttps://developer.waveapps.com/hc/en-us/articles/360032572872-Query-Paginate-list-of-products\n\n```php\n $wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));\n$products = $wave-\u003elistProducts([], [], [\n    'businessId' =\u003e getenv('WAVE_BUSINESS_ID'),\n    'page' =\u003e 1,\n    'pageSize' =\u003e 1\n]);\n```\n\n#### Get customer by ID\n\nhttps://developer.waveapps.com/hc/en-us/articles/360032911011-Query-Get-customer-by-id\n\n```php\n$optionalFields = ['customer' =\u003e ['id', 'name', 'email']];\n$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));\n$customer = $wave-\u003egetCustomerById($optionalFields, [], [\n    'businessId' =\u003e getenv('WAVE_BUSINESS_ID'),\n    'customerId' =\u003e getenv('WAVE_CUSTOMER_ID')\n]);\n```\n\n#### Create customer\n\nhttps://developer.waveapps.com/hc/en-us/articles/360032569232-Mutation-Create-customer\n\n```php\n$optionalFields = ['customer' =\u003e ['id', 'name', 'email']];\n$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));\n$customerCreate = $wave-\u003ecreateCustomer($optionalFields, [], [\n    'input' =\u003e [\n        'businessId' =\u003e getenv('WAVE_BUSINESS_ID'),\n        'name' =\u003e \"Santa\",\n        'firstName' =\u003e \"Saint\",\n        'lastName' =\u003e \"Nicolas\",\n        'email' =\u003e \"santa@claus.com\",\n        'address' =\u003e [\n            'city' =\u003e \"North Pole\",\n            'postalCode' =\u003e \"H0H H0H\",\n            'countryCode' =\u003e \"CA\"\n        ],\n        'currency' =\u003e \"EUR\"\n    ]\n]);\n```\n\n#### Patch customer\n\nhttps://developer.waveapps.com/hc/en-us/articles/360033059491-Mutation-Patch-customer\n\n```php\n$optionalFields = ['customer' =\u003e ['id', 'name', 'email']];\n$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));\n$customerPatch = $wave-\u003epatchCustomer([], [], [\n    'input' =\u003e [\n        'id' =\u003e getenv('WAVE_CUSTOMER_ID'),\n        'email' =\u003e \"new@email.com\"\n    ]\n]);\n```\n\n#### Create invoice\n\nhttps://developer.waveapps.com/hc/en-us/articles/360019968212-API-Reference\n\n```php\n$wave = new Wave(getenv('WAVE_FULL_ACCESS_TOKEN'));\n$invoiceCreate = $wave-\u003ecreateInvoice([], [], [\n    'input' =\u003e [\n        'businessId' =\u003e getenv('WAVE_BUSINESS_ID'),\n        'customerId' =\u003e getenv('WAVE_CUSTOMER_ID'),\n        'status' =\u003e \"DRAFT\",\n        'items' =\u003e [\n            'productId' =\u003e getenv('WAVE_PRODUCT_ID'),\n            'description' =\u003e \"test\",\n            'quantity' =\u003e 1,\n            'unitPrice' =\u003e 14.99,\n            'taxes' =\u003e [\n                'salesTaxId' =\u003e getenv('WAVE_TAX_ID'),\n            ]\n        ]\n    ]\n]);\n```\n\n### GraphQL query\n\nIt's also possible to manually send a GraphQL query using the [GraphQL client](https://github.com/mghoneimy/php-graphql-client) included behind the scene:\n\n```php\n $query = \u003c\u003c\u003c'GRAPHQL'\n            query {\n                user {\n                    id\n                    firstName\n                    lastName\n                    defaultEmail\n                    createdAt\n                    modifiedAt\n                }\n            }\n            GRAPHQL;\n$wave = new Wave('YOUR_WAVE_FULL_ACCESS_TOKEN');\n$results = $wave-\u003eclient-\u003erunRawQuery($query, false);\n```\n\n## Wave API documentation\n\nSee [Wave API documentation](https://developer.waveapps.com/hc/en-us/articles/360019968212) for reference.\n\n## Tests\n\nAdd Wave tokens and ids in an `.env` file based on `.env.example` file example to test Wave API.\n\n- `WAVE_FULL_ACCESS_TOKEN` : You Wave account full access token.\n- `WAVE_BUSINESS_ID` : Wave Business ID you can use for tests only.\n  - List them and pick one using : \u003cbr\u003e\n  ```bash\n  $ ./vendor/bin/phpunit --filter testListBusiness\n  ```\n- `WAVE_CUSTOMER_ID` : Wave Customer ID you can use for tests only.\n- `WAVE_PRODUCT_ID` : Wave Product ID you can use for tests only.\n  - List them and pick one using : \u003cbr\u003e\n  ```bash\n  $ ./vendor/bin/phpunit --filter testListProducts\n  ```\n- `WAVE_TAX_ID` : A Wave Tax ID used for invoice creation tests.\n  - Find your defaultSalesTaxes using : \u003cbr\u003e\n  ```bash\n  $ ./vendor/bin/phpunit --filter testListProducts\n  ```\n\nThen launch tests:\n\n```bash\n$ ./vendor/bin/phpunit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcba85%2Fwave-api-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcba85%2Fwave-api-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcba85%2Fwave-api-php-client/lists"}