> 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/getting-started/server-configuration.md).

# Server Configuration

Everything lives in `vip_shop/config.lua`. This page covers the top level switches; deeper topics have their own pages.

## Core switches

| Setting                      | Default     | Description                                                                                                                                                            |
| ---------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework`           | `'auto'`    | `'auto'` detects a running `vorp_core` or `rsg-core`. Pin with `'vorp'` or `'rsg'` if you run both.                                                                    |
| `Config.Locale`              | `'en'`      | Locale file from `locales/` (`'en'`, `'tr'`). See [Localization](/script-documentation/vip-shop/guides/localization.md).                                               |
| `Config.Command`             | `'vipshop'` | Chat command. Toggles open and closed. RedM does not support key mappings, so the shop is command only; other resources can open it through `exports.vip_shop:Open()`. |
| `Config.BalancePerCharacter` | `true`      | When `true`, each character has its own coin balance. When `false`, one balance per account.                                                                           |
| `Config.StartingBalance`     | `0`         | Coins granted to a wallet on first contact.                                                                                                                            |

## Tebex

| Setting                   | Description                                                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `Config.TebexTokenConvar` | Convar name read for the public token (default `vipshop_tebex_token`). Recommended, since it keeps the token in `server.cfg`. |
| `Config.TebexToken`       | Inline fallback if you prefer not to use a convar.                                                                            |

The token is the **public API token** from **Integrations > API Keys** in the Tebex creator panel. It is designed to be shipped to clients and only permits reading the store and creating baskets. Your secret keys never belong in this resource.

## Logging

| Setting                 | Description                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------- |
| `Config.DiscordWebhook` | Webhook URL for purchase, coin, membership and commission logs. An empty string disables logging. |
| `Config.LogColor`       | Embed accent color (decimal).                                                                     |

Every log embed includes the player name, owner key, product, amount and remaining balance. Commission logs additionally include the ready to paste close command.

## Permissions

| Setting           | Description                                                                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.AdminAce` | Ace required for admin commands (default `vipshop.admin`). Grant with `add_ace group.admin vipshop.admin allow`. The console always passes. |

## Balance ownership explained

The wallet key (the "owner") is derived per framework:

| `BalancePerCharacter` | VORP                | RSG         |
| --------------------- | ------------------- | ----------- |
| `true`                | `identifier#charId` | `citizenid` |
| `false`               | `identifier`        | `license`   |

{% hint style="warning" %}
Online players resolve to these keys, so Tebex delivery commands should run while the player is online. Enable "Require player to be online" on every Tebex package. Offline delivery by raw identifier is supported but will not match per character keys.
{% endhint %}
