Download the PHP package kepson/wave-client without Composer
On this page you can find all versions of the php package kepson/wave-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kepson/wave-client
More information about kepson/wave-client
Files in kepson/wave-client
Package wave-client
Short Description Laravel client that automates the Wave Business web dashboard by replaying its internal HTTP requests (session + OTP based).
License MIT
Informations about the package wave-client
wave-client
A Laravel package that automates the Wave Business dashboard by replaying its internal GraphQL requests — letting you fetch transaction history, send payouts, check balances, and more from your Laravel application without any manual browser interaction.
Note: This package mimics the private HTTP requests made by the
business.wave.comweb application. It is not based on the officialapi.wave.comREST API. Use responsibly and in accordance with Wave's terms of service.
Requirements
- PHP 8.2+
- Laravel 11, 12, or 13
- A Wave Business account with API/dashboard access
Installation
From Packagist (once published)
Configuration
Publish the config file:
This creates config/wave-client.php. Configure your credentials in .env:
Generating a device ID:
Set the output as WAVE_DEVICE_ID and never change it — Wave uses it to recognise your device across sessions.
Authentication
Wave Business uses a three-step login flow: phone → PIN → SMS code.
Step 1 — Initiate login
login() always throws OtpRequiredException on success — it is the signal that the SMS was dispatched and you must collect the code.
Step 2 — Confirm the SMS code
Via Artisan (interactive terminal)
The command prompts for phone and PIN (if not set in .env), then asks for the SMS code interactively.
Session persistence
The authenticated session (sId, walletId, businessId) is stored in your Laravel cache and reused across requests until it expires (WAVE_SESSION_TTL). You do not need to log in on every request.
If the session expires, actions throw AuthenticationException — catch it to trigger a re-login flow:
Logout
Usage
Transactions
Balance (stub — wire your captured request)
Payout (stub — wire your captured request)
Payment Request (stub — wire your captured request)
Exception Reference
| Exception | When thrown |
|---|---|
OtpRequiredException |
login() succeeded — SMS was sent. Carry on with confirmSms(). |
AuthenticationException |
No valid session exists, or the session expired. Re-run the login flow. |
WaveRequestException |
The HTTP request failed (non-2xx response or GraphQL error field). |
RateLimitException |
HTTP 429 — too many requests. Check $e->getMessage() for retry hint. |
All exceptions extend WaveRequestException, which exposes the raw $e->response (an Illuminate\Http\Client\Response) for debugging.
Testing
The package ships a WaveFake that swaps out the real client in tests — no network calls, no OTP, no credentials needed.
Basic usage
Queueing canned responses
If no response is queued for an action, the fake returns a sensible default.
Assertions
Full test example (Pest)
Full test example (PHPUnit)
Available action keys for assertions
| Key | Triggered by |
|---|---|
auth.login |
Wave::auth()->login() |
auth.confirmSms |
Wave::auth()->confirmSms() |
auth.logout |
Wave::auth()->logout() |
balance.get |
Wave::balance()->get() |
payout.send |
Wave::payout()->send() |
payout.find |
Wave::payout()->find() |
payout.search |
Wave::payout()->search() |
transactions.list |
Wave::transactions()->list() |
transactions.find |
Wave::transactions()->find() |
paymentRequest.create |
Wave::paymentRequest()->create() |
paymentRequest.find |
Wave::paymentRequest()->find() |
paymentRequest.cancel |
Wave::paymentRequest()->cancel() |
Wiring a new action from a captured request
- Open DevTools → Network → copy the request as cURL.
- Identify the GraphQL query string and variables.
- Add a
const QUERYand implement the method in the relevantsrc/Actions/class. - Map the response fields in the corresponding
src/Data/DTO. - Add a
queue*helper and tests inWaveFakeif needed.
The WaveConnector::graphql() method handles auth, headers, error mapping, and trace context automatically.
Running the package tests
License
MIT — see LICENSE.
All versions of wave-client with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0