PHP code example of sashalenz / monobank-api

1. Go to this page and download the library: Download sashalenz/monobank-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sashalenz / monobank-api example snippets


return [
];

use Sashalenz\MonobankApi\MonobankApi;

$rates = MonobankApi::bank()->currency();

foreach ($rates as $rate) {
    echo $rate->currencyCodeA . ' => ' . $rate->rateBuy . PHP_EOL;
}

$info = MonobankApi::personal()->token($token)->clientInfo();

MonobankApi::personal()->token($token)->webhook('https://example.com/monobank');

$statement = MonobankApi::personal()
    ->token($token)
    ->statement($accountId, $dateFrom, $dateTo);
bash
php artisan vendor:publish --tag="monobank-api-config"