PHPackages                             loveycom/cashfree - 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. loveycom/cashfree

ActiveLibrary[Payment Processing](/categories/payments)

loveycom/cashfree
=================

A package for CashFree Payment Gateway.

v2.1.0(5y ago)516.2k↑61.1%31MITPHP

Since Sep 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kayusgold/laravel-cashfree-api)[ Packagist](https://packagist.org/packages/loveycom/cashfree)[ RSS](/packages/loveycom-cashfree/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (1)

CashFree Payment Gateway Laravel Package
========================================

[](#cashfree-payment-gateway-laravel-package)

[![Issues](https://camo.githubusercontent.com/972f4b9ddbd33837bce9bb22bcf97f732cdecbb3c151528f3c326935f911d859/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b61797573676f6c642f6c61726176656c2d63617368667265652d6170693f7374796c653d666c61742d737175617265)](https://github.com/)[![Stars](https://camo.githubusercontent.com/dffe36537b7eb58131f1a7b5e7e880657d95b633f55491083ea91098472d1bcc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b61797573676f6c642f6c61726176656c2d63617368667265652d6170693f7374796c653d666c61742d737175617265)](https://github.com/)[![Forks](https://camo.githubusercontent.com/ee271a25281d541716c5b9c9af211baa7b4ea89d1ebbab6d8b0204116424c7da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b61797573676f6c642f6c61726176656c2d63617368667265652d6170693f7374796c653d666c61742d737175617265)](https://github.com/)[![License](https://camo.githubusercontent.com/eb4133fdb000645f22a4b94a5bf1674761f769321595130d6cb092b94e13ff2a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b61797573676f6c642f6c61726176656c2d63617368667265652d6170693f7374796c653d666c61742d737175617265)](https://github.com/)

An open source package by [kayusgold](https://plustech.com.ng) for [CashFree](https://cashfree.com), an Indian payment gateway.

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

[](#documentation)

CashFree offers their clients many services to make transactions between sender and receiver seemlessly easy. However, this package focuses mainly on MarketPlace Settlement API and Payment Gateway API. Visit [here](http://docs.cashfree.com/docs/ces/guide/) for MarketPlace Settlement API documentation and [here](https://docs.cashfree.com/docs/rest/guide/) for Payment Gateway API documentation.

Using the package, but you're stuck? Found a bug? Have a question or suggestion for improving this package? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.

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

[](#requirements)

1. PHP &gt;= 7.0.\*
2. Laravel &gt;= 5.6.\*

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

[](#installation)

1. To use LoveyCom CashFree package, add it to your project using composer:

```
composer require loveycom/cashfree

```

2. Open Config/app.php and add the following to the providers array:

```
LoveyCom\CashFree\CashFreeServiceProvider::class,
```

3. Run the command below to publish the package config file config/cashfree.php:

```
php artisan vendor:publish
```

4. Open config/cashfree.php to edit neccessary parameters such as API Key ID and Secret Key.

```
    'appID' => '',
    'secretKey' => '',
    'testURL' => 'https://ces-gamma.cashfree.com',
    'prodURL' => 'https://ces-api.cashfree.com',
    'maxReturn' => 100,
    'isLive' => false,
```

Do not forget to dump composer autoload

```
composer dump-autoload

```

USAGE
-----

[](#usage)

1. Edit the cashfree.php already published to your app config. Location: `config/cashfree.php`

- Fill all the required details

2. The cashfree api wrapper follows the cashfree payment gateway categories (Marketplace &amp; PaymentGateway) - read more from their docummentation
3. Under the Marketplace category, this wrapper provides you with the following classes and methods

- ### Marketplace

    [](#marketplace)

- `checkBalance()` -- endpoint /getBalance
- `withdraw($amount, $remark = "")` -- endpoint /ces/v1/requestWithdrawal
- `getLedger($maxReturn = "", $lastReturnId = "")` -- endpoint /ces/v1/getLedger?maxReturn=$maxReturn

- ### Settlement

    [](#settlement)

- `status($orderId)` -- endpoint /ces/v1/getOrderSettlementStatus/$orderId

- ### Transaction

    [](#transaction)

- `importTransaction($details = [])` -- endpoint /ces/v1/importTransaction
- `retreive($orderId = "")` -- endpoint /ces/v1/getTransactions or /ces/v1/getTransaction/$orderId
- `attachVendorToTransaction($orderId, $vendorId, $commission = "", $commissionAmount = "")` -- endpoint /ces/v1/attachVendor
- `detachVendorFromTransaction($orderId, $vendorId)` -- endpoint /ces/v1/detachVendor

- ### Vendor

    [](#vendor)

- `create($vendor = [], $vendorId = "")` -- endpoints /ces/v1/editVendor/$vendorId (Update Vendor Details) | /ces/v1/addVendor (Create Vendor)
- `retreive($vendorId = "")` -- endpoints -- endpoints /ces/v1/getVendor/$vendorId | /ces/v1/getVendors
- `checkStatus($vendorId)` -- endpoint /ces/v1/getVendor/$vendorId
- `adjustVendorBalance($vendorId, $adjustmentId, $amount, $type = "CREDIT", $remark = "")` -- endpoint /ces/v1/adjustVendor
- `requestVendorPayout($vendorId, $amount)` -- endpoint /ces/v1/requestVendorPayout
- `getLedger($vendorId, $maxReturn = 50, $lastReturnId = "")` -- endpoint /ces/v1/getVendorLedger/$vendorId?maxReturn=$maxReturn
- `getTransferDetails($vendorTransferId = "", $vendorId = "", $maxReturn = 50, $lastReturnId = "", $startDate = "", $endDate = "")` -- endpoint /ces/v1/getVendorTransfer/...
- `transferBetweenVendors($fromVendorId, $toVendorId, $amount, $adjustmentId)` -- endpoint /transferVendorBalance

4. The PaymentGateway has the following classes and methods

- ### Order

    [](#order)

- `create($order)` -- endpoint /api/v1/order/create
- `getLink($orderId)` -- endpoint /api/v1/order/info/link
- `getDetails($orderId)` -- endpoint /api/v1/order/info/
- `getStatus($orderId)` -- endpoint /api/v1/order/info/status

- ### Refund

    [](#refund)

- `create($orderId, $referenceId, $amount, $remark = "")` -- endpoint /api/v1/order/refund
- `instantRefund($orderId, $referenceId, $amount, $remark = "", $refundType = "", $merchantRefundId = "", $mode = "CASHGRAM", $accountNo = "", $ifsc = "")` -- endpoint /api/v1/order/refund
- `retreive($startDate, $endDate, $lastId = "", $count = "")` -- endpoint /api/v1/refunds

- ### Settlement

    [](#settlement-1)

- `getAll($startDate, $endDate, $lastId = "", $count = "")` -- endpoint /api/v1/settlements
- `getOne($settlementId)` -- endpoint /api/v1/settlement

- ### Transaction

    [](#transaction-1)

- `retreive($startDate = "", $endDate = "", $txStatus = "", $lastID = "", $count = "")` -- endpoint /api/v1/transactions

5. ### USAGE EXAMPLE

    [](#usage-example)

- To use the Order class of the PaymentGateway Category, ```
    //import the class
    use LoveyCom\CashFree\PaymentGateway\Order;

    //instantiate the class
    $order = new Order();
    //prepare the order details
    //NOTE: Prepare a route for returnUrl and notifyUrl (something like a webhook). However, if you have webhook setup in your cashfree dashboard, no need for notifyUrl. But if notifyUrl is set, it will be called instead.
    $od["orderId"] = "ORDER-84984941";
    $od["orderAmount"] = 10000;
    $od["orderNote"] = "Subscription";
    $od["customerPhone"] = "9000012345";
    $od["customerName"] = "Test Name";
    $od["customerEmail"] = "test@cashfree.com";
    $od["returnUrl"] = "http://127.0.0.1:8000/order/success";
    $od["notifyUrl"] = "http://127.0.0.1:8000/order/success";
    //call the create method
    $order->create($od);
    //get the payment link of this order for your customer
    $link = $order->getLink($od['orderId'])
    //You can now either send this link to your customer through email or redirect to it for them to complete the payment.
    //To confirm the payment,
    //Call either getDetails($orderId) or getStatus($orderId) method
    ```

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

[](#contributing)

Thank you for your interest, here are some of the many ways to contribute.

- Check out our [contributing guide](/.github/CONTRIBUTING.md)

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

This software is released under the [MIT](LICENSE) License.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~98 days

Total

6

Last Release

2047d ago

Major Versions

v1.0.3 → v2.0.02020-03-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31309781?v=4)[Kayode Omolaoye](/maintainers/kayusgold)[@kayusgold](https://github.com/kayusgold)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/loveycom-cashfree/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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