> For the complete documentation index, see [llms.txt](https://bl4ck.gitbook.io/_bl4ck-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bl4ck.gitbook.io/_bl4ck-docs/scripts/lb_vips/tebex-integration.md).

# Tebex Integration

Tebex configuration and usage

## SETTING UP

1. You need to setup your Tebex Webstore and connect it to your FiveM server adding this convar in the `server.cfg` file:

```lua
sv_tebexSecret Your_Tebex_Secret_Key
```

2. Create a new Package on your Webstore:

<figure><img src="https://3379782054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsJglEvosE1OrY7SPFLqs%2Fuploads%2FbrZCPwoxf8Ob2sBuMU5q%2Fchrome_W950bhNhjD.gif?alt=media&amp;token=3bb5e4c4-69bb-4e93-a1a8-2efd3231556a" alt=""><figcaption></figcaption></figure>

2. Inside Package creation you will see a section called **GAME SERVER COMMANDS**.

<figure><img src="https://3379782054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsJglEvosE1OrY7SPFLqs%2Fuploads%2FeUl9EE8Xp8E3JvqpHdRb%2Fchrome_mv9yMMOaWe.gif?alt=media&amp;token=e3a22097-4e93-4203-80bb-1d50c7acd8e1" alt=""><figcaption></figcaption></figure>

3. Set Commands section like this:

<figure><img src="https://3379782054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsJglEvosE1OrY7SPFLqs%2Fuploads%2F4zqWvq4fTri88MOZ6Uix%2Fchrome_trGQziAptd.gif?alt=media&amp;token=2cec9a02-dfb5-4bf3-b812-009eb8f588f6" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" %}

```lua
tebex {transaction} {id} level duration

-- This code is important, is the command that Tebex will trigger on your server after a player makes a purchase.
-- You can change the first and second number only.
-- NOT VIP players are Level 0 by default, don't create any package giving Level 0.

-- First number: level
-- Second number: months
```

{% endcode %}

## ADDITIONAL INFORMATION

* When a player buys a package, Tebex could take up to 10 minutes to trigger the command on your server, be patient.
* Once the command has been triggered by Tebex, the player will automatically receive the VIP subscription.
* If the player is disconnected from the server at the time of purchase, the data will be stored in the database. Once the player connects to the server, the corresponding subscription will be automatically applied.
* If the server was offline at the time of purchase, you can give the player their subscription using the command set in [Config.givevip](https://bl4ck.gitbook.io/_bl4ck-docs/scripts/lb_vips/pages/hu4eQjq57HaljT04xCxW#config.givevip).
