PHPackages                             geniebusiness/geniebiz-connect-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. geniebusiness/geniebiz-connect-php

ActiveLibrary[API Development](/categories/api)

geniebusiness/geniebiz-connect-php
==================================

PHP Bindings for the Genie Business Connect API

172PHP

Since Jul 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/geniebiz/php-plugin)[ Packagist](https://packagist.org/packages/geniebusiness/geniebiz-connect-php)[ RSS](/packages/geniebusiness-geniebiz-connect-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

GenieBusinessConnectPHP
=======================

[](#geniebusinessconnectphp)

> PHP API Client and bindings for the [Genie Business Connect API](https://github.com/geniebiz/php-plugin)

Using this PHP API Client you can interact with your Genie Business Connect API:

- 💳 **Transactions**

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

[](#installation)

Requires PHP 7.0 or higher

The recommended way to install geniebiz-connect-php is through [Composer](https://getcomposer.org):

First, install Composer:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, install the latest geniebiz-connect-php:

```
$ php composer.phar require geniebusiness/geniebiz-connect-php

```

Finally, you need to require the library in your PHP application:

```
require "vendor/autoload.php";
```

Development
-----------

[](#development)

- Run `composer test` and `composer phpcs` before creating a PR to detect any obvious issues.
- Please create issues for this specific API Binding under the [issues](https://github.com/geniebusiness/geniebiz-connect-php/issues) section.
- [Contact Genie Business](https://dashboard.geniebiz.lk) directly for Genie Business Connect API support.

Quick Start
-----------

[](#quick-start)

### GenieBusinessConnect\\Client

[](#geniebusinessconnectclient)

First get your `production` or `sandbox` API key from your [Dashboard](https://dashboard.geniebiz.lk).

If you want to get a `production` client:

```
use GenieBusinessConnect\Client;

$client = new Client('apikey', 'appid');
```

If you want to get a `sandbox` client:

```
use GenieBusinessConnect\Client;

$client = new Client('apikey', 'appid', 'sandbox');
```

If you want to pass additional [GuzzleHTTP](https://github.com/guzzle/guzzle) options:

```
use GenieBusinessConnect\Client;

$options = ['headers' => ['foo' => 'bar']];
$client = new Client('apikey', 'appid', 'sandbox', $options);
```

Available API Operations
------------------------

[](#available-api-operations)

The following exposed API operations from the Genie Business Connect API are available using the API Client.

See below for more details about each resource.

💳 **Transactions**

Create a new transaction with or without a specific payment method.

Usage details
-------------

[](#usage-details)

### 💳 Transactions

[](#-transactions)

#### Create transaction with a specific payment method

[](#create-transaction-with-a-specific-payment-method)

```
use GenieBusinessConnect\Client;

$client = new Client('apikey', 'appid');

$json = [
 "provider" => "card", // Payment method enabled for your merchant account such as bcmc, card, card
 "currency" => "LKR",
 "amount" => 1000, // 10.00 LKR
 "redirectUrl" => "https://foo.bar/order/123" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction->url); // Go to transaction payment page
```

#### Create transaction without a payment method that will redirect to the payment method selection screen

[](#create-transaction-without-a-payment-method-that-will-redirect-to-the-payment-method-selection-screen)

```
use GenieBusinessConnect\Client;

$client = new Client('apikey', 'appid');

$json = [
 "currency" => "LKR",
 "amount" => 1000, // 10.00 LKR
 "redirectUrl" => "https://foo.bar/order/987" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction->url); // Go to payment method selection screen
```

#### Create transaction without a payment method with your own localId that will redirect to the payment method selection screen

[](#create-transaction-without-a-payment-method-with-your-own-localid-that-will-redirect-to-the-payment-method-selection-screen)

```
use GenieBusinessConnect\Client;

// Get your API Key and App ID from the "Connect" screen on your merchant dashboard
$client = new Client('apikey', 'appid');

// Currency should be your merchant account currency or the payment would be rejected
$json = [
 "currency" => "LKR",
 "amount" => 1234, // 12.34 LKR,
 "localId" => "INVOICE-2020-0001",
 "redirectUrl" => "https://your.webshop.domain.url/my_order/2020_0001" // Optional redirect after payment completion, the payment portal will redirect to this URL and attach queryParameters to this URL, fully optional
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction->url); // Go to payment screen on Genie Business
die();
```

#### Create transaction without a payment method with your own localId that will redirect to the payment method selection screen and also sends a webhook for this specific transaction

[](#create-transaction-without-a-payment-method-with-your-own-localid-that-will-redirect-to-the-payment-method-selection-screen-and-also-sends-a-webhook-for-this-specific-transaction)

```
use GenieBusinessConnect\Client;

// Get your API Key and App ID from the "Connect" screen on your merchant dashboard
$client = new Client('apikey', 'appid');

// Currency should be your merchant account currency or the payment would be rejected
$json = [
 "currency" => "EUR",
 "amount" => 1234, // 12.34 EUR,
 "localId" => "INVOICE-2020-0001",
 "webhook" => "https://foo.bar/incoming/1234",
 "redirectUrl" => "https://your.webshop.domain.url/my_order/2020_0001" // Optional redirect after payment completion, the payment portal will redirect to this URL and attach queryParameters to this URL, fully optional
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction->url); // Go to payment screen on Genie Business
die();
```

#### Create transaction without a payment method with your own localId that will redirect to the payment method selection screen and also sends a webhook for this specific transaction. Furthermore expire this payment link automatically after 3 hours.

[](#create-transaction-without-a-payment-method-with-your-own-localid-that-will-redirect-to-the-payment-method-selection-screen-and-also-sends-a-webhook-for-this-specific-transaction-furthermore-expire-this-payment-link-automatically-after-3-hours)

```
use GenieBusinessConnect\Client;

// Get your API Key and App ID from the "Connect" screen on your merchant dashboard
$client = new Client('apikey', 'appid');

// Currency should be your merchant account currency or the payment would be rejected
$json = [
 "currency" => "EUR",
 "amount" => 1234, // 12.34 EUR,
 "validForHours" => 3,
 "localId" => "INVOICE-2020-0001",
 "webhook" => "https://foo.bar/incoming/1234",
 "redirectUrl" => "https://your.webshop.domain.url/my_order/2020_0001" // Optional redirect after payment completion, the payment portal will redirect to this URL and attach queryParameters to this URL, fully optional
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction->url); // Go to payment screen on Genie Business
die();
```

About
-----

[](#about)

⭐ Sign up as a merchant at  and start receiving payments in seconds.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/95a4c591c2dde5ccd00eceef98c7cb75174742f50b47e147582c7493c59121e4?d=identicon)[m4yank](/maintainers/m4yank)

---

Top Contributors

[![m4yankpomelo](https://avatars.githubusercontent.com/u/84304054?v=4)](https://github.com/m4yankpomelo "m4yankpomelo (1 commits)")

### Embed Badge

![Health badge](/badges/geniebusiness-geniebiz-connect-php/health.svg)

```
[![Health](https://phpackages.com/badges/geniebusiness-geniebiz-connect-php/health.svg)](https://phpackages.com/packages/geniebusiness-geniebiz-connect-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/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)
