# 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="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FD4gzZmOgJwlnb1xAC6e9%2Fimage.png?alt=media&#x26;token=d1fc8792-5740-4c15-a88b-8d73de9dde16" alt=""><figcaption></figcaption></figure>

***

## 3️⃣ Setup the basic shop

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

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2Fhr5ONcGzrzY2VHTg76Ra%2Fimage.png?alt=media&#x26;token=a56237c9-28b0-42e1-a350-b9daec682c47" 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="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FB6u0PNvgSGrr8lUUe8rG%2Fimage.png?alt=media&#x26;token=e71858a1-1440-4626-a2a7-fa8eca9cda3b" alt=""><figcaption></figcaption></figure>

***

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

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FxtBOYUdox3kNcvY1mi8l%2Fimage.png?alt=media&#x26;token=0c6f6c6d-166e-4354-bbee-59b8360956ab" 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="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F5QYwzRFQ3BjxUOLZIkM3%2Fimage.png?alt=media&#x26;token=74390a31-b4b0-442b-8ea2-ba71c1d5ef85" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FEk1NmTZaLBNzSp77kmSt%2Fimage.png?alt=media&#x26;token=0e30d4e1-2ff5-4029-a149-90573f925111" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FCugFMCoKWV4ib4VrGRM8%2FK%C3%A9perny%C5%91k%C3%A9p%202026-02-06%20094317.png?alt=media&#x26;token=e4e552a7-81c8-467f-9984-dcfa235d7332" 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="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F07elTeaTlxWHp7DEORj3%2FK%C3%A9perny%C5%91k%C3%A9p%202026-02-06%20094138.png?alt=media&#x26;token=df873039-a40e-4398-acf2-16fc70b1569b" 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` ✅
