PHPackages                             argovaerts/bonsai-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. argovaerts/bonsai-php

ActiveLibrary[API Development](/categories/api)

argovaerts/bonsai-php
=====================

Bonsai API client library for PHP. Bonsai is a Belgian payment app that for every ten payments plants a tree.

11PHP

Since Jul 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/argovaerts/bonsai-php)[ Packagist](https://packagist.org/packages/argovaerts/bonsai-php)[ RSS](/packages/argovaerts-bonsai-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bonsai API client for PHP
=========================

[](#bonsai-api-client-for-php)

[Bonsai](https://www.paybonsai.com/bonsai-for-merchants/) is a Belgian payment app that for every ten payments plants a tree.

This is a community effort to make a PHP SDK to make the usage of the API more straight forward.

Requirements
------------

[](#requirements)

- Bonsai account with merchant functionality active
- > = PHP 8.0 (other version might work as well, untested)
- PHP cURL extension
- Up-to-date OpenSSL (or other SSL/TLS toolkit)

Installation
------------

[](#installation)

By far the easiest way to install the Bonsai API client is to require it with Composer.

```
$ composer require argovaerts/bonsai-php

{
    "require": {
        "argovaerts/bonsai-php": "*"
    }
}

```

Creating a payment
------------------

[](#creating-a-payment)

```
use Bonsai\Api\BonsaiApiClient;

$client = new BonsaiApiClient('API_KEY', 'PROFILE_ID', );

$output = $this->client->create_transaction->perform([
    'amount'            => '0.01',
    'clientReference'   => 'reference or order id',
]);

```

Want to improve the API client?
-------------------------------

[](#want-to-improve-the-api-client)

This project is open for pull requests.

License
-------

[](#license)

[BlueOak-1.0.0](LICENSE) © [Arne Govaerts](https://whoami.q4.re).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6331b7970063db08f674c5c01ff09d76d0f5ada2674f42fea56c128831b4cc81?d=identicon)[argovaerts](/maintainers/argovaerts)

---

Tags

apibonsaigatewaypaymentpayment-gatewaypayments

### Embed Badge

![Health badge](/badges/argovaerts-bonsai-php/health.svg)

```
[![Health](https://phpackages.com/badges/argovaerts-bonsai-php/health.svg)](https://phpackages.com/packages/argovaerts-bonsai-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
