Lue dans les fichiers PHP du paquet au commit 930d79cc7883 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
AccountsclassQonto's bank accounts (GET /v2/organization), read as Omnibank's.
3 methods
ApiclassQonto's Business API with an API key: "Authorization: {login}:{secret-key}" on https://thirdparty.qonto.com. The sandbox (https://thirdparty-sandbox.staging.qonto.co) wants the staging token of the developer portal too, in X-Qonto-Staging-Token.
2 methods · 2 constants
QontoGatewayFactoryclassQonto: the organization's accounts, their balances and their settled transactions, with an API key - no consent to give, connect() has nothing to do. No transfers in this version.
10 options
AccountsActionclassThe organization's bank accounts.
3 methods
BalancesActionclassThe account's balance (booked) and authorized balance (available), as Qonto has them now.
3 methods
ConnectActionclassNothing to open: the API key is the access. The connection comes back as it is, its consent active.
2 methods
TransactionsActionclassThe account's settled transactions (GET /v2/transactions by IBAN, status completed, settled_at between the dates), every page (meta.next_page).
3 methods
Omnibank\Qonto
Accounts class
final class Accounts Accounts.php:10
Qonto's bank accounts (GET /v2/organization), read as Omnibank's.
Accounts::fetch()
public static function fetch(Api $api): array- Returns
the organization's bank accounts, as Qonto gives them
Accounts::account()
public static function account(array $data): AccountAccounts::balances()
public static function balances(array $data): array- Returns
booked (balance_cents) and available (authorized_balance_cents)
Api class
final class Api Api.php:17
Qonto's Business API with an API key: "Authorization: {login}:{secret-key}" on https://thirdparty.qonto.com. The sandbox (https://thirdparty-sandbox.staging.qonto.co) wants the staging token of the developer portal too, in X-Qonto-Staging-Token.
const HOST = 'https://thirdparty.qonto.com'const SANDBOX_HOST = 'https://thirdparty-sandbox.staging.qonto.co'
Api::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $login, readonly string $secretKey, readonly string $host = self::HOST, readonly ?string $stagingToken = null, readonly int $timeout = 20)Api::get()
public function get(string $path, array $query = []): arrayA GET on the API, its query written as Qonto (Rails) reads it: a list as "key[]=a&key[]=b".
- Returns
the JSON answer
- Throws
ProviderException when Qonto refuses (4xx)
- Throws
UnavailableException when Qonto cannot be reached or fails (network, 5xx, 429)
QontoGatewayFactory class
final class QontoGatewayFactory extends GatewayFactory QontoGatewayFactory.php:25
Qonto: the organization's accounts, their balances and their settled transactions, with an API key - no consent to give, connect() has nothing to do. No transfers in this version.
options: login: '%env(QONTO_LOGIN)%' # the organization's slug-like login (Settings → Integrations → API key) secret_key: '%env(QONTO_SECRET_KEY)%' sandbox: false # true: the sandbox host, with staging_token staging_token: null # the developer portal's X-Qonto-Staging-Token host: null # another host, whatever sandbox says
Options
| Option | Default | |
|---|---|---|
sandbox | false | |
staging_token | null | |
host | null | |
omnibank.api | fn(Config $c) => new Api($this->http ?? HttpClient::create(), (string) $c['login'], (string) $c['secret_key'], (string) ($c['host'] ?: ($c['sandbox'] ? Api::… | |
omnibank.action.connect | new ConnectAction() | |
omnibank.action.accounts | new AccountsAction() | |
omnibank.action.balances | new BalancesAction() | |
omnibank.action.transactions | new TransactionsAction() | |
login | required | |
secret_key | required |
Omnibank\Qonto\Action
AccountsAction class
final class AccountsAction implements ActionInterface, ApiAwareInterface AccountsAction.php:14
The organization's bank accounts.
AccountsAction::__construct()
public function __construct()AccountsAction::supports()
public function supports(Request $request): boolAccountsAction::execute()
public function execute(Request $request): voidBalancesAction class
final class BalancesAction implements ActionInterface, ApiAwareInterface BalancesAction.php:15
The account's balance (booked) and authorized balance (available), as Qonto has them now.
BalancesAction::__construct()
public function __construct()BalancesAction::supports()
public function supports(Request $request): boolBalancesAction::execute()
public function execute(Request $request): voidConnectAction class
final class ConnectAction implements ActionInterface ConnectAction.php:12
Nothing to open: the API key is the access. The connection comes back as it is, its consent active.
ConnectAction::supports()
public function supports(Request $request): boolConnectAction::execute()
public function execute(Request $request): voidTransactionsAction class
final class TransactionsAction implements ActionInterface, ApiAwareInterface TransactionsAction.php:22
The account's settled transactions (GET /v2/transactions by IBAN, status completed, settled_at between the dates), every page (meta.next_page).
side "debit" is money gone out: the amount is made negative. Qonto's label is the counterparty's name; the transfer's IBAN comes with it when Qonto includes the transfer.
TransactionsAction::__construct()
public function __construct()TransactionsAction::supports()
public function supports(Request $request): boolTransactionsAction::execute()
public function execute(Request $request): void