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

ActiveLibrary[API Development](/categories/api)

pomelopay/pomelopay-connect-php
===============================

PHP Bindings for the Pomelo Pay Connect API

v2.1.3.1(2y ago)15.4kMITPHPPHP &gt;= 7.2.5CI failing

Since Feb 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PomeloPay/pomelopay-connect-php)[ Packagist](https://packagist.org/packages/pomelopay/pomelopay-connect-php)[ RSS](/packages/pomelopay-pomelopay-connect-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

PomeloPayConnectPHP
===================

[](#pomelopayconnectphp)

> PHP API Client and bindings for the [Pomelo Pay Connect API](https://github.com/pomelopay/pomelopay-connect)

Using this PHP API Client you can interact with your Pomelo Pay Connect API:

- 💳 **Transactions**

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

[](#installation)

Requires PHP 7.2.5 or higher

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

First, install Composer:

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

```

Next, install the latest pomelopay-connect-php:

```
$ php composer.phar require pomelopay/pomelopay-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/pomelopay/pomelopay-connect-php/issues) section.
- [Contact Pomelo Pay](https://dashboard.pomelopay.com) directly for Pomelo Pay Connect API support.

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

[](#quick-start)

### PomeloPayConnect\\Client

[](#pomelopayconnectclient)

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

If you want to get a `production` client:

```
use PomeloPayConnect\Client;

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

If you want to get a `sandbox` client:

```
use PomeloPayConnect\Client;

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

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

```
use PomeloPayConnect\Client;

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

If you want to pass a custom base URL:

```
use PomeloPayConnect\Client;

$options = ['baseUrl' => 'my-custom-url'];
$client = new Client('apikey', 'appid', 'sandbox', $options);
```

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

[](#available-api-operations)

The following exposed API operations from the Pomelo Pay 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 PomeloPayConnect\Client;

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

$json = [
 "provider" => "card", // Payment method enabled for your merchant account such as bcmc, card, card
 "currency" => "GBP",
 "amount" => 1000, // 10.00 GBP
 "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 PomeloPayConnect\Client;

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

$json = [
 "currency" => "GBP",
 "amount" => 1000, // 10.00 GBP
 "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 PomeloPayConnect\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",
 "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 Pomelo Pay
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 PomeloPayConnect\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 Pomelo Pay
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 PomeloPayConnect\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 Pomelo Pay
die();
```

About
-----

[](#about)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.3% 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.

###  Release Activity

Cadence

Every ~114 days

Recently: every ~213 days

Total

12

Last Release

1020d ago

PHP version history (2 changes)v2.0PHP &gt;= 7.0

v2.1.3PHP &gt;= 7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/f53e48a6e225212e5b18b31319d1dc2086dc0b41b57fa147327cfec6ac606a19?d=identicon)[simon@appfleet.uk](/maintainers/simon@appfleet.uk)

---

Top Contributors

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

---

Tags

phpapipayalipaycard-paymentsonline paymentspomelopomelopay

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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