Skip to content

omnibank/qonto API reference

Floor
Provider · Omnibank
Version
1.x
Conformance suite
not wired
Verified for real
Not verified for real
Licence
MIT
composer require omnibank/qonto:1.x-dev

Read from the package's own PHP files at the commit 930d79cc7883: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnibank\Qonto

  • Accounts class

    Qonto's bank accounts (GET /v2/organization), read as Omnibank's.

    3 methods

  • Api class

    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.

    2 methods · 2 constants

  • QontoGatewayFactory class

    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.

    10 options

Omnibank\Qonto\Action

  • AccountsAction class

    The organization's bank accounts.

    3 methods

  • BalancesAction class

    The account's balance (booked) and authorized balance (available), as Qonto has them now.

    3 methods

  • ConnectAction class

    Nothing to open: the API key is the access. The connection comes back as it is, its consent active.

    2 methods

  • TransactionsAction class

    The 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): Account

Accounts::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 = []): array

A 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

OptionDefault
sandboxfalse
staging_tokennull
hostnull
omnibank.apifn(Config $c) => new Api($this->http ?? HttpClient::create(), (string) $c['login'], (string) $c['secret_key'], (string) ($c['host'] ?: ($c['sandbox'] ? Api::…
omnibank.action.connectnew ConnectAction()
omnibank.action.accountsnew AccountsAction()
omnibank.action.balancesnew BalancesAction()
omnibank.action.transactionsnew TransactionsAction()
loginrequired
secret_keyrequired

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): bool

AccountsAction::execute()

public function execute(Request $request): void

BalancesAction 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): bool

BalancesAction::execute()

public function execute(Request $request): void

ConnectAction 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): bool

ConnectAction::execute()

public function execute(Request $request): void

TransactionsAction 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): bool

TransactionsAction::execute()

public function execute(Request $request): void