PHPackages                             ljsystem/bankid - 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. ljsystem/bankid

ActiveLibrary

ljsystem/bankid
===============

Library for the Swedish BankID API

1.0(2y ago)2139.8k—2.9%16[1 issues](https://github.com/ljsystem/bankid/issues)[3 PRs](https://github.com/ljsystem/bankid/pulls)MITPHPPHP ^7.1 || ^8.0

Since Nov 15Pushed 1y ago11 watchersCompare

[ Source](https://github.com/ljsystem/bankid)[ Packagist](https://packagist.org/packages/ljsystem/bankid)[ RSS](/packages/ljsystem-bankid/feed)WikiDiscussions v1.0 Synced 1mo ago

READMEChangelogDependencies (1)Versions (13)Used By (0)

PHP package to integrate with Swedish BankID
============================================

[](#php-package-to-integrate-with-swedish-bankid)

Install
-------

[](#install)

```
composer require ljsystem/bankid

```

Version 1.0
-----------

[](#version-10)

Since version 6.0 of the [BankID API](https://www.bankid.com/utvecklare/guider/teknisk-integrationsguide/webbservice-api) introduced breaking changes so does the coresponding new version of this package, hence the version bump to version 1.0.

The major change is of course the removal of the inparameter for personal number to the methods `auth()` and `sign()`. These now requires that the authentication and signing process is initiated using animated QR codes. Read more on how to do this in the [BankID API documentation](https://www.bankid.com/utvecklare/guider/teknisk-integrationsguide/qrkoder).

Version 1.0 of this package also introduces the new methods with support for identification in phone calls, `phoneAuth()` and `phoneSign()`. **NOTE: These are as of now untested.**

Certificates
------------

[](#certificates)

### Test environment

[](#test-environment)

Certificates for the BankID test-environment is provided in the package and will be used by default if no arguments are provided:

```
$bankId = new BankID();
```

### Production environment

[](#production-environment)

The CA certificate for the production environment can be found in the [BankID documentation](https://www.bankid.com/utvecklare/guider/teknisk-integrationsguide/miljoer) under "Issuer of server certificate".

Certificate and key for the production environment usually comes in two files, `.cer` and `.key`. The key is protected with a passphrase. *Contact your company's bank to order these certificates.*

The certificates can also be bundled together in one file, usually ending in `.p12` or `.pfx`.

#### Two certificates usage

[](#two-certificates-usage)

Here is an example of using `.cer` and `.key`, in this example named `prod.cer` and `prod.key`:

```
$bankId = new BankID('prod', '/path/to/prod.cer', '/path/to/prod_cacert.cer', '/path/to/prod.key', 'key-passphrase');
```

#### Single file usage

[](#single-file-usage)

To use a single file, convert the `p12/pfx`-file to a PEM-encoded file:

```
openssl pkcs12 -in prod.p12 -out prod.pem
```

And here is how to use it together with a passphrase:

```
$bankId = new BankID('prod', '/path/to/prod.pem', '/path/to/prod_cacert.cer', null, 'key-passphrase');
```

Security
--------

[](#security)

If you discover any security related issues, please contact [samfundssystem@vitecsoftware.com](mailto:samfundssystem@vitecsoftware.com?subject=Report:%20Security%20issue%20in%20ljsystem/bankid) instead of using the issue tracker.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 81.4% 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 ~207 days

Recently: every ~268 days

Total

12

Last Release

459d ago

Major Versions

0.4.5 → 1.02023-07-18

PHP version history (3 changes)0.1.0PHP ^7.1

0.4.3PHP ^7.1 || ^8.1

0.4.5PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/96cc72a8bd3c95b75ca8bd67529ea79742035c4b0c3bbe0dc69d26ccb85b5eb7?d=identicon)[perifer](/maintainers/perifer)

![](https://www.gravatar.com/avatar/985094176641f68541fc64aef58c5177bd13d02b9f6382a1a15ddc6ee110700e?d=identicon)[ljniklas](/maintainers/ljniklas)

---

Top Contributors

[![perifer](https://avatars.githubusercontent.com/u/34488?v=4)](https://github.com/perifer "perifer (35 commits)")[![anfly0](https://avatars.githubusercontent.com/u/16564646?v=4)](https://github.com/anfly0 "anfly0 (3 commits)")[![johanfalk](https://avatars.githubusercontent.com/u/5262618?v=4)](https://github.com/johanfalk "johanfalk (1 commits)")[![mussealani](https://avatars.githubusercontent.com/u/11671000?v=4)](https://github.com/mussealani "mussealani (1 commits)")[![petertornstrand](https://avatars.githubusercontent.com/u/142488?v=4)](https://github.com/petertornstrand "petertornstrand (1 commits)")[![ljniklas](https://avatars.githubusercontent.com/u/22393893?v=4)](https://github.com/ljniklas "ljniklas (1 commits)")[![emilsundberg](https://avatars.githubusercontent.com/u/215958?v=4)](https://github.com/emilsundberg "emilsundberg (1 commits)")

---

Tags

bankidcomposerlaravelphp

### Embed Badge

![Health badge](/badges/ljsystem-bankid/health.svg)

```
[![Health](https://phpackages.com/badges/ljsystem-bankid/health.svg)](https://phpackages.com/packages/ljsystem-bankid)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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