PHPackages                             johanwinther/chalmers-card-balance - 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. johanwinther/chalmers-card-balance

ActiveProject

johanwinther/chalmers-card-balance
==================================

Public REST API for checking account balance of Chalmers Student Union cards

v1.2.0(8y ago)0142[1 issues](https://github.com/JohanWinther/chalmers-card-balance/issues)MITPHPPHP &gt;=5.5.0

Since Nov 26Pushed 7y agoCompare

[ Source](https://github.com/JohanWinther/chalmers-card-balance)[ Packagist](https://packagist.org/packages/johanwinther/chalmers-card-balance)[ RSS](/packages/johanwinther-chalmers-card-balance/feed)WikiDiscussions master Synced yesterday

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

THIS HAS BEEN DEPRECATED SINCE THE SERVICE HAS ENABLED A CAPTCHA
================================================================

[](#this-has-been-deprecated-since-the-service-has-enabled-a-captcha)

chalmers-card-balance
=====================

[](#chalmers-card-balance)

Public REST API for checking account balance of Chalmers Student Union cards

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

[](#installation)

Add `johanwinther/chalmers-card-balance` as a require dependency in your `composer.json` file:

```
composer require johanwinther/chalmers-card-balance

```

Rename .htaccess.tmp to .htaccess and set the RewriteBase to the absolute folder path of card.php.

API
===

[](#api)

**Show Card Balance**
---------------------

[](#show-card-balance)

Returns JSON data of card balance.

- **URL**

    `/`
- **Method:**

    `GET`
- **URL Params**

    **Required:**

    `Card number` - 16-digit Student Union card number
- **Data Params**

    None
- **Success Response:**

    - **Code:** 200
        **Content:**```
        {
            "cardHolder": "Emil Emilsson",
            "cardNumber": "1111222233334444",
            "cardBalance": {
                "value": 200.01,
                "currency": "kr"
            }
        }
        ```
- **Error Response:**

    - **Code:** 400 BAD REQUEST
        **Content:**```
        {
            "error": "Invalid card number: should be 16 digits."
        }
        ```

        **Explanation:** Request was not 16 digits.

    OR

    - **Code:** 404 NOT FOUND
        **Content:**```
        {
            "error": "Invalid card number: card not found."
        }
        ```

        **Explanation:** Card is not registered in the system.

    OR

    - **Code:** 408 REQUEST TIMED OUT
        **Content:**```
        {
            "error": "Connection timed out."
        }
        ```

        **Explanation:** Could not load external service.
- **Sample Call:**

    ```
      $.ajax({
        url: "https://ftek.se/api/v1/1111222233334444",
        dataType: "json",
        type : "GET",
        success : function(r) {
          console.log(r);
        }
      });
    ```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~0 days

Total

3

Last Release

3089d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/781061997ec6aa6a2f88497cd2a5d5dc1e184008a2d28a05e7cfe092cc58eaae?d=identicon)[johanwinther](/maintainers/johanwinther)

---

Top Contributors

[![JohanWinther](https://avatars.githubusercontent.com/u/28558941?v=4)](https://github.com/JohanWinther "JohanWinther (20 commits)")

### Embed Badge

![Health badge](/badges/johanwinther-chalmers-card-balance/health.svg)

```
[![Health](https://phpackages.com/badges/johanwinther-chalmers-card-balance/health.svg)](https://phpackages.com/packages/johanwinther-chalmers-card-balance)
```

###  Alternatives

[laracasts/integrated

Simple, intuitive integration testing with PHPUnit.

479206.9k2](/packages/laracasts-integrated)[jikan-me/jikan

Jikan is an unofficial MyAnimeList API

1.0k28.1k2](/packages/jikan-me-jikan)[raulr/google-play-scraper

A PHP scraper to get app data from Google Play

12892.7k](/packages/raulr-google-play-scraper)[dfridrich/ares

Communication with ARES (Czech business register)

24401.0k2](/packages/dfridrich-ares)[jansenfelipe/cpf-gratis

Com esse pacote você poderá consultar, gratuitamente, CPFs diretamente no site da receita.

1895.9k](/packages/jansenfelipe-cpf-gratis)[bubbstore/correios

Biblioteca que faz cálculo de frete, rastreamento de objetos e consulta de CEP diretamente do Webservice dos Correios.

2589.0k](/packages/bubbstore-correios)

PHPackages © 2026

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