PHPackages                             shibanashiqc/phone-pay-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. [Payment Processing](/categories/payments)
4. /
5. shibanashiqc/phone-pay-php

ActiveLibrary[Payment Processing](/categories/payments)

shibanashiqc/phone-pay-php
==========================

PhonePay PHP Library by Shiban Ashiq

v1.0.7(2y ago)3117MITPHP

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/shibanashiqc/phone-pay-php)[ Packagist](https://packagist.org/packages/shibanashiqc/phone-pay-php)[ RSS](/packages/shibanashiqc-phone-pay-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

phone-pay-php
=============

[](#phone-pay-php)

Laravel Sample Repo: [Click Here](https://github.com/shibanashiqc/phone-pay-test)
=================================================================================

[](#laravel-sample-repo-click-here)

Unofficial PHP library for [PhonePe](https://developer.phonepe.com/v1/docs/api-integration).

Read up here for getting started and understanding the payment flow with PhonePe:

### Prerequisites

[](#prerequisites)

- A minimum of PHP 8.1 is required.

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

[](#installation)

- If your project using composer, run the below command

```
composer require shibanashiqc/phone-pay-php

```

- If you are not using composer, download the latest release from [the releases section](https://github.com/shibanashiqc/phone-pay-php/releases). **You should download the `phone-pay-php.zip` file**. After that, include `Phonepay.php` in your application and you can use the API as usual.

\##Note: This PHP library follows the following practices:

- Namespaced under `Shibanashiqc\PhonePayPhp\`
- API throws exceptions instead of returning errors
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated over JSON

Documentation
-------------

[](#documentation)

Documentation of PhonePe's API and their usage is available at

Basic Usage
-----------

[](#basic-usage)

Merchant credentials can be obtained from the PhonePay Developer Dashboard. You can use the following credentials for testing:

Required parameters for the constructor are: Merchant ID, Merchant Salt Key, Environment

```
use Shibanashiqc\PhonePayPhp\PhonePay;

$phone_pay = new PhonePay('MERCHAN', 'saltKey-0000', 1);
// $phone_pay->client->setAsDefaultBaseUrl(); // if you got production keys the enable this
$phone_pay->client->setCallbackUrl('https://site/phonepay/callback');
$phone_pay->client->setRedirectUrl('https://site/phonepay/callback');
```

### Create a Payment

[](#create-a-payment)

getPaymentRequest() on this function first parameter is amount, second parameter is merchant transaction id, third parameter is user unique id, fourth parameter is user mobile number only required parameter is amount other parameter is optional

```
$request = $phone_pay->getPaymentRequest(1, '1234567890', '1234567890', '9999999999');
$redirect_url = $phone_pay->getPaymentRedirectUrl($request);
echo $redirect_url;
```

redirect url to redirect your user to phonepay payment page complete the payment after payment complete phonepay will redirect to your callback url with payment details

License
-------

[](#license)

The PhonePay PHP SDK is released under the MIT License. See [LICENSE](LICENSE) file for more details.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

8

Last Release

1020d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27807661?v=4)[shibanashiq697](/maintainers/shibanashiq697)[@shibanashiq697](https://github.com/shibanashiq697)

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shibanashiqc-phone-pay-php/health.svg)

```
[![Health](https://phpackages.com/badges/shibanashiqc-phone-pay-php/health.svg)](https://phpackages.com/packages/shibanashiqc-phone-pay-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.3M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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