PHPackages                             shahidneermunda/kseb-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shahidneermunda/kseb-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shahidneermunda/kseb-sdk
========================

A Laravel SDK to fetch and calculate KSEB utility bills.

v1(1mo ago)00MITPHPPHP ^8.1

Since Apr 15Pushed 1mo agoCompare

[ Source](https://github.com/shahidneermunda/kseb-sdk-utility-in-php)[ Packagist](https://packagist.org/packages/shahidneermunda/kseb-sdk)[ RSS](/packages/shahidneermunda-kseb-sdk/feed)WikiDiscussions main Synced 1w ago

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

KSEB SDK for Laravel
====================

[](#kseb-sdk-for-laravel)

A lightweight Laravel package to fetch and parse KSEB utility bill information.

Features
--------

[](#features)

- Laravel auto-discovery for provider and facade
- Simple facade and container-based usage
- Configurable endpoint, timeout, and CSS selector
- Safe amount parsing with consistent response format
- Bill payment request support through configurable payment endpoint

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

[](#requirements)

- PHP `^8.1`
- Laravel `^10.0` or `^11.0`

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

[](#installation)

Install with Composer:

```
 composer require shahidneermunda/kseb-sdk
```

The package supports Laravel auto-discovery, so no manual provider registration is required in normal setups.

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

[](#configuration)

Publish the package config:

```
php artisan vendor:publish --tag=config
```

Then update `config/kseb.php` as needed:

```
return [
    'quickpay_url' => env('KSEB_QUICKPAY_URL', 'https://wss.kseb.in/selfservices/quickpay'),
    'payment_url' => env('KSEB_PAYMENT_URL', 'https://wss.kseb.in/selfservices/quickpay/pay'),
    'timeout' => (int) env('KSEB_TIMEOUT', 15),
    'bill_amount_selector' => env('KSEB_BILL_AMOUNT_SELECTOR', '#billAmount'),
];
```

You can also place these values in your `.env`:

```
KSEB_QUICKPAY_URL=https://wss.kseb.in/selfservices/quickpay
KSEB_PAYMENT_URL=https://wss.kseb.in/selfservices/quickpay/pay
KSEB_TIMEOUT=15
KSEB_BILL_AMOUNT_SELECTOR=#billAmount
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use Kseb;

$bill = Kseb::getBill('1234567890');

return response()->json($bill);
```

### Bill Payment

[](#bill-payment)

```
use Kseb;

$payment = Kseb::payBill('1234567890', 1240.50, [
    'payment_mode' => 'UPI',
    'payer_name' => 'John Doe',
    'mobile' => '9876543210',
]);

return response()->json($payment);
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Shahid\KsebSdk\KsebClient;

class BillController
{
    public function show(KsebClient $kseb)
    {
        $bill = $kseb->getBill('1234567890');

        return response()->json($bill);
    }
}
```

### Response Format

[](#response-format)

```
[
    'consumer_number' => '1234567890',
    'amount' => 0.0,
    'currency' => 'INR',
    'status' => 'ok', // or 'error'
    'error' => null,  // error message when status is 'error'
    'fetched_at' => '2026-04-15 12:34:56',
]
```

### Bill Payment Response Format

[](#bill-payment-response-format)

```
[
    'consumer_number' => '1234567890',
    'amount' => 1240.50,
    'currency' => 'INR',
    'status' => 'ok', // or 'error'
    'error' => null, // error message when status is 'error'
    'transaction_id' => 'TXN12345',
    'payment_status' => 'submitted', // e.g. submitted, success, failed
    'response' => [], // raw response payload from payment endpoint
    'paid_at' => '2026-04-15 12:40:00',
]
```

When an upstream request fails, `status` is returned as `error` and a short failure reason is included in `error`.

Notes
-----

[](#notes)

- Current implementation fetches the quick pay page and parses the configured bill amount selector.
- Depending on KSEB portal behavior, you may need to extend request flow (for example, posting consumer details) to fetch live bill amounts.

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/147cce137def0220218443be6a2653633513c86d8d84cc060712ee3c43d37228?d=identicon)[shahidneermunda](/maintainers/shahidneermunda)

### Embed Badge

![Health badge](/badges/shahidneermunda-kseb-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/shahidneermunda-kseb-sdk/health.svg)](https://phpackages.com/packages/shahidneermunda-kseb-sdk)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513381.2k11](/packages/spatie-laravel-pjax)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)

PHPackages © 2026

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