PHPackages                             sverraest/pomelo-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. sverraest/pomelo-php

ActiveLibrary[API Development](/categories/api)

sverraest/pomelo-php
====================

PHP Bindings for the Pomelo Pay API

v2.0.0(7y ago)2151MITPHPPHP &gt;= 7.0CI failing

Since Apr 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sverraest/pomelo-php)[ Packagist](https://packagist.org/packages/sverraest/pomelo-php)[ RSS](/packages/sverraest-pomelo-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

PomeloPHP
=========

[](#pomelophp)

[![Build Status](https://camo.githubusercontent.com/15ac70a09ceffd21f7795aa7918cecc30d44a32bc415ca83e7dd98bac80a42e1/68747470733a2f2f7472617669732d63692e6f72672f7376657272616573742f706f6d656c6f2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sverraest/pomelo-php)[![codecov](https://camo.githubusercontent.com/9ae3da6255afde3d865fdf32b10ec54e0b522abda5b9e004fa68deeca6bbf25d/68747470733a2f2f636f6465636f762e696f2f67682f7376657272616573742f706f6d656c6f2d7068702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/sverraest/pomelo-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8026af8de8d65fb81a8a0300e5fdaf157e2b378a4e63cbf53a444355980bb72e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7376657272616573742f706f6d656c6f2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sverraest/pomelo-php/?branch=master)[![Maintainability](https://camo.githubusercontent.com/c4d8eb26070572abfa1bec493f85f4187b8c5c02ae3912dfe37817d5d3604200/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65663566356464313461656163303266306461662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/sverraest/pomelo-php/maintainability)[![Latest Stable Version](https://camo.githubusercontent.com/92aea6805edbb5b6110b1933d07c4fa33e144adb81e21177104bcc506464f1f0/68747470733a2f2f706f7365722e707567782e6f72672f7376657272616573742f706f6d656c6f2d7068702f762f737461626c65)](https://packagist.org/packages/sverraest/pomelo-php)[![License](https://camo.githubusercontent.com/266684b32e8ace959594a37bdb389917e6d94383212df05cd7bec136598a9055/68747470733a2f2f706f7365722e707567782e6f72672f7376657272616573742f706f6d656c6f2d7068702f6c6963656e7365)](https://packagist.org/packages/sverraest/pomelo-php)[![composer.lock](https://camo.githubusercontent.com/f4c0ccc8d9202e5704226be416f03fab672ab3f97eac164314ebd7483551bb36/68747470733a2f2f706f7365722e707567782e6f72672f7376657272616573742f706f6d656c6f2d7068702f636f6d706f7365726c6f636b)](https://packagist.org/packages/sverraest/pomelo-php)

> PHP API Client and bindings for the [Pomelo Pay API](https://github.com/PomeloPay/pomelo-apidoc)

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

- 💳 **Transactions**

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

[](#installation)

Requires PHP 7.0 or higher

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

First, install Composer:

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

```

Next, install the latest pomelo-php:

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

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

[](#quick-start)

### PomeloPHP\\Client

[](#pomelophpclient)

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

If you want to get a `production` client:

```
use PomeloPHP\Client;

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

If you want to get a `sandbox` client:

```
use PomeloPHP\Client;

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

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

```
use PomeloPHP\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 Pomelo Pay 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 PomeloPHP\Client;

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

$json = [
 "provider" => "alipay", // Payment method enabled for your merchant account such as bcmc, alipay, 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 PomeloPHP\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
```

About
-----

[](#about)

➡️ You can follow me on 🐦 [Twitter](https://www.twitter.com/simondoestech) or ✉️ email me at simon\[-at-\]pomelopay.com.

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~319 days

Total

2

Last Release

2635d ago

Major Versions

v1.0.0 → v2.0.02019-02-21

### 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 (16 commits)")

---

Tags

apiapi-clientphpphp7pomelopayphpapipaypomelopomelopayappfleet

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sverraest-pomelo-php/health.svg)

```
[![Health](https://phpackages.com/badges/sverraest-pomelo-php/health.svg)](https://phpackages.com/packages/sverraest-pomelo-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)
