Giter Site home page Giter Site logo

qonto's Introduction

Qonto API client for PHP Build Status Latest Stable Version Total Downloads License

neyric/php-qonto is an unofficial PHP client library to work with Qonto REST API v2.

Requirements

To use this SDK, you will need (as a minimum):

  • PHP v7.1
  • You do not have to use Composer, but you are strongly advised to
  • A working Qonto Account

Installation with Composer

You can use neyric/php-qonto library as a dependency in your project with Composer (which is the preferred technique). Follow these installation instructions if you do not already have Composer installed. A composer.json file is available in the repository and it has been referenced from Packagist.

you@yourhost:/path/to/your-project$ composer require neyric/php-qonto

License

neyric/php-qonto is distributed under MIT license, see the LICENSE file.

Contacts

Report bugs or suggest features using issue tracker on GitHub.

Configuration

When using the API, you can authenticate a Qonto account using its login and secret key in the request. You can find and manage your secret key from the Qonto web application under Settings, in the API tab.

Qonto does not provide sandbox accounts for its API yet. (The API is read-only anyway)

Sample usage

require_once '/path/to/your-project/vendor/autoload.php';

$qonto = new \neyric\Qonto\QontoApi("your-qonto-login", "your-qonto-secret-key");

// Fetch the organization details (tip: the organization id is the same as the login)
$organization = $qonto->Organizations->get("your-organization-id");
var_dump($organization);

// Fetch the list of transactions
$transactionCollection = $qonto->Transactions->list('bank-account-slug', 'FR76XXXXXXXXXXXXXXXXXXXXXXX');
var_dump($transactionCollection);

// Fetch the list of transactions with filters
use neyric\Qonto\Model\TransactionFilterBuilder;

$filters = TransactionFilterBuilder::create()
            ->status("completed")
            ->side("credit")
            ->updatedAtFrom("2019-01-10T11:47:53.123Z")
            ->updatedAtTo("2021-01-10T11:47:53.123Z")
            ->attachments();

$transactionCollection = $qonto->Transactions->listFilter('bank-account-slug', 'FR76XXXXXXXXXXXXXXXXXXXXXXX', $filters);
var_dump($transactionCollection);

// Fetch memberships
$memberships = $qonto->Memberships->list();
var_dump($memberships);

// Fetch labels
$labels = $qonto->Labels->list();
var_dump($labels);

// Fetch an attachment
$attachment = $qonto->Attachments->get("some-attachement-id");
var_dump($attachment);

// Fetch the list of external transfers 
$externalTransfersCollection = $qonto->ExternalTransers->list();
var_dump($externalTransfersCollection);

// Fetch the list of external transfers with filters
use neyric\Qonto\Model\ExternalTransferFilterBuilder;
use neyric\Qonto\Model\ExternalTransferStatus;

$filters = ExternalTransferFilterBuilder::create()
            ->beneficary(["0a8df251-de2a-4394-bffc-6b9d9795700d"])
            ->status(ExternalTransferStatus::PENDING)
            ->scheduledAtFrom("2022-01-10")
            ->updatedAtTo("2022-01-27T22:05:07.000Z");

$externalTransfersCollection = $qonto->ExternalTransers->listFilter($filters);
var_dump($externalTransfersCollection);

// Create an external transfer 
use neyric\Qonto\Model\ExternalTransferBuilder;

$builder = ExternalTransferBuilder::create()
            ->beneficaryId("0a8df251-de2a-4394-bffc-6b9d9795700d")
            ->debitIban("FR7630001007941234567890185")
            ->currency("EUR")
            ->note("External transfer for John")
            ->reference("External transfer reference (ex: John Car)")
            ->amount(18000.56)
            ->scheduledDate("2022-02-10");
            
$qonto->ExternalTransers->create($builder);

qonto's People

Contributors

ericabouaf avatar info803test avatar parusel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.