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 today

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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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