vinkas/airwallex

PHP SDK for Airwallex API

v1.0.3 2024-12-05 12:37 UTC

This package is auto-updated.

Last update: 2024-12-05 15:24:08 UTC


README

Tests Packagist Version

PHP SDK for Airwallex API

Installation

The package vinkas/airwallex can be installed using composer via Packagist.

composer require vinkas/airwallex

Configuration

Set the Airwallex Client ID and API Key values in Environment variables using the keys AIRWALLEX_CLIENT_ID and AIRWALLEX_API_KEY.

Usage

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