PHPackages                             smlnordic/kupongsupport-api - 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. smlnordic/kupongsupport-api

ActiveLibrary[API Development](/categories/api)

smlnordic/kupongsupport-api
===========================

Integration with Kupongsupport API

2.1.3(2y ago)039[4 PRs](https://github.com/SMLNordic/laravel-kupongsupport-api/pulls)MITPHPPHP ^8.0

Since Mar 17Pushed 1y ago2 watchersCompare

[ Source](https://github.com/SMLNordic/laravel-kupongsupport-api)[ Packagist](https://packagist.org/packages/smlnordic/kupongsupport-api)[ Docs](https://github.com/smlnordic/laravel-kupongsupport-api)[ RSS](/packages/smlnordic-kupongsupport-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (6)Dependencies (14)Versions (11)Used By (0)

Integration with Kupongsupport API
==================================

[](#integration-with-kupongsupport-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a5a93a21d89b2505dd2e34b735cdd62cc08bdfa6598b685e37ad870e2f6c0f42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d6c6e6f726469632f6b75706f6e67737570706f72742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smlnordic/kupongsupport-api)[![GitHub Tests Action Status](https://camo.githubusercontent.com/44271bccd7642f7f7dc8c7f1b97f8cf0fd72228fa2234d776b70a34815e62c0f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f534d4c4e6f726469632f6c61726176656c2d6b75706f6e67737570706f72742d6170692f72756e2d746573742e796d6c3f6272616e63683d6d6173746572)](https://github.com/SMLNordic/laravel-kupongsupport-api/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/182333bdd389c66ae7071eddbc14846f393a996641e7ac7be308d2cbc22d3cb3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f534d4c4e6f726469632f6c61726176656c2d6b75706f6e67737570706f72742d6170692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6c6162656c3d636f64652532307374796c65)](https://github.com/SMLNordic/laravel-kupongsupport-api/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/a244abce4912eea8bce057c0b47a72af5047495f49bad2d94b9da4c0298cc443/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d6c6e6f726469632f6b75706f6e67737570706f72742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smlnordic/kupongsupport-api)[![Website](https://camo.githubusercontent.com/885d416cd2c97e89691607fe40b0c5c34295d7a1c53160afbaa2499026b50d8d/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f75726c3d68747470732533412532462532466b75706f6e67737570706f72742e7365253246617069266c6162656c3d4b53415049253230537461747573)](https://camo.githubusercontent.com/885d416cd2c97e89691607fe40b0c5c34295d7a1c53160afbaa2499026b50d8d/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f75726c3d68747470732533412532462532466b75706f6e67737570706f72742e7365253246617069266c6162656c3d4b53415049253230537461747573)

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

[](#installation)

You can install the package via composer:

```
composer require smlnordic/kupongsupport-api
```

Init .env variables:

```
php artisan ks-api-init
```

You can publish the config file with:

```
php artisan vendor:publish --provider="SMLNordic\KSApi\KSApiServiceProvider" --tag="kupongsupport-api-config"
```

This is the contents of the published config file:

```
return [
    'token' => env('KS_API_TOKEN'),
    'base_url' => env('KS_BASE_URL', 'https://kupongsupport.se'),

    'templates' => [
        'print' => env('KS_PRINT_TEMPLATE_ID'),
        'mobile' => env('KS_MOBILE_TEMPLATE_ID'),
    ],
];
```

Usage
-----

[](#usage)

Create and send a coupon via SMS:

```
$options = [
    'template' => XXXX, // Template ID in Kupongsupport
    'type' => 'mobile', // "print" or "mobile
    'delivery_type' => 'sms', // "sms", "email" or "api"
    'amount' => 10,
    'valid_days' => 90,
];
$kupongsupport = new SMLNordic\KSApi();
$coupon = $kupongsupport->createCoupon($options);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [SocialMediaLab](https://github.com/SMLNordic)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 89.1% 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 ~187 days

Recently: every ~0 days

Total

6

Last Release

941d ago

Major Versions

1.0.0 → 2.0.02023-10-10

PHP version history (2 changes)1.0.0PHP ^7.4

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/309de600b02814eaff158276890f8f25b7f9f3bd3f56f901144fc4a3e4d04367?d=identicon)[codeorama](/maintainers/codeorama)

---

Top Contributors

[![npalmqvist](https://avatars.githubusercontent.com/u/468741?v=4)](https://github.com/npalmqvist "npalmqvist (49 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

smlnordickupongsupport-api

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/smlnordic-kupongsupport-api/health.svg)

```
[![Health](https://phpackages.com/badges/smlnordic-kupongsupport-api/health.svg)](https://phpackages.com/packages/smlnordic-kupongsupport-api)
```

###  Alternatives

[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)

PHPackages © 2026

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