> 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/coin-packages.md).

# Coin Packages

Coins are the shop's premium currency. Players buy coins with real money on Tebex, then spend coins on the in game catalog (weapons, horses, packages and so on).

## Create the packages

In your Universal store, under the `Coins` category, create one time packages at whatever prices fit your community. A typical ladder looks like this; the amounts and prices are entirely up to you:

| Package name   | Purchase command (Tebex)                                      |
| -------------- | ------------------------------------------------------------- |
| `500 Coins`    | `vipshop_givecoins {sid} 500`                                 |
| `2,500 Coins`  | `vipshop_givecoins {sid} 2650` (includes a 150 coin bonus)    |
| `6,500 Coins`  | `vipshop_givecoins {sid} 7150` (includes a 650 coin bonus)    |
| `14,000 Coins` | `vipshop_givecoins {sid} 16000` (includes a 2,000 coin bonus) |

Add the command under the package's "When the purchase is completed" commands and tick "Require player to be online".

{% hint style="info" %}
`{sid}` is the player's server id, provided by Tebex's game server integration. The command credits the wallet, notifies the player, updates an open shop UI live, and logs to Discord.
{% endhint %}

## Naming matters, a little

The Coin Packs page parses the number in the package name to render the large coin amount (`2,500 Coins` renders as 2,500). Include a line such as `+650 Bonus Coins` in the package features if you want the golden bonus row to appear.

## What players see

The Gold Exchange page builds itself from your live packages:

* Tiers are sorted by price and named Pouch, Chest, Crate and Hoard.
* The best value pack (or the most expensive one, if none is stamped) is elevated with a permanent frame and a BEST VALUE stamp.
* A per tier "more coin per euro/dollar" line is computed automatically against your smallest pack.
* Prices are formatted in your store's real currency.

## Manual grants

Admins, or the console, can credit any wallet at any time:

```
vipshop_givecoins <serverId|identifier> <amount>
```

Other resources can do the same through the export: `exports.vip_shop:AddCoins(source, amount)`.
