> For the complete documentation index, see [llms.txt](https://gennarioplugins.gitbook.io/shopsystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gennarioplugins.gitbook.io/shopsystem/setup/subscribtion-system.md).

# Subscribtion system

With a subscription system, you can allow your players to subscribe to a rank/item in your store. You can specify discounts/actions dependent on the streak.

## Syntax

\*product configuration | product settings section\*

```yaml
      subscription-settings:
        enabled: BOOLEAN
        renewal-time: VALUE
        start-actions:
          - ...
        end-actions:
          - ...
        streak-actions:
          'AMOUNT':
            - ...
        streak-discounts:
          'AMOUNT-AMOUNT': VALUE
```

## Renewal time

This time stamp indicates the interval at which the subscription will be paid/renewed. Format: value+value+value...

Values:

* d = day
* h = hour
* m = minute
* s = second

example:

```yaml
renewal-time: 5d+50m+6s  #5 days, 50 minutes and 6 seconds
```

## Start/End actions

List of actions from [here ](/shopsystem/setup/actions.md)that are activate after the subscription purchase/end\
example:

```yaml
start-actions:
  - '[MESSAGE]hello'
################
end-actions:
  - '[MESSAGE]bye'
```

## Streak actions

List of actions from [here ](/shopsystem/setup/actions.md)which are activated during the subscription payment process depending on the user's current payment streak.\
\
systax

```yaml
streak-actions:
  'streak':
    - actions...
```

example:

```yaml
streak-actions:
  '3': #This actions will run, when user pay for third streak
    - '[MESSAGE]streak 3'
```

## Sreak discounts

Percentage discounts on the next subscription payment depending on the user's current payment streak...

systax

```yaml
streak-discounts:
  'min-max':
    - actions...
```

example:

```yaml
streak-discounts:
  '0-10': 10 # When user have streak 0 - 10 he will get 10% off
  '11-20': 20 # When user have streak 11 - 20 he will get 20% off
```
