PHPackages                             sykez/betterpay - 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. [Payment Processing](/categories/payments)
4. /
5. sykez/betterpay

ActiveLibrary[Payment Processing](/categories/payments)

sykez/betterpay
===============

PHP package for Betterpay payment gateway solution API

v1.1.1(2y ago)1189MITPHPPHP ^7.2 || ^8.0

Since Dec 21Pushed 2y ago2 watchersCompare

[ Source](https://github.com/sykezz/betterpay)[ Packagist](https://packagist.org/packages/sykez/betterpay)[ Docs](https://github.com/sykezz/betterpay)[ RSS](/packages/sykez-betterpay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Betterpay
=========

[](#betterpay)

[![Latest Stable Version](https://camo.githubusercontent.com/7e085b765e543f54b2531184a8e661951282debee211427901e43dab11bc4c90/687474703a2f2f706f7365722e707567782e6f72672f73796b657a2f6265747465727061792f76)](https://packagist.org/packages/sykez/betterpay)[![License](https://camo.githubusercontent.com/1dafbe4417c17b98d580d5e4b9073bebd765de49283c3d8e8f22f19cae0e305b/687474703a2f2f706f7365722e707567782e6f72672f73796b657a2f6265747465727061792f6c6963656e7365)](https://packagist.org/packages/sykez/betterpay)[![PHP Version Require](https://camo.githubusercontent.com/153525ea9b7b50eb9f84876f05dc641fa3637ca355b51d00b39fbbf2c1051ff1/687474703a2f2f706f7365722e707567782e6f72672f73796b657a2f6265747465727061792f726571756972652f706870)](https://packagist.org/packages/sykez/betterpay)[![Total Downloads](https://camo.githubusercontent.com/152457bccb5a83e207195b8325c27ab5cf16800cd5d2e966a92af15a1209e82a/687474703a2f2f706f7365722e707567782e6f72672f73796b657a2f6265747465727061792f646f776e6c6f616473)](https://packagist.org/packages/sykez/betterpay)

**PHP package for [Betterpay](https://www.betterpay.me/) (previously known as QlicknPay) payment gateway solution API.**

[Register for sandbox account](https://www.betterpay.me/v2/sandbox) to start testing.

Contents
--------

[](#contents)

- [Betterpay](#betterpay)
    - [Contents](#contents)
    - [Supported Features](#supported-features)
    - [To-do](#to-do)
    - [Installation](#installation)
        - [Laravel Setup](#laravel-setup)
    - [Usage](#usage)
    - [Related Resources](#related-resources)
    - [Contributing](#contributing)
    - [License](#license)

Supported Features
------------------

[](#supported-features)

- Tokenization - MasterCard Payment Gateway Service (MPGS)

To-do
-----

[](#to-do)

- Standard Payment Gateway
- Direct Payment
- Recurring Payment - Direct Debit
- Refund

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

[](#installation)

Install package via Composer:

```
composer require sykez/betterpay

```

### Laravel Setup

[](#laravel-setup)

Add the environment variables to your `.env`:

```
BETTERPAY_API_KEY=
BETTERPAY_MERCHANT_ID=
BETTERPAY_CALLBACK_URL=https://example.com/callback
BETTERPAY_SUCCESS_URL=https://example.com/success
BETTERPAY_FAIL_URL=https://example.com/fail

```

Usage
-----

[](#usage)

**Create verification link for Tokenization:**

```
use Sykez\Betterpay\Betterpay;

$bp = new Betterpay($api_key, $merchant_id, $api_url, $callback_url, $success_url, $fail_url);
$response = $bp->createTokenizationUrl($reference_id); // unique $reference_id
header('Location: '.$response['credit_card_verification_url']); // redirect to payment gateway

```

Token is returned to your callback/success URL upon success.

**Charge card:**

```
$token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // token returned from verification
$bp->charge($token, $invoice, $amount);

```

**Laravel: Charge card:**

This package includes Laravel's Service Provider, which injects the dependencies.

```
use Sykez\Betterpay\Betterpay;

public function charge(Betterpay $bp, Request $request)
{
    $invoice = bin2hex(random_bytes(5));
    $token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
    $amount = 10.5;
    return $bp->charge($token, $invoice, $amount);
}

```

Related Resources
-----------------

[](#related-resources)

- [Betterpay API Documentation](https://www.betterpay.me/docs/)
- [QlicknPay Plugins](https://github.com/shahrul95-dev/QlicknPay-Plugins)

Contributing
------------

[](#contributing)

Contributions are welcome 😄

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% 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 ~170 days

Recently: every ~194 days

Total

6

Last Release

755d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1c2819ceb92b2220c63f3384e9346099c1c39402e868c0a4086e1b8ca9d9cbe?d=identicon)[sykez](/maintainers/sykez)

---

Top Contributors

[![sykezz](https://avatars.githubusercontent.com/u/6332979?v=4)](https://github.com/sykezz "sykezz (17 commits)")[![faiz-appasia](https://avatars.githubusercontent.com/u/183587399?v=4)](https://github.com/faiz-appasia "faiz-appasia (1 commits)")

---

Tags

betterpaygatewaymalaysiamerchantpaymentqlicknpaypaymentgatewaymerchantMalaysiabetterpayqlicknpay

### Embed Badge

![Health badge](/badges/sykez-betterpay/health.svg)

```
[![Health](https://phpackages.com/badges/sykez-betterpay/health.svg)](https://phpackages.com/packages/sykez-betterpay)
```

###  Alternatives

[omnipay/payfast

PayFast driver for the Omnipay payment processing library

24626.9k3](/packages/omnipay-payfast)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1017.2k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

154.6k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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