Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans authored Dec 5, 2024
1 parent b64bcef commit b43e357
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,29 @@ PHP SDK for Airwallex API

## Installation

The package [`vinkas/airwallex`](https://packagist.org/packages/vinkas/airwallex) can be installed using composer via packagist.
The package [`vinkas/airwallex`](https://packagist.org/packages/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

```php
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

0 comments on commit b43e357

Please sign in to comment.