PHPackages                             giorgigrdzelidze/laravel-rsge - 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. giorgigrdzelidze/laravel-rsge

ActiveLibrary[API Development](/categories/api)

giorgigrdzelidze/laravel-rsge
=============================

Laravel 12 client for Georgian Revenue Service (rs.ge) e-services: cash register Z-reports today, waybills and invoices next.

v1.0.0(1mo ago)00MITPHPPHP ^8.2CI passing

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/GiorgiGrdzelidze/laravel-rsge)[ Packagist](https://packagist.org/packages/giorgigrdzelidze/laravel-rsge)[ RSS](/packages/giorgigrdzelidze-laravel-rsge/feed)WikiDiscussions main Synced 1w ago

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

 [![Latest Version](https://camo.githubusercontent.com/78fa1e8ac1336f6c468a54fdc000e7fdb0937dc878d80dce474ca301b1e9c25b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67696f7267696772647a656c69647a652f6c61726176656c2d727367653f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/78fa1e8ac1336f6c468a54fdc000e7fdb0937dc878d80dce474ca301b1e9c25b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67696f7267696772647a656c69647a652f6c61726176656c2d727367653f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265) [![PHP Version](https://camo.githubusercontent.com/5225306789f322fceac25d38d5172db2b8f5e137c3c5dd065bd0eb960d963145/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f67696f7267696772647a656c69647a652f6c61726176656c2d727367652f7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5225306789f322fceac25d38d5172db2b8f5e137c3c5dd065bd0eb960d963145/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f67696f7267696772647a656c69647a652f6c61726176656c2d727367652f7068703f7374796c653d666c61742d737175617265) [![License](https://camo.githubusercontent.com/fb19607b5661ebcdc198798938f0f98d56821e92befd644892a64f473b1a2705/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f47696f7267694772647a656c69647a652f6c61726176656c2d727367653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/fb19607b5661ebcdc198798938f0f98d56821e92befd644892a64f473b1a2705/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f47696f7267694772647a656c69647a652f6c61726176656c2d727367653f7374796c653d666c61742d737175617265) [![CI](https://github.com/GiorgiGrdzelidze/laravel-rsge/actions/workflows/ci.yml/badge.svg)](https://github.com/GiorgiGrdzelidze/laravel-rsge/actions/workflows/ci.yml)

🇬🇪 Laravel RSGE
===============

[](#-laravel-rsge)

> A production-grade Laravel package for the **Georgian Revenue Service (rs.ge)** SOAP API. Fetch cash register Z-reports today — waybills, taxpayer info, and more coming soon.

---

✨ Features
----------

[](#-features)

- 🧾 **Cash Register Z-Reports** — fetch daily Z-report details &amp; sums
- 🔐 **Basic Auth** — username/password authentication out of the box
- 🔄 **Retry with Backoff** — automatic retry on transient rs.ge system errors
- 🧪 **FakeTransport** — deterministic unit testing without hitting rs.ge
- 🏗️ **Extensible Architecture** — add new rs.ge services in minutes
- 🛡️ **Typed Exceptions** — `RsgeAuthenticationException`, `RsgeNotFoundException`, `RsgeSystemException`, `RsgeTransportException`
- 📦 **Zero Config** — Laravel auto-discovery, sensible defaults

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionPHP8.2+Laravel12.x / 13.xExtensions`ext-soap`, `ext-simplexml`---

🚀 Installation
--------------

[](#-installation)

```
composer require giorgigrdzelidze/laravel-rsge
```

Publish the config file (optional):

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

---

⚙️ Configuration
----------------

[](#️-configuration)

Add to your `.env`:

```
RSGE_USERNAME=your_username
RSGE_PASSWORD=your_password
```

🔧 Optional settings```
RSGE_CASH_REGISTER_WSDL=https://services.rs.ge/taxservice/taxpayerservice.asmx?WSDL
RSGE_LOGGING_ENABLED=true
RSGE_LOG_CHANNEL=stack
```

---

📖 Usage
-------

[](#-usage)

### 🧾 Fetch Z-Report Details

[](#-fetch-z-report-details)

```
use Rsge\Laravel\Facades\Rsge;

$reports = Rsge::cashRegister()->getZReportDetails(
    startDate: '2025-01-01',
    endDate: '2025-01-31',
);

foreach ($reports as $report) {
    echo "{$report->deviceNumber}: {$report->paidAmount} GEL ({$report->quantity} receipts)\n";
}
```

### 📅 Using Carbon Dates

[](#-using-carbon-dates)

```
use Carbon\CarbonImmutable;
use Rsge\Laravel\Facades\Rsge;

$start = CarbonImmutable::now()->startOfMonth();
$end = CarbonImmutable::now()->endOfMonth();

$reports = Rsge::cashRegister()->getZReportDetails($start, $end);
```

### 🛡️ Exception Handling

[](#️-exception-handling)

```
use Rsge\Laravel\Exceptions\RsgeAuthenticationException;
use Rsge\Laravel\Exceptions\RsgeNotFoundException;
use Rsge\Laravel\Exceptions\RsgeSystemException;
use Rsge\Laravel\Exceptions\RsgeTransportException;
use Rsge\Laravel\Facades\Rsge;

try {
    $reports = Rsge::cashRegister()->getZReportDetails('2025-01-01', '2025-01-31');
} catch (RsgeAuthenticationException $e) {
    // ❌ Invalid username or password
} catch (RsgeNotFoundException $e) {
    // 📭 No data for the given date range
} catch (RsgeSystemException $e) {
    // ⚠️ Transient rs.ge system error
} catch (RsgeTransportException $e) {
    // 🌐 Network or SOAP protocol failure
}
```

### 🔄 Retry on Transient Errors

[](#-retry-on-transient-errors)

```
use Rsge\Laravel\Facades\Rsge;
use Rsge\Laravel\Support\Retry;

$reports = Retry::onSystemError(
    operation: fn () => Rsge::cashRegister()->getZReportDetails('2025-01-01', '2025-01-31'),
    attempts: 3,
    baseDelayMs: 200,
);
```

---

🏗️ Architecture
---------------

[](#️-architecture)

```
src/
├── Contracts/            # 📜 Interfaces (Transport, Credentials, Service)
├── Auth/                 # 🔐 Authentication (BasicCredentials)
├── Transport/            # 🚛 SoapTransport + FakeTransport for testing
├── Exceptions/           # 💥 Typed exceptions mapped from rs.ge error codes
├── Support/              # 🛠️ ErrorMapper, Retry helper
├── Services/
│   ├── AbstractService   # 🧩 Base class for all services
│   └── CashRegister/     # 🧾 Z-Report service, DTOs, request objects
├── Facades/              # 🎭 Rsge facade
├── Rsge.php              # 🏭 Manager (service factory)
└── RsgeServiceProvider   # 📦 Laravel service provider

```

---

🗺️ Roadmap
----------

[](#️-roadmap)

ServiceSOAP MethodStatusCash Register Z-Report Details`Get_Z_Report_Details`✅ DoneCash Register Z-Report Sum`Get_Z_Report_Sum`🔜 PlannedTaxpayer Public Info`GetTPInfoPublic`🔜 PlannedTaxpayer Public Contacts`GetTPInfoPublicContacts`🔜 PlannedPayer Info`Get_Payer_Info`🔜 PlannedLegal Person Info`Get_LegalPerson_Info`🔜 PlannedWaybill Month Amount`Get_Waybill_Month_Amount`🔜 PlannedIncome Amount`Get_Income_Amount`🔜 PlannedComparison Act`Get_comp_act_new`🔜 PlannedPayer NACE Info`Get_Payer_Nace_Info`🔜 PlannedQuickCash Info`Get_QuickCash_Info`🔜 Planned---

🧩 Adding a New Service
----------------------

[](#-adding-a-new-service)

1. Create **DTOs** in `src/Services/YourService/DTOs/` with `fromSoap()` method
2. Create **Requests** in `src/Services/YourService/Requests/` with `toSoap()` method
3. Create a **Service** class extending `AbstractService`
4. Register in `RsgeServiceProvider` as a singleton
5. Add accessor to `Rsge` manager + update facade PHPDoc
6. Write **tests** using `FakeTransport`

---

🧪 Testing &amp; QA
------------------

[](#-testing--qa)

```
# 🚀 Full QA pipeline (lint + static analysis + tests)
composer qa

# Individual commands
composer pint:test    # ✏️ Code style (Pint)
composer stan         # 🔍 Static analysis (PHPStan level max)
composer test         # ✅ Tests (PHPUnit)
```

---

📄 License
---------

[](#-license)

MIT — see [LICENSE](LICENSE) file.

---

 Made with ❤️ in Georgia 🇬🇪

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8641522?v=4)[Giorgi Grdzelidze](/maintainers/GiorgiGrdzelidze)[@GiorgiGrdzelidze](https://github.com/GiorgiGrdzelidze)

---

Top Contributors

[![GiorgiGrdzelidze](https://avatars.githubusercontent.com/u/8641522?v=4)](https://github.com/GiorgiGrdzelidze "GiorgiGrdzelidze (2 commits)")

---

Tags

cash-registerfiscalgeorgialaravellaravel-packagepackagelistphprevenue-servicersgesoaptaxz-reportlaravelsoapgeorgiataxfiscalz-reportrs.gerevenue-servicecash-register

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/giorgigrdzelidze-laravel-rsge/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

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

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[moonshine/moonshine

Laravel administration panel

1.3k239.9k72](/packages/moonshine-moonshine)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.9M199](/packages/illuminate-broadcasting)[illuminate/log

The Illuminate Log package.

6425.0M597](/packages/illuminate-log)

PHPackages © 2026

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