# Events & commands

You can configure commands to be executed on your servers or give and remove roles on Discord according to these events.

<details>

<summary>After payment</summary>

Commands or roles that you enter in this event will be executed **once on the first payment occurs**, when the subscription is created.

<mark style="color:orange;">Commands will be executed on your server only when payment is completed and received in your account.</mark>&#x20;

<mark style="color:orange;">The Tip4serv payment status should be PAID and not PENDING.</mark>

</details>

<details>

<summary>After each renewal payment (optional)</summary>

Commands that you enter in this event will be executed **after each renewal payment**. So every week or every month depending on the cycle you have configured.

Useful if, for example, you want to give 500 of virtual currency each month to your subscribers.

<mark style="color:orange;">This event does not occur on the first payment.</mark>

<mark style="color:orange;">With each renewal payment the expiration date of the subscription is extended.</mark>

</details>

<details>

<summary>After expiration</summary>

The commands you enter in this event will be executed when the subscription expires.&#x20;

If no more payment is received or if the customer has canceled his subscription.

<mark style="color:orange;">The subscription will expire when the expiration date is exceeded.</mark>

</details>

### Example

In the example below, the player is given the VIP role after payment and then given 50 coins each month. Then we remove the VIP role when the subscription expires.

<figure><img src="/files/hKTxnQ68MsK8Rn47VEdB" alt=""><figcaption><p>Example for a Rust server</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tip4serv.com/store-setup/subscriptions/events-and-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
