PHP code example of cyanofresh / privatbank-api

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

    

cyanofresh / privatbank-api example snippets




hant = new \CyanoFresh\PrivatBankAPI\Merchant('MERCHANT ID HERE', 'MERCHANT PASSWORD HERE');

// Get balance of the card
$merchant->getBalanceInfo('CARD NUMBER HERE');

// Get statements for card for last 1 week
$merchant->getStatements('CARD NUMBER HERE', (new DateTime())->modify('-1 week'), new DateTime());