PHPackages                             brainlabsweb/laravel-paytm - 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. brainlabsweb/laravel-paytm

ActiveLibrary[Payment Processing](/categories/payments)

brainlabsweb/laravel-paytm
==========================

Paytm gateway for Laravel Applications

v1.0.2(7y ago)1181MITPHPPHP ^7.1.3

Since Feb 13Pushed 7y agoCompare

[ Source](https://github.com/brainlabsweb/laravel-paytm)[ Packagist](https://packagist.org/packages/brainlabsweb/laravel-paytm)[ RSS](/packages/brainlabsweb-laravel-paytm/feed)WikiDiscussions master Synced yesterday

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

[![](https://camo.githubusercontent.com/12a75e67df8f4436657c4e3da0a5b4234b8c1fb453224a8a1becc1f681660cfa/68747470733a2f2f627261696e6c6162737765622e636f6d2f7361666172692d70696e6e65642d7461622e737667)](https://brainlabsweb.com)

💰 Laravel Paytm 💰
==================

[](#moneybag-laravel-paytm-moneybag)

[![Latest Stable Version](https://camo.githubusercontent.com/a03926406a41776800b303892f1ddbfde0fac752edcd7a0050a6f979f9d4dd2d/68747470733a2f2f706f7365722e707567782e6f72672f627261696e6c6162737765622f6c61726176656c2d706179746d2f762f737461626c652e737667)](https://packagist.org/packages/brainlabsweb/laravel-paytm)[![Total Downloads](https://camo.githubusercontent.com/ecd94806fdac9b02e53d09b14e97ebeb1149099145873938a957db134bcfcf27/68747470733a2f2f706f7365722e707567782e6f72672f627261696e6c6162737765622f6c61726176656c2d706179746d2f642f746f74616c2e737667)](https://packagist.org/packages/brainlabsweb/laravel-paytm)[![License](https://camo.githubusercontent.com/b6a06e9a3730df290c3d342bd2bc49d6b8ca960f0bab444fd5a5cbead7d1f1d2/68747470733a2f2f706f7365722e707567782e6f72672f627261696e6c6162737765622f6c61726176656c2d706179746d2f6c6963656e73652e737667)](https://packagist.org/packages/brainlabsweb/laravel-paytm)

This package allows you to integrate Paytm payment gateway into your laravel app. For Paytm full documentation your can refer [here](https://developer.paytm.com/docs/)

💡 Installation
--------------

[](#bulb-installation)

1. Install the package via Composer:

```
composer require brainlabsweb/laravel-paytm
```

The package will automatically register its service provider.

2. publish the configuration file

```
php artisan vendor:publish --provider="Brainlabsweb\Paytm\PaytmServiceProvider"
```

Configuration
-------------

[](#configuration)

**Note: For Laravel 5.5 and above you can skip the following steps**

In you `config/app.php` add these

```
'providers' => [
    // Other service providers...
    Brainlabsweb\Patym\PatymServiceProvider::class,
],

```

Also under aliases

```
'aliases' => [
    // Other aliases
    'Paytm' => Brainlabsweb\Patym\Paytm::class,
],

```

### To get the paytm api urls

[](#to-get-the-paytm-api-urls)

These urls will automatically direct to corresponding paytm sandbox, live modes based on the 💪 **default** status set in paytm config file

```
paytm()->getTxnUrl(); // for charging
paytm()->getTransactionStatusUrl(); // to know the status of the paytm transaction
paytm()->getRefundUrl(); // to inititate refund
paytm()->getRefundStatusUrl(); // to know the refund status

```

### in your view file

[](#in-your-view-file)

```
/**
* The below are mandatory fields
* optional fields MOBILE_NO, EMAIL
*/
$data = [
    'ORDER_ID'   => 'order_id',
    'TXT_AMOUNT' => '1',
    'CUST_ID'    => 'custid'
];

    @foreach(\Brainlabsweb\Paytm\Paytm::prepare($data) as $key => value)

    @endforeach

    Pay

OR

paytm()->prepare($data)

```

### Disable CSRF on Paytm Routes

[](#disable-csrf-on-paytm-routes)

Make sure all POST request handling routes of Paytm are not CSRF protected. For example

```
Route::post('paytm/verify','PaytmController@verify');

```

You can disable these in `app/Http/Middleware/VerifyCsrfToken.php`

```
protected $except = ['paytm/verify'];

```

### Once the payment is done in your controller

[](#once-the-payment-is-done-in-your-controller)

```
\Brainlabsweb\Paytm\Paytm::verify(); // returns true/false

OR

paytm()->verify();

```

#### To get Paytm response status

[](#to-get-paytm-response-status)

```
\Brainlabsweb\Paytm\Paytm::response(); // returns paytm response array

OR

paytm()->response();

```

#### To know the transaction status

[](#to-know-the-transaction-status)

```
Make POST REQUEST with param $order_id

\Brainlabsweb\Paytm\Paytm::getTransactionStatus($order_id); // returns paytm response array

OR

paytm()->getTransactionStatus($order_id);

```

#### To initiate refund

[](#to-initiate-refund)

```
$data = [
    'ORDERID'   => 'order_id',
    'REFID' => 'ref1', // should be unique everytime
    'TXNID'    => 'TXNID' // will get as response when made a transaction
    'REFUNDAMOUNT' => '1',
    'COMMENT' => 'SOME TEXT' // THIS IS OPTIONAL PARAMTER
];

\Brainlabsweb\Paytm\Paytm::refund($data); // returns paytm response array

OR

paytm()->refund($data);

```

#### To know the refund status

[](#to-know-the-refund-status)

```
$data = [
    'ORDERID'   => 'order_id',
    'REFID' => 'ref1', // This is REFID for which refund status is being inquired
];

\Brainlabsweb\Paytm\Paytm::refundStatus($data); // returns paytm response array

OR

paytm()->refundStatus($data);

```

### Done!!

[](#done)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

3

Last Release

2567d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelpaytmpaytm-gatewaypaytmlaravel-paytmMaheshbrainlabsweb

### Embed Badge

![Health badge](/badges/brainlabsweb-laravel-paytm/health.svg)

```
[![Health](https://phpackages.com/badges/brainlabsweb-laravel-paytm/health.svg)](https://phpackages.com/packages/brainlabsweb-laravel-paytm)
```

###  Alternatives

[softon/indipay

The Laravel 5 Package for Indian Payment Gateways. Currently supported gateways: CCAvenue, PayUMoney, EBS, CitrusPay, InstaMojo, ZapakPay, Mocker

6594.6k1](/packages/softon-indipay)[paytm/paytmchecksum

This is for paytm checksum creation and verification in PHP

13466.9k3](/packages/paytm-paytmchecksum)[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)

PHPackages © 2026

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