PHPackages                             swiftmade/lhv-connect - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. swiftmade/lhv-connect

ActiveLibrary[HTTP &amp; Networking](/categories/http)

swiftmade/lhv-connect
=====================

LHV bank's CONNECT service for Laravel

0.2.0(4mo ago)02312MITPHPPHP ^8.1CI passing

Since Jan 24Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/swiftmade/lhv-connect)[ Packagist](https://packagist.org/packages/swiftmade/lhv-connect)[ Docs](https://github.com/swiftmade/lhv-connect)[ RSS](/packages/swiftmade-lhv-connect/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (16)Versions (4)Used By (0)

LHV Connect for Laravel
=======================

[](#lhv-connect-for-laravel)

 [![Latest Stable Version](https://camo.githubusercontent.com/86c9101b8f4400ab1378dd646c8f5a1f9d47d15517e3120fa55dc5aefddcef51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776966746d6164652f6c68762d636f6e6e6563742e737667)](https://camo.githubusercontent.com/86c9101b8f4400ab1378dd646c8f5a1f9d47d15517e3120fa55dc5aefddcef51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776966746d6164652f6c68762d636f6e6e6563742e737667) [![License](https://camo.githubusercontent.com/2e6fde8c8ecf1ee5796e7dd6705fe0e18b15f8b495d12f2114866feeffebcb79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73776966746d6164652f6c68762d636f6e6e6563742e737667)](https://camo.githubusercontent.com/2e6fde8c8ecf1ee5796e7dd6705fe0e18b15f8b495d12f2114866feeffebcb79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73776966746d6164652f6c68762d636f6e6e6563742e737667) [![PHP Version](https://camo.githubusercontent.com/474783ba3edcfab5298502d7125e967017f71d892791e5b3406809735c227088/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73776966746d6164652f6c68762d636f6e6e6563742e737667)](https://camo.githubusercontent.com/474783ba3edcfab5298502d7125e967017f71d892791e5b3406809735c227088/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73776966746d6164652f6c68762d636f6e6e6563742e737667)

⚠️ **Warning**: This package is under active development and may receive breaking changes between minor versions until it reaches v1.0. Please pin your dependency to a specific version.

> **Legal Disclaimer**: This is a third-party integration package. It is not officially endorsed, sponsored, affiliated with or otherwise authorized by AS LHV Pank. All product and company names are trademarks™ or registered® trademarks of their respective holders.

A Laravel integration package for LHV Connect API, providing secure banking operations for Estonian businesses. This package handles the complexities of LHV's API communication, certificate management, and response handling.

Features
--------

[](#features)

- Account balance inquiries
- Account statements
- Secure certificate-based authentication
- Automatic message handling and cleanup
- Comprehensive error handling
- Sandbox environment support

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 8.x, 9.x, 10.x, 11.x
- Valid LHV Connect API credentials and certificates

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

[](#installation)

```
composer require swiftmade/lhv-connect
```

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

[](#configuration)

1. Publish the configuration file:

```
php artisan vendor:publish --provider="Swiftmade\LhvConnect\LhvConnectServiceProvider"
```

2. Configure your credentials in `config/lhv-connect.php`:
    - Set paths to your .p12 certificate files
    - Configure certificate passwords
    - Add your IBAN and account details
    - Set up both sandbox and production environments as needed

Example configuration:

```
'sandbox' => [
    'url' => 'https://connect.prelive.lhv.eu',
    'cert' => [
        'path' => '/path/to/cert.p12',
        'password' => 'your-cert-password',
    ],
    'verify' => 'path_to_lhv_rootca.cer',
    'IBAN' => 'EE123456789',
    'name' => 'Company Name',
    'bic' => 'LHVBEE22',
],
```

Usage
-----

[](#usage)

### Initialize the Client

[](#initialize-the-client)

```
use Swiftmade\LhvConnect\LhvConnect;

// Connect to sandbox or production
$lhv = LhvConnect::make('sandbox');
```

### Test Connection

[](#test-connection)

```
$lhv->sendHeartbeat();
```

### Get Account Balance

[](#get-account-balance)

```
// Get balance for default IBAN
$balance = $lhv->getAccountBalance();

// Or specify an IBAN
$balance = $lhv->getAccountBalance('EE123456789');
```

### Get Account Statement

[](#get-account-statement)

```
$statement = $lhv->getAccountStatement(
    fromDate: new DateTime('2024-01-01'),
    toDate: new DateTime('2024-03-01')
);

// Or include a specific IBAN
$statement = $lhv->getAccountStatement(
    fromDate: new DateTime('2024-01-01'),
    toDate: new DateTime('2024-03-01'),
    accountIban: 'EE123456789'
);
```

Error Handling
--------------

[](#error-handling)

The package implements comprehensive error handling for:

- Invalid configuration
- API errors (LhvApiError)
- Connection issues
- Request timeouts

Technical Details
-----------------

[](#technical-details)

- Uses certificate-based authentication
- Implements request locking mechanism
- Default request timeout: 2 seconds
- Automatic retry mechanism with exponential backoff
- Automatic cleanup of processed messages

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

[](#contributing)

Contributions are welcome. Please ensure your changes adhere to the following:

- Follow PSR-12 coding standards
- Add/update tests as needed
- Document new features

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Resources
---------

[](#resources)

- [LHV Connect API Documentation](https://www.lhv.ee/en/connect)
- [Changelog](CHANGELOG.md)
- [Issue Tracker](https://github.com/swiftmade/lhv-connect/issues)

---

Developed and maintained by Swiftmade OÜ

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance74

Regular maintenance activity

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.2% 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 ~424 days

Total

2

Last Release

146d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/735011?v=4)[Ahmet Özışık](/maintainers/aozisik)[@aozisik](https://github.com/aozisik)

---

Top Contributors

[![mihkelallorg](https://avatars.githubusercontent.com/u/8766719?v=4)](https://github.com/mihkelallorg "mihkelallorg (34 commits)")[![aozisik](https://avatars.githubusercontent.com/u/735011?v=4)](https://github.com/aozisik "aozisik (13 commits)")[![orukaz](https://avatars.githubusercontent.com/u/33488045?v=4)](https://github.com/orukaz "orukaz (5 commits)")[![ArturKp](https://avatars.githubusercontent.com/u/3534968?v=4)](https://github.com/ArturKp "ArturKp (1 commits)")

---

Tags

Bankconnectlhvlhv-connectlhv-bank

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/swiftmade-lhv-connect/health.svg)

```
[![Health](https://phpackages.com/badges/swiftmade-lhv-connect/health.svg)](https://phpackages.com/packages/swiftmade-lhv-connect)
```

###  Alternatives

[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M146](/packages/roots-acorn)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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