# Tebex connection

## 📝Note

Before choosing Tebex, please check the [**Information channel**](https://docs.brutalscripts.com/site/~/revisions/mF7v3hjp21KfluJysHJL/scripts/premium-shop/informations) to see which **payment system works best for you**. ✅

{% hint style="info" %}
Here is how to connect your fivem server to your tebex shop
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=WaHdAROdADc>" %}

## 1️⃣ Create a Tebex Account

If you don’t have one yet, sign up [click here](https://accounts.tebex.io/register).

***

## 2️⃣ Create a new Project

📝 **Create a project for this shop:** [click here](https://creator.tebex.io/projects)

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

***

## 3️⃣ Setup the basic shop

⚙️ **Complete the essential steps required by Tebex.** ✅

<figure><img src="/files/0Yj1NzHHYDizadEa6Fdx" alt=""><figcaption></figcaption></figure>

***

## 4️⃣ Create Products

💰 **Product price example:**

If you set the product price to **€10**, the number of points the player receives **depends on the Coin Value setting in the script**. You can edit it in the admin panel.

We store the **net amount the player actually paid**, and when they redeem the code, the net amount will be multiplied by the Coin Value. (e.g., €10 × 100 = 1000 Coins)

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

***

📦 **Navigate to the Packages page and click the “Add New Package” button.** ✅

<figure><img src="/files/6qKcLs8QiIfqvI8QrdId" alt=""><figcaption></figcaption></figure>

Create a product with details like this:\
\
Name: 1000 Points\
Description: 🎉 **1 000 Premium Points** – Spend them in the Premium Shop on **anything you want**!🛒\
Price: 10

📝 **After filling in the product details, scroll to the bottom and select the “Game Server Commands” section.**

<figure><img src="/files/6rGzfrTAi5agGbFnsGgS" alt=""><figcaption></figcaption></figure>

👆 **After selecting the game server, click on “Add Command”.** ✅

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

⚙️ **You need to create 3 commands, just like I did here:** ✅

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

```json
tebex_purchase {transaction} {packagePrice} {email}
```

```json
tebex_refund {transaction}
```

```json
tebex_refund {transaction}
```

⚙️**For each command you have to click on the settings icon and set it to run even if the player is not online**&#x20;

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

## 5️⃣ Send Code via Email

📧 **The player will receive an email from Tebex containing the Tebex ID**, which they can redeem in-game.

**Example Tebex ID:** `tbx-65026225a49666-4772b6` ✅


---

# 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.brutalscripts.com/site/scripts/premium-shop/tebex-connection.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.
