> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/vip-shop/tebex-integration/store-setup.md).

# Store Setup

## Create a Universal webstore

In [creator.tebex.io](https://creator.tebex.io) create a new webstore and choose **Universal / Other** as the platform.

{% hint style="danger" %}
Do not use a FiveM or RedM (CFX) store type for in game sales. CFX stores force every buyer through a Cfx.re forum sign in before a basket can even be created (the API returns `422: User must login before adding packages to basket`, and the `username` shortcut is rejected with `400` on this game type). A Universal store has no login wall, which is what makes seamless in game checkout possible.
{% endhint %}

If you already sell scripts on a CFX type store, keep it. Just create a second, Universal store for in game player purchases. The shop ignores any store categories it does not recognize, so nothing leaks between the two.

## Connect the pieces

1. **Public token.** In the creator panel open **Integrations > API Keys** and copy the public token, then set it in `server.cfg`:

   ```cfg
   set vipshop_tebex_token "abcd-1234..."
   ```
2. **Game server.** Under **Integrations > Game Servers**, add a server and copy the secret:

   ```cfg
   sv_tebexSecret "your-secret"
   ```

   This is what allows Tebex to execute delivery commands (`vipshop_givecoins`, `vipshop_setmembership`) on your server after a payment.
3. **Categories.** Create these exact category names so packages land on the right shop pages:

   | Tebex category name                                  | Shop page                 |
   | ---------------------------------------------------- | ------------------------- |
   | `Coins` or `Coin Packs`                              | Coin Packs                |
   | `Passes`                                             | Outlaw Passes             |
   | `Weapons`, `Cash`, `Horses`, `Packages`, `Hot Deals` | Matching pages (optional) |

   Category names are matched case insensitively. Unrecognized categories are ignored, so your script or theme packages will never appear in game. The mapping lives in the UI source at `src/config.ts` (`TEBEX_CATEGORY_MAP`) if you need custom names.

## Package hygiene

* Upload permanent images to each package; they are displayed on the shop cards. Avoid hotlinking temporary URLs.
* Package descriptions may be long. The shop clamps them gracefully in the purchase dialog.
* A Tebex discount on a package automatically shows a SALE stamp and the struck through original price in game.
* Enable "Require player to be online" on every package that runs `{sid}` commands.

## Next steps

* [Coin Packages](/script-documentation/vip-shop/tebex-integration/coin-packages.md)
* [Memberships (Subscriptions)](/script-documentation/vip-shop/tebex-integration/memberships.md)
