This SDK lets you perform API calls to BlocHQ APIs.
To install the SDK in your project you need to require the package via composer:
composer require stephenjude/blochq-php-sdk
You can create an instance of the SDK like so:
$blocHQ = new \Stephenjude\BlocHqPhpSdk\BlocHQ(TOKEN_HERE);
$blocHQ->createCollectionAccount();
$account = $blocHQ->getAccountByAccountNumber(ACCOUNT_NUMBER);
$account = $blocHQ->getAccountById(ID);
$account->freeze();
$account->unfreeze();
$account->close();
$account->reopen();
$account->credit(AMOUNT); // Simulation endpoint
$account->debit(AMOUNT); // Simulation endpoint
$blocHQ->transferFromOrgBalance(AMOUNT, ACCOUNT_NUMBER, BANK_CODE, NARRATION, [META_DATA]);
$blocHQ->getAllTransactions();
$blocHQ->getTransactionById(TRANSACTION_ID);
$blocHQ->getTransactionByReference(TRANSACTION_REFERENCE);
$blocHQ->getBankList();
$blocHQ->resolveBankAccount(ACCOUNT_NUMBER, BANK_CODE);
All API references can be found on BlocHQ documentation website.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
This package uses code from and is greatly inspired by the Ohdear SDK package by Freek & Mattias Geniar.
The MIT License (MIT). Please see License File for more information.