PHPackages                             codeboxr/upay - 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. codeboxr/upay

ActiveLibrary[Payment Processing](/categories/payments)

codeboxr/upay
=============

Upay Payment Gateway Package

v1.0.4(6mo ago)11827MITPHPPHP ^7.4|^8.0|^8.1

Since Aug 11Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/codeboxrcodehub/upay)[ Packagist](https://packagist.org/packages/codeboxr/upay)[ RSS](/packages/codeboxr-upay/feed)WikiDiscussions main Synced 1mo ago

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

 [![](https://camo.githubusercontent.com/95a4d9762d1d35212ce8f8f7f2ee41c0c6dcde7acd8952faf49fa0a8c1c08a92/68747470733a2f2f7777772e7570617962642e636f6d2f696d616765732f557061792d4c6f676f2e6a7067)](https://camo.githubusercontent.com/95a4d9762d1d35212ce8f8f7f2ee41c0c6dcde7acd8952faf49fa0a8c1c08a92/68747470733a2f2f7777772e7570617962642e636f6d2f696d616765732f557061792d4c6f676f2e6a7067)

Upay BD Payment Gateway
=======================

[](#upay-bd-payment-gateway)

[![](https://camo.githubusercontent.com/5e42f9afab8a701b74f89db28aa8bd576568e2c20ec6ba36b28d3a691108f90e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6465626f78722f75706179)](https://camo.githubusercontent.com/5e42f9afab8a701b74f89db28aa8bd576568e2c20ec6ba36b28d3a691108f90e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6465626f78722f75706179)[![](https://camo.githubusercontent.com/7f1aba3e75b2c527c72d7595d290b9573b0eff2ea5542e30e9fa899b02400c20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f636f6465626f78722f75706179)](https://camo.githubusercontent.com/7f1aba3e75b2c527c72d7595d290b9573b0eff2ea5542e30e9fa899b02400c20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f636f6465626f78722f75706179)

This is a Laravel/PHP package for [Upay](https://www.upaybd.com/) BD Payment Gateway. This package can be used in laravel or without laravel/php projects. You can use this package for headless/rest implementation as well as blade or regular mode development. We created this package while working for a project and thought to made it release for all so that it helps. This package is available as regular php [composer package](https://packagist.org/packages/codeboxr/upay).

Features
--------

[](#features)

1. [Create Payment/Take to Payment Page](https://github.com/codeboxrcodehub/upay#1-create-payment)
2. [Create Payment for Headless/RestAPI](https://github.com/codeboxrcodehub/upay#2-create-payment-for-restapi)
3. [Query Payment/Payment Details](https://github.com/codeboxrcodehub/upay#2-query-payment)

Requirements
------------

[](#requirements)

- PHP &gt;=7.4
- Laravel &gt;= 6

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

[](#installation)

```
composer require codeboxr/upay
```

### vendor publish (config)

[](#vendor-publish-config)

```
php artisan vendor:publish --provider="Codeboxr\Upay\UpayServiceProvider"
```

After publish config file setup your credential. you can see this in your config directory upay.php file

```
"sandbox"                => env("UPAY_SANDBOX", false), // for sandbox use true
"server_ip"              => env("UPAY_SERVER_IP", ""),
"merchant_id"            => env("UPAY_MERCHANT_ID", ""),
"merchant_key"           => env("UPAY_MERCHANT_KEY", ""),
"merchant_code"          => env("UPAY_MERCHANT_CODE", ""),
"merchant_name"          => env("UPAY_MERCHANT_NAME", ""),
"merchant_mobile"        => env("UPAY_MERCHANT_MOBILE", ""),
"merchant_city"          => env("UPAY_MERCHANT_CITY", ""),
"merchant_category_code" => env("UPAY_CATEGORY_CODE", ""),
"redirect_url"           => env("UPAY_CALLBACK_URL", "")

```

### Set .env configuration

[](#set-env-configuration)

```
UPAY_SANDBOX=true // for production use false
UPAY_SERVER_IP="" // uPay only support IPV4 for production server don't needed sandbox
UPAY_MERCHANT_ID=""
UPAY_MERCHANT_KEY=""
UPAY_MERCHANT_CODE=""
UPAY_MERCHANT_NAME=""
UPAY_MERCHANT_MOBILE=""
UPAY_MERCHANT_CITY=""
UPAY_CATEGORY_CODE=""
UPAY_CALLBACK_URL=""

```

Usage
-----

[](#usage)

### 1. Create Payment

[](#1-create-payment)

```
use Codeboxr\Upay\Facade\Payment;

return Payment::executePayment($amount, $invoiceId, $txnId, $date);

```

### Example

[](#example)

```
return Payment::executePayment(10, 'CBX10101', '10127373', '2022-08-26');

```

### 2. Create Payment for REST API

[](#2-create-payment-for-rest-api)

```
use Codeboxr\Upay\Facade\Payment;

return Payment::createPayment($amount, $invoiceId, $txnId, $date);

```

### Example

[](#example-1)

```
return Payment::createPayment(10, 'CBX10101', '10127373', '2022-08-26');

```

### 3. Query Payment

[](#3-query-payment)

```
use Codeboxr\Upay\Facade\Payment;

Payment::queryPayment($invoiceId); // Invoice ID

```

Note: Upay only support IPV4 for production server

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

[](#contributing)

Contributions to the Upay package are welcome. Please note the following guidelines before submitting your pull request.

- Follow [PSR-4](http://www.php-fig.org/psr/psr-4/) coding standards.
- Read Upay API documentations first.Please contact with Upay for their api documentation and sandbox access.

License
-------

[](#license)

Upay package is licensed under the [MIT License](http://opensource.org/licenses/MIT).

Copyright 2022 [Codeboxr](https://codeboxr.com) We are not not affiliated with Upay and don't give any guarantee.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance68

Regular maintenance activity

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 51.7% 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 ~296 days

Total

5

Last Release

190d ago

PHP version history (2 changes)v1.0.0PHP ^7.2|^7.3|^8.0|^8.1

v1.0.2PHP ^7.4|^8.0|^8.1

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/81623abb96d5e8d150207d166effa3d73f4853bb9006cb9df7bef67ff65853bf?d=identicon)[codeboxr](/maintainers/codeboxr)

---

Top Contributors

[![dipudey](https://avatars.githubusercontent.com/u/50619501?v=4)](https://github.com/dipudey "dipudey (15 commits)")[![manchumahara](https://avatars.githubusercontent.com/u/204452?v=4)](https://github.com/manchumahara "manchumahara (12 commits)")[![arif98741](https://avatars.githubusercontent.com/u/17213478?v=4)](https://github.com/arif98741 "arif98741 (2 commits)")

---

Tags

bd-paymentlaravel-upay-packagelaravel-upay-paymentpayment-gatewayupayupay-apiupay-api-gatewayupay-gatewayupay-laravel

### Embed Badge

![Health badge](/badges/codeboxr-upay/health.svg)

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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