PHPackages                             remp/crm-coupon-module - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. remp/crm-coupon-module

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

remp/crm-coupon-module
======================

CRM Coupon Module

4.4.0(12mo ago)014.6k↓50%MITPHPPHP ^8.1

Since Oct 22Pushed 5mo ago5 watchersCompare

[ Source](https://github.com/remp2020/crm-coupon-module)[ Packagist](https://packagist.org/packages/remp/crm-coupon-module)[ Docs](https://remp2030.com)[ RSS](/packages/remp-crm-coupon-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (84)Used By (0)

CRM Coupon Module
=================

[](#crm-coupon-module)

[![Translation status @ Weblate](https://camo.githubusercontent.com/c083c3550ce8e5ec54c15b76bd255c081979316888a7cb07e48926ca0f338e40/68747470733a2f2f686f737465642e7765626c6174652e6f72672f776964676574732f72656d702d63726d2f2d2f636f75706f6e2d6d6f64756c652f7376672d62616467652e737667)](https://hosted.weblate.org/projects/remp-crm/coupon-module/)

API documentation
-----------------

[](#api-documentation)

All examples use `http://crm.press` as a base domain. Please change the host to the one you use before executing the examples.

All examples use `XXX` as a default value for authorization token, please replace it with the real tokens:

- *API tokens.* Standard API keys for server-server communication. It identifies the calling application as a whole. They can be generated in CRM Admin (`/api/api-tokens-admin/`) and each API key has to be whitelisted to access specific API endpoints. By default the API key has access to no endpoint.
- *User tokens.* Generated for each user during the login process, token identify single user when communicating between different parts of the system. The token can be read:
    - From `n_token` cookie if the user was logged in via CRM.
    - From the response of [`/api/v1/users/login` endpoint](https://github.com/remp2020/crm-users-module#post-apiv1userslogin) - you're free to store the response into your own cookie/local storage/session.

API responses can contain following HTTP codes:

ValueDescription200 OKSuccessful response, default value400 Bad RequestInvalid request (missing required parameters)403 ForbiddenThe authorization failed (provided token was not valid)404 Not foundReferenced resource wasn't foundIf possible, the response includes `application/json` encoded payload with message explaining the error further.

#### POST `/api/v1/coupon/activate`

[](#post-apiv1couponactivate)

Activate coupon specified by code for authenticated user.

##### *Headers:*

[](#headers)

NameValueRequiredDescriptionAuthorizationBearer *String*yesUser token.##### *Params:*

[](#params)

NameValueRequiredDescriptioncode*String*yesThe code of coupon to activate.notifyUser*Boolean*noFlag indicating that user should be notified (email, push notification).##### *Example:*

[](#example)

```
curl -X POST \
  http://crm.press/api/v1/coupon/activate \
  -H 'Authorization: Bearer XXX' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "123456-789ABC-DEFG",
    "notifyUser": true
  }'
```

Response:

```
{
    "coupon_id": 1234567,
    "coupon_type": "new-user-promo",
    "subscription_id": 1234345,
    "subscription_type_id": 123,
    "subscription_type_name": "1 month promo subscription",
    "subscription_start_time": "2020-07-02T11:30:00+00:00", // String; RFC3339 encoded start time
    "subscription_end_time": "2020-08-02T11:30:00+00:00" // String; RFC3339 encoded end time
}
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance63

Regular maintenance activity

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50% 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 ~29 days

Recently: every ~22 days

Total

83

Last Release

360d ago

Major Versions

0.37.0 → 1.0.0-beta12022-01-03

0.38.0 → 1.0.0-beta22022-02-03

0.39.0 → 2.0.02022-08-25

2.7.0 → 3.2.02024-01-22

3.7.0 → 4.0.02025-02-20

PHP version history (5 changes)0.1.1PHP ^7.1

0.30.0PHP ^7.3

0.36.0PHP ^7.4

2.0.0PHP ^8.0

3.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c733f9bd683c3814197d8a532b7da1ba1f631bb1efe1cde5f064feab1e24877?d=identicon)[rootpd](/maintainers/rootpd)

![](https://www.gravatar.com/avatar/a05541c0b35f43d95db5342210e1d9e64242888812d13f5b096df48b6aabd863?d=identicon)[msvitok](/maintainers/msvitok)

![](https://www.gravatar.com/avatar/2c30fdbc85cda35b94f7f59399918193a0289152281abcef344ec9ee82864177?d=identicon)[markoph](/maintainers/markoph)

---

Top Contributors

[![markoph](https://avatars.githubusercontent.com/u/6843562?v=4)](https://github.com/markoph "markoph (46 commits)")[![rootpd](https://avatars.githubusercontent.com/u/812909?v=4)](https://github.com/rootpd "rootpd (21 commits)")[![lubos-michalik](https://avatars.githubusercontent.com/u/63700066?v=4)](https://github.com/lubos-michalik "lubos-michalik (9 commits)")[![miroc](https://avatars.githubusercontent.com/u/1230714?v=4)](https://github.com/miroc "miroc (5 commits)")[![zoldia](https://avatars.githubusercontent.com/u/1526070?v=4)](https://github.com/zoldia "zoldia (3 commits)")[![Matefko](https://avatars.githubusercontent.com/u/22897457?v=4)](https://github.com/Matefko "Matefko (3 commits)")[![tomaj](https://avatars.githubusercontent.com/u/446736?v=4)](https://github.com/tomaj "tomaj (3 commits)")[![weblate](https://avatars.githubusercontent.com/u/1607653?v=4)](https://github.com/weblate "weblate (1 commits)")[![burithetech](https://avatars.githubusercontent.com/u/3502143?v=4)](https://github.com/burithetech "burithetech (1 commits)")

### Embed Badge

![Health badge](/badges/remp-crm-coupon-module/health.svg)

```
[![Health](https://phpackages.com/badges/remp-crm-coupon-module/health.svg)](https://phpackages.com/packages/remp-crm-coupon-module)
```

###  Alternatives

[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.4k423.9k30](/packages/mcp-sdk)[hackzilla/password-generator

Password Generator Library

3035.2M15](/packages/hackzilla-password-generator)[alibaba/nacos

阿里巴巴nacos配置中心php客户端

19340.8k1](/packages/alibaba-nacos)[bvdputte/kirby-fingerprint

Cache-busting utility to fingerprint assets (JS/CSS) in Kirby 3

1610.0k](/packages/bvdputte-kirby-fingerprint)

PHPackages © 2026

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