PHPackages                             masdimdev/omnipay-billplz - 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. masdimdev/omnipay-billplz

ActiveLibrary[Payment Processing](/categories/payments)

masdimdev/omnipay-billplz
=========================

Billplz driver for Omnipay

1.1.1(9mo ago)04MITPHPPHP ^8.1

Since Jun 6Pushed 9mo agoCompare

[ Source](https://github.com/masdimdev/omnipay-billplz)[ Packagist](https://packagist.org/packages/masdimdev/omnipay-billplz)[ RSS](/packages/masdimdev-omnipay-billplz/feed)WikiDiscussions master Synced 1mo ago

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

Billplz Omnipay Driver
======================

[](#billplz-omnipay-driver)

**Important:** This implementation is based on the **Billplz API V3**. Ensure compatibility with your integration requirements and verify if this version aligns with the gateway setup provided by Billplz.

An Omnipay driver for integrating with the Billplz payment gateway, supporting features such as `purchase`, `completePurchase`, `completePurchaseCallback`, and `fetchTransaction`.

Getting Started
---------------

[](#getting-started)

Install via Composer:

```
composer require masdimdev/omnipay-billplz
```

Set up the gateway:

```
$gateway = Omnipay::create('Billplz');
$gateway->setApiKey('your-billplz-api-key');
$gateway->setSignatureKey('billplz-x-signature-key');
$gateway->setCollectionId('collection-id');
$gateway->setTestMode(false); // Default: false, set to true if in test/sandbox mode
```

Available Methods
-----------------

[](#available-methods)

### `purchase`

[](#purchase)

Redirects the user to the Billplz payment page for completing a transaction.

**Required Data**

ParameterTypeDescription`amount``integer`A positive integer in the smallest currency unit (e.g., 100 = RM1.00).`description``string`The bill's description. Will be displayed on bill template. (Max 200 characters)`name``string`Bill recipient's full name. Useful for identification. (Max 255 characters)`email``string`Recipient's email address. **Required if `mobile` is not provided**.`mobile``string`Recipient's mobile number. **Required if `email` is not provided**. Include country code, no spaces or dashes (e.g., +60123456789).`callback_url``string`Webhook URL to be called after transaction completion. It will `POST` a Bill object.**Optional Data**

ParameterTypeDescription`due_at``string`Due date for the bill in `YYYY-MM-DD` format. Default is today. Year range is 19xx to 2xxx. Informational only, does not affect payability.`redirect_url``string`URL to redirect customer after payment. Performs a `GET` with bill's status and ID.`deliver``boolean`Whether to send email and SMS (if `mobile` is provided). Default is `false`. SMS charges may apply.`reference_1_label``string`Label #1 to reconcile payments. Default is "Reference 1". (Max 20 characters)`reference_1``string`Value for `reference_1_label`. (Max 120 characters)`reference_2_label``string`Label #2 to reconcile payments. Default is "Reference 2". (Max 20 characters)`reference_2``string`Value for `reference_2_label`. (Max 120 characters)#### Example

[](#example)

```
$response = $gateway->purchase([
    'amount'        => 100,
    'description'   => 'Test Product',
    'name'          => 'John Doe',
    'email'         => 'john@example.com',
    'callback_url'  => 'https://your-app.com/callback-url',
    'redirect_url'  => 'https://your-app.com/redirect-url',
])->send();

if ($response->isRedirect()) {
    $response->redirect(); // Redirect to Billplz payment page
}
```

#### Response Methods

[](#response-methods)

- `isError()`: Indicates if the response is an error.
- `isRedirect()`: Indicates if the response is not error and contains a redirection URL (Billplz payment page).
- `redirect()`: Redirect to Billplz payment page.
- `getRedirectUrl()`: Gets the redirect destination url.
- `getRedirectMethod()`: Get the required redirect method (always `GET`).
- `getTransactionReference()`: Returns Billplz's Bill ID.

### `completePurchase`

[](#completepurchase)

Verifies the transaction status by handling the response from Billplz after the user completes payment.

#### Example

[](#example-1)

```
$response = $gateway->completePurchase()->send();

if ($response->isSuccessful()) {
    echo 'Transaction successful';
} else {
    echo 'Transaction failed';
}
```

#### Response Methods

[](#response-methods-1)

- `isSuccessful()`: Aliases `isPaid()`.
- `isPaid()`: Indicates if the transaction was successfully paid.
- `getPaidAt()`: Returns the date and time when payment was made.
- `isSignatureValid()`: Indicates if the response signature was valid.
- `getTransactionReference()`: Returns Billplz's Bill ID.
- `getData()`: Returns the Billplz transaction response.

### `completePurchaseCallback`

[](#completepurchasecallback)

Verifies the transaction status by handling the response from Billplz after the user completes payment.

#### Example

[](#example-2)

```
$response = $gateway->completePurchaseCallback()->send();

if ($response->isSuccessful()) {
    echo 'Transaction successful';
} else {
    echo 'Transaction failed';
}
```

#### Response Methods

[](#response-methods-2)

- `isSuccessful()`: Aliases `isPaid()`.
- `isPaid()`: Indicates if the transaction was successfully paid.
- `getPaidAt()`: Returns the date and time when payment was made.
- `isSignatureValid()`: Indicates if the response signature was valid.
- `getTransactionReference()`: Returns Billplz's Bill ID.
- `getData()`: Returns the Billplz transaction response.

### `fetchTransaction`

[](#fetchtransaction)

Retrieves detailed information about specific transaction.

**Required Data**

ParameterTypeDescription`bill_id``string`Bill ID or tansaction reference#### Example

[](#example-3)

```
$response = $gateway->fetchTransaction(['bill_id' => '8X0Iyzaw'])->send();

if ($response->isSuccessful()) {
    echo 'Transaction successful';
} else {
    echo 'Transaction failed: ' . $response->getMessage();
}
```

#### Response Methods

[](#response-methods-3)

- `isSuccessful()`: Aliases `isPaid()`.
- `isPaid()`: Indicates if the transaction was successfully paid.
- `getPaidAt()`: Returns the date and time when payment was made.
- `getTransactionReference()`: Returns Billplz's Bill ID.
- `getData()`: Returns the Billplz transaction response.

License
-------

[](#license)

This package is open-source software licensed under the MIT License.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~20 days

Total

3

Last Release

297d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/masdimdev-omnipay-billplz/health.svg)

```
[![Health](https://phpackages.com/badges/masdimdev-omnipay-billplz/health.svg)](https://phpackages.com/packages/masdimdev-omnipay-billplz)
```

###  Alternatives

[omnipay/payflow

Payflow driver for the Omnipay payment processing library

20976.8k3](/packages/omnipay-payflow)[omnipay/payfast

PayFast driver for the Omnipay payment processing library

24626.9k3](/packages/omnipay-payfast)[aimeos/ai-payments

Payment extension for Aimeos e-commerce solutions

2160.7k](/packages/aimeos-ai-payments)[ptuchik/billing

Billing package for Laravel 5.5 supporting packages, plans, coupons, addons, payments and subscriptions

2921.2k](/packages/ptuchik-billing)[swiftmade/omnipay-everypay

(Unofficial) payment gateway for Every Pay (Estonia)

158.7k](/packages/swiftmade-omnipay-everypay)

PHPackages © 2026

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