PHP code example of progjp / monobank-api

1. Go to this page and download the library: Download progjp/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/ */

    

progjp / monobank-api example snippets


$client = new Client();
$monobank = new MonobankAPI($client, '<token>');

$response = $monobank->call(new StatementRequest((new StatementDTO())
            ->setAccount('test')
            ->setFrom((new \DateTime('first day of this month'))->getTimestamp())
            ->setTo((new \DateTime('last day of this month'))->getTimestamp())
        ));

$response = $monobank->call(new ClientInfoRequest());

$response = $monobank->call(new WebHookRequest($webHookUrl));

$response = $monobank->call(new WebHookRequest(''));

$client = new Client();
$monobank = new MonobankAPI($client);
$response = $monobank->call(new CurrencyRequest());