PHP SDK for Airwallex API
The package vinkas/airwallex
can be installed using composer via Packagist.
composer require vinkas/airwallex
Set the Airwallex Client ID and API Key values in Environment variables using the keys AIRWALLEX_CLIENT_ID
and AIRWALLEX_API_KEY
.
Create a new Client
instance and get the balances related endpoints like below
use Vinkas\Airwallex\Client;
$client = new Client();
$balances = $client->getBalances()->getCurrent()->array();
$balanceHistory = $client->getBalances()->getHistory()->object(); // Result will include records for the last 7 days by default
$balanceHistory = $client->getBalances()->getHistory($from, $to)->object(); // $from & $to - any dates in ISO8601 format. max time range - 7 days
For more API-related details refer to https://www.airwallex.com/docs/api