PHPackages                             xenon/paystation - 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. xenon/paystation

ActiveLibrary[API Development](/categories/api)

xenon/paystation
================

Paystation is a php library for Bangladeshi payment gateway provider. You can integrate this in your php application and get customer payment using mfs, credit card and so on

1.0.2(2y ago)5188↑1400%5MITPHPPHP &gt;=7.3

Since Jun 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/arif98741/paystation-sdk)[ Packagist](https://packagist.org/packages/xenon/paystation)[ Fund](https://www.buymeacoffee.com/arif98741)[ RSS](/packages/xenon-paystation/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

xenon/paystation is a php library for Bangladeshi payment gateway provider. You can integrate this in your php application and get customer payment using mfs, credit card and so on

### Installation

[](#installation)

```
composer require xenon/paystation

```

Sample Code
===========

[](#sample-code)

Step:1 Create Payment and Redirect to Payment Url
-------------------------------------------------

[](#step1--create-payment-and-redirect-to-payment-url)

```
use Xenon\Paystation\Exception\PaystationPaymentParameterException;
use Xenon\Paystation\Paystation;

require 'vendor/autoload.php';

try {
    $config = [
        'merchantId' => 'xxx',
        'password' => 'xxxx'
    ];
    $pay = new Paystation($config);
    $pay->setPaymentParams([
        'invoice_number' => 'XXXXXXXXXXXX',
        'currency' => "BDT",
        'payment_amount' => 1,
        'reference' => "102030",
        'cust_name' => "Jhon Max",
        'cust_phone' => "01700000001",
        'cust_email' => "max@gmail.com",
        'cust_address' => "Dhaka, Bangladesh",
        'callback_url' => "http://www.yourdomain.com/success.php",
        // 'checkout_items' => "orderItems"
    ]);
    $pay->payNow(); //will automatically redirect to gateway payment page
} catch (Exception $e) {
    var_dump($e->getMessage());
}
```

Step:2 Verify Payment
---------------------

[](#step2-verify-payment)

```
 $config = [
    'merchantId' => 'xxx',
    'password' => 'xxxx'
 ];
$pay = new Paystation($config);
$status  = $pay->verifyPayment("invoice_number","trx_id"); //this will retrieve response as json
```

### sample json response for transaction verification(Success)

[](#sample-json-response-for-transaction-verificationsuccess)

```
    {
        "status_code": "200",
        "status": "success",
        "message": "Transaction found",
        "data": {
            "invoice_number": "ddsf648feebc415138XXXXX",
            "trx_status": "Success",
            "trx_id": "AFJ7IXXX",
            "payment_amount": 1,
            "order_date_time": "2023-06-19 11:57:04",
            "payer_mobile_no": "01750XXXX",
            "payment_method": "bKash",
            "reference": "102030",
            "checkout_items": null,
            "cust_phone": "01700000001"
        }
    }
```

### sample json response for transaction verification(Failed)

[](#sample-json-response-for-transaction-verificationfailed)

```
{
    "status_code": "1006",
    "status": "failed",
    "message": "Transaction not found in system"
}
```

#### Important Methods

[](#important-methods)

- setPaymentParams()
- payNow()
- verifyPayment()

This library is still in beta version and if you are interested to contribute this , we highly encourage you. Make a fork of this repository and give send a pull request. If you face any issues or error during development or after deployment, you should crate an issue

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

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

Total

5

Last Release

1004d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

paymentpayment-gatewaypaymentgatewaypaystationphpphplibraryapipayment gatewaypaystationnagadnagad payment gatewayBangladeshi payment gatewaynagad php librarynagad sdkpaystation php sdkpaystation gateway

### Embed Badge

![Health badge](/badges/xenon-paystation/health.svg)

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

###  Alternatives

[xenon/nagad-api

This is Bangladeshi nagad payment gateway api development library for php. This library can be used easily as pacakge dependency in your php application.

465.9k](/packages/xenon-nagad-api)[coinremitterphp/coinremitter-php

Official PHP SDK for coinremitter cryptocurrency payment gateway

132.2k](/packages/coinremitterphp-coinremitter-php)

PHPackages © 2026

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