> For the complete documentation index, see [llms.txt](https://docs.tip4serv.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tip4serv.com/product-setup/subscriptions/events-and-commands.md).

# Events & commands

### **Enabling These Events**

Before showing you how to configure them, we will explain how you can enable these events for your server commands.

* **After Payment:** This event is enabled by default and cannot be disabled. When you add new commands, they will always correspond to this event by default.
* **After Renewal:** You must enable subscriptions to use this event. To enable subscriptions, look for the **“Subscription & Expiration”** tab and enable this mode.
* **After Expiration:** You must also enable subscriptions to use this event. To enable subscriptions, look for the **“Subscription & Expiration”** tab and enable this mode.
* **After Refund:** To enable this event, scroll down to the commands section and enable **“Add Refund Commands.”**

<figure><img src="/files/A1DPf9RG0rdHbRPQYJWQ" alt="Enabling subscriptions events"><figcaption><p>Enabling subscription events.</p></figcaption></figure>

<figure><img src="/files/DjliW2y5ZduFGKAtKUPd" alt="Enabling refund event."><figcaption><p>Enabling refund event</p></figcaption></figure>

*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>

<details>

<summary>After Refund (optional)</summary>

The commands you enter in this event will be executed when a refund will occurs.&#x20;

</details>

### Example

In the example below, the player is given the VIP role after payment and then receives 200 points each month. The VIP role is removed when the subscription expires. The VIP role and the 5,000 points are also removed if a refund occurs.

<figure><img src="/files/pq8weP41BuvnKKvtCZGC" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/product-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.
