PHPackages                             medigeneit/genesis-accounting - 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. [API Development](/categories/api)
4. /
5. medigeneit/genesis-accounting

ActiveLibrary[API Development](/categories/api)

medigeneit/genesis-accounting
=============================

Laravel package for Genesis ERP API integration

022↓100%1PHP

Since Mar 11Pushed 2mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Genesis Accounting
==================

[](#genesis-accounting)

[![Packagist](https://camo.githubusercontent.com/2f172deee9468690c4ed04c55a2527a38642bf400432a0c0c89e977fe4028ba8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d65646967656e6569742f67656e657369732d6163636f756e74696e672e737667)](https://packagist.org/packages/medigeneit/genesis-accounting)

A Laravel package for seamless integration with the Genesis ERP API system. Supports Laravel 8.x through 12.x and PHP 8.1 through 8.3.

> **Note:** This is an internal package maintained by [Medigene IT](https://github.com/medigeneit). Outside contributions are not accepted.

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

[](#installation)

Install via Composer:

```
composer require medigeneit/genesis-accounting
```

The package uses Laravel's auto-discovery, so no manual service provider or facade registration is needed.

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

[](#configuration)

Add the following variables to your `.env` file:

```
ERP_API_BASE_URL=https://stepserp.webnstech.net/Webns/steperp/med/
ERP_API_KEY=d0e876fbfb1c0033b14c69281f3ccff1cf908ce2a7b9b7255b1892a90687b33a
```

That's it. No config publishing or additional setup required.

### Optional Configuration

[](#optional-configuration)

If you need to customize the config file, you can publish it:

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

You can also set the API timeout (defaults to 30 seconds):

```
ERP_API_TIMEOUT=30
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

#### enrollStudent

[](#enrollstudent)

```
use Medigeneit\GenesisAccounting\Facades\GenesisAccounting;

$response = GenesisAccounting::enrollStudent([
    'enrollments' => [
        [
            'reg_no' => 'REG1001',
            'full_name' => 'Rahim Uddin',
            'project_code' => '00001',
            'project_name' => 'FCPS Part-I',
            'gender' => 'Male',
            'phone' => '01711111111',
            'email' => 'rahim@gmail.com',
            'course_id' => 101,
            'course_name' => 'Web Development',
            'course_code' => 'WD-01',
            'course_category_id' => 10,
            'course_category_name' => 'IT',
            'branch_id' => 1,
            'batch_id' => 1,
            'batch_name' => 'Batch-15',
            'batch_type' => 'Regular',
            'session_id' => 2026,
            'session_name' => 'Spring 2026',
            'course_fee' => 30000,
            'lecture_sheet_fee' => 2000,
            'courier_fee' => 100,
            'discount_amount' => 1000,
            'payment' => [
                'payment_method' => 'BKASH',
                'payment_gateway' => 'BKASH',
                'transaction_id' => 'XDASDFASFD',
                'gateway_reference' => '',
                'mobile_ac_number' => '01711111111',
                'mobile_number' => '01711111111',
                'card_type' => '',
                'card_last4' => '',
                'card_issuer' => '',
                'bank_name' => '',
                'bank_account' => '',
                'currency' => 'BDT',
                'payment_amount' => 3000.00,
                'gateway_fee' => 0.00,
                'payment_status' => 'SUCCESS',
                'ip_address' => '',
                'device_info' => '',
                'remarks' => 'Online payment',
            ],
        ],
    ],
]);
```

#### doctorPayment

[](#doctorpayment)

```
$response = GenesisAccounting::doctorPayment([
    'payments' => [
        [
            'reg_no' => 'DOC12345',
            'payment_date' => '2026-03-08',
            'payment_date_time' => '2026-03-08 01:01:01 PM',
            'payment_method' => 'BKASH',
            'payment_gateway' => 'BKASH',
            'transaction_id' => 'TXN789456123',
            'gateway_reference' => 'REF123456',
            'order_id' => 'ORD20260308-001',
            'mobile_ac_number' => '01711111111',
            'mobile_number' => '01712345678',
            'card_type' => '',
            'card_last4' => '',
            'card_issuer' => '',
            'bank_name' => '',
            'bank_account' => '',
            'currency' => 'BDT',
            'payment_amount' => 5000.00,
            'gateway_fee' => 50.00,
            'payment_status' => 'SUCCESS',
            'ip_address' => '192.168.1.100',
            'device_info' => 'Chrome on Windows 10',
            'remarks' => 'March consultation fee',
            'payment_for' => 'Student Fee',
            'entryById' => 'E00001',
            'entryByName' => 'Alice',
        ],
    ],
]);
```

#### customerPayment

[](#customerpayment)

```
$response = GenesisAccounting::customerPayment([
    'payments' => [
        [
            'customer_id' => 'DOC67890',
            'payment_date' => '2026-03-08',
            'payment_date_time' => '2026-03-08 01:01:01 PM',
            'payment_method' => 'CASH',
            'payment_gateway' => '',
            'transaction_id' => '',
            'gateway_reference' => '',
            'order_id' => '',
            'mobile_ac_number' => '01711111111',
            'mobile_number' => '',
            'card_type' => '',
            'card_last4' => '',
            'card_issuer' => '',
            'bank_name' => '',
            'bank_account' => '',
            'currency' => 'BDT',
            'payment_amount' => 3000.00,
            'gateway_fee' => 0.00,
            'payment_status' => 'SUCCESS',
            'ip_address' => '',
            'device_info' => '',
            'remarks' => 'Onsite payment',
            'payment_for' => 'Sales',
            'entryById' => 'E00001',
            'entryByName' => 'Alice',
        ],
    ],
]);
```

#### sales

[](#sales)

```
$response = GenesisAccounting::sales([
    'SALESHeader' => [
        [
            'invoiceNo' => 'INV-20260308-001',
            'invoiceDate' => '2026-03-08',
            'customerCode' => 'CUST001',
            'customerName' => 'John Doe',
            'customerPhone' => '017XXXXXXXX',
            'customerAddress' => '123, Main Street, Dhaka',
            'invoiceMode' => 'Cash',
            'totalAmount' => 5000.00,
            'totalDiscount' => 200.00,
            'totalVatAmount' => 450.00,
            'deliveryCharge' => 50.00,
            'netAmount' => 5300.00,
            'invoiceType' => 'Cash',
            'salesPersonId' => 'E00001',
            'salesPerson' => 'Alice',
            'paymentStatus' => 'Paid',
            'payment' => [
                'payment_method' => 'CASH',
                'payment_gateway' => '',
                'transaction_id' => '',
                'gateway_reference' => '',
                'order_id' => '',
                'mobile_number' => '',
                'card_type' => '',
                'card_last4' => '',
                'card_issuer' => '',
                'bank_name' => '',
                'bank_account' => '',
                'currency' => 'BDT',
                'payment_amount' => 3000.00,
                'gateway_fee' => 0.00,
                'payment_status' => 'SUCCESS',
                'ip_address' => '',
                'device_info' => '',
                'remarks' => 'Onsite payment',
                'paymnet_for' => 'Sales',
            ],
            'SALESDetails' => [
                [
                    'itemCode' => 'ITEM001',
                    'itemName' => 'Paracetamol 500mg',
                    'packSize' => '10x10',
                    'uom' => 'Box',
                    'salesQty' => 2,
                    'unitPrice' => 200.00,
                    'unitVatPrct' => 15.00,
                    'unitDiscount' => 5.00,
                    'totalLineCost' => 390.00,
                ],
                [
                    'itemCode' => 'ITEM002',
                    'itemName' => 'Amoxicillin 250mg',
                    'packSize' => '10x10',
                    'uom' => 'Box',
                    'salesQty' => 1,
                    'unitPrice' => 300.00,
                    'unitVatPrct' => 15.00,
                    'unitDiscount' => 0.00,
                    'totalLineCost' => 345.00,
                ],
            ],
        ],
    ],
]);
```

#### salesReturn

[](#salesreturn)

```
$response = GenesisAccounting::salesReturn([
    'SALESReturnHeader' => [
        [
            'returnNo' => 'RET-20260308-001',
            'returnDate' => '2026-03-08',
            'originalInvoiceNo' => 'INV-20260308-001',
            'customerCode' => 'CUST001',
            'customerName' => 'John Doe',
            'customerPhone' => '017XXXXXXXX',
            'customerAddress' => '123, Main Street, Dhaka',
            'returnMode' => 'Cash',
            'totalReturnAmount' => 1000.00,
            'totalDiscount' => 50.00,
            'totalVatAmount' => 90.00,
            'netReturnAmount' => 1040.00,
            'returnReason' => 'Damaged Product',
            'salesPerson' => 'Alice',
            'refundStatus' => 'Refunded',
            'entryById' => 'E001',
            'entryByName' => 'asad',
            'refund' => [
                'payment_method' => 'CASH',
                'payment_gateway' => '',
                'transaction_id' => '',
                'gateway_reference' => '',
                'order_id' => '',
                'mobile_number' => '',
                'card_type' => '',
                'card_last4' => '',
                'card_issuer' => '',
                'bank_name' => '',
                'bank_account' => '',
                'currency' => 'BDT',
                'payment_amount' => 1040.00,
                'gateway_fee' => 0.00,
                'payment_status' => 'SUCCESS',
                'ip_address' => '',
                'device_info' => '',
                'remarks' => 'Refund for returned sales',
                'payment_for' => 'Sales Return',
            ],
            'SALESReturnDetails' => [
                [
                    'itemCode' => 'ITEM001',
                    'itemName' => 'Paracetamol 500mg',
                    'packSize' => '10x10',
                    'uom' => 'Box',
                    'returnQty' => 1,
                    'unitPrice' => 200.00,
                    'unitVatPrct' => 15.00,
                    'unitDiscount' => 5.00,
                    'totalLineCost' => 195.00,
                    'returnReason' => 'Damaged strip',
                ],
                [
                    'itemCode' => 'ITEM002',
                    'itemName' => 'Amoxicillin 250mg',
                    'packSize' => '10x10',
                    'uom' => 'Box',
                    'returnQty' => 1,
                    'unitPrice' => 300.00,
                    'unitVatPrct' => 15.00,
                    'unitDiscount' => 0.00,
                    'totalLineCost' => 345.00,
                    'returnReason' => 'Expired',
                ],
            ],
        ],
    ],
]);
```

#### salarySheet

[](#salarysheet)

```
$response = GenesisAccounting::salarySheet([
    'salaryMonth' => '2026-03',
    'salaryType' => 'Monthly',
    'salary_Prepared_by' => 'E0001',
    'company_name' => 'GENESIS',
    'employeeSalaries' => [
        [
            'employeeId' => 'EMP001',
            'employeeName' => 'Rahim Uddin',
            'department' => 'Accounts',
            'designation' => 'Account Officer',
            'bankAccount' => '1234567890',
            'bankName' => 'DBBL',
            'basicSalary' => 30000.00,
            'houseRent' => 15000.00,
            'medicalAllowance' => 3000.00,
            'conveyanceAllowance' => 2000.00,
            'otherAllowance' => 1000.00,
            'grossSalary' => 51000.00,
            'taxDeduction' => 2000.00,
            'pfDeduction' => 1500.00,
            'loanDeduction' => 1000.00,
            'otherDeduction' => 500.00,
            'totalDeduction' => 5000.00,
            'netSalary' => 46000.00,
            'paymentMethod' => 'BANK',
            'paymentStatus' => 'Pending',
            'remarks' => 'March salary',
        ],
    ],
]);
```

#### batchShifting

[](#batchshifting)

```
$response = GenesisAccounting::batchShifting([
    'batch_shift' => [
        'shift_date' => '2026-03-09',
        'shift_reason' => 'Schedule conflict',
        'reg_no' => 'REG1001',
        'new_reg_no' => 'REG1002',
        'shifting_type' => 'NEW_BATCH',
        'used_amount' => 3000,
        'batch_shifting_fee' => 2000,
        'adjustment_amount' => 2000,
        'rest_amount' => 2000,
        'new_batch' => [
            'reg_no' => 'REG1001',
            'full_name' => 'Rahim Uddin',
            'gender' => 'Male',
            'phone' => '01711111111',
            'email' => 'rahim@gmail.com',
            'project_code' => '00001',
            'project_name' => 'FCPS Part-I',
            'course_id' => 101,
            'course_name' => 'Web Development',
            'course_code' => 'WD-01',
            'course_category_id' => 10,
            'course_category_name' => 'IT',
            'branch_id' => 1,
            'batch_name' => 'Batch-15',
            'batch_id' => 1333,
            'batch_type' => 'Regular',
            'session_id' => 2026,
            'session_name' => 'Spring 2026',
            'course_fee' => 30000,
            'lecture_sheet_fee' => 2000,
            'discount_amount' => 1000,
            'prev_batch_rest_amount' => 2000,
            'payment' => [
                'payment_method' => 'BKASH',
                'payment_gateway' => 'BKASH',
                'transaction_id' => 'XDASDFASFD',
                'gateway_reference' => '',
                'mobile_ac_number' => '01711111111',
                'mobile_number' => '01711111111',
                'card_type' => '',
                'card_last4' => '',
                'card_issuer' => '',
                'bank_name' => '',
                'bank_account' => '',
                'currency' => 'BDT',
                'payment_amount' => 3000.00,
                'gateway_fee' => 0.00,
                'payment_status' => 'SUCCESS',
                'ip_address' => '',
                'device_info' => '',
                'remarks' => 'Online payment',
            ],
        ],
    ],
]);
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Medigeneit\GenesisAccounting\GenesisAccountingClient;

class MyController extends Controller
{
    public function store(GenesisAccountingClient $erp)
    {
        $response = $erp->enrollStudent([
            'enrollments' => [/* ... */],
        ]);

        if ($response->isSuccessful()) {
            return response()->json($response->getData());
        }

        return response()->json([
            'error' => $response->getMessage(),
        ], $response->getStatusCode());
    }
}
```

### Generic Requests

[](#generic-requests)

For any custom endpoint:

```
// GET request
$response = GenesisAccounting::get('custom-endpoint', ['param' => 'value']);

// POST request
$response = GenesisAccounting::post('custom-endpoint', ['key' => 'value']);
```

### Response Handling

[](#response-handling)

All methods return an `ApiResponse` object:

```
$response = GenesisAccounting::enrollStudent($data);

$response->isSuccessful();  // bool
$response->getStatusCode(); // int (HTTP status code)
$response->getData();       // array (response body)
$response->getMessage();    // string
$response->toArray();       // ['success' => bool, 'status_code' => int, 'message' => string, 'data' => array]
```

### Error Handling

[](#error-handling)

```
use Medigeneit\GenesisAccounting\Exceptions\GenesisAccountingException;

try {
    $response = GenesisAccounting::enrollStudent($data);
} catch (GenesisAccountingException $e) {
    $e->getMessage();      // Error message
    $e->getStatusCode();   // HTTP status code
    $e->getResponseBody(); // Response body as array
}
```

Available Methods
-----------------

[](#available-methods)

MethodHTTPEndpoint`enrollStudent(array $data, array $query)`POST`/enroll-student``doctorPayment(array $data, array $query)`POST`/doctor-payment``customerPayment(array $data, array $query)`POST`/customer-payment``sales(array $data, array $query)`POST`/sales``salesReturn(array $data, array $query)`POST`/sales-return``salarySheet(array $data, array $query)`POST`/salary-sheet``batchShifting(array $data, array $query)`POST`/batch-shifting``get(string $endpoint, array $query)`GETCustom`post(string $endpoint, array $data, array $query)`POSTCustomTesting
-------

[](#testing)

```
composer test
```

Support
-------

[](#support)

- **Issues:** [GitHub Issues](https://github.com/medigeneit/genesis-accounting/issues)
- **Source:** [GitHub Repository](https://github.com/medigeneit/genesis-accounting)
- **Packagist:** [medigeneit/genesis-accounting](https://packagist.org/packages/medigeneit/genesis-accounting)

License
-------

[](#license)

MIT - [Medigene IT](https://github.com/medigeneit)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance58

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/249b21106863e8deda33de06b40725532b784618adaa8f1bf7c1f2f31bfc1446?d=identicon)[medigeneowner](/maintainers/medigeneowner)

---

Top Contributors

[![msisaif](https://avatars.githubusercontent.com/u/61042251?v=4)](https://github.com/msisaif "msisaif (1 commits)")

### Embed Badge

![Health badge](/badges/medigeneit-genesis-accounting/health.svg)

```
[![Health](https://phpackages.com/badges/medigeneit-genesis-accounting/health.svg)](https://phpackages.com/packages/medigeneit-genesis-accounting)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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