Tebex
Last updated
Last updated
The VIP store uses Tokens as currency. Players can buy Token packages from your Tebex store and redeem their Transaction IDs in-game. This guide helps you connect your Tebex packages to the script for seamless redemption.
Your Tebex Store should be already linked and working with your server, is on YOU to connect it, read and follow the Tebex guide for this. https://www.youtube.com/watch?v=it-eiJDwV5E
Create a new Package in your Tebex Store, for this example we are creating a package equivalent to 50 tokens.
Setup your package title, description, thumbnail, category, price, etc.
In the bottom actions select Game Server Commands
Select your Game Server from the dropdown menu and in the command line click the Settings Button in the right side to display more options.
Make sure the command is triggered only When the package is purchased.
Require player to be online: Set this option to "Execute command even if the player is offline".
If you don't change this, the command will never be triggered on your server and you will need to trigger it from your Tebex panel manually.
The command to trigger should be tokens (amount to add) {transaction}
tokens: This is the command the console will execute when the package is purchased, this should match your Config.TebexCommand in config/_config.lua
amount: The amount of tokens to add, that depends on your Tebex package, for this example we are adding 50 tokens.
transaction: This is the Tebex Transaction ID, make sure is written as {transaction}, Tebex will replace it with the actual Transaction ID.
Once everything is setup you can save and publish your package.
Once your players make a purchase of tokens from your Tebex Store, they will see this page where an unique Tebex Transaction ID is generated (they also receive it in their email):
This Transaction ID and the amount of tokens will be saved into the vip_codes table in your Database:
You will also receive a Discord notification for the transaction:
The player can now redeem the code from the VIP panel:
You will receive a new Discord notification with the info of who redeemed the code, how many tokens where added and his current tokens balance.
Tebex can take up to 5 mins to process the purchase and trigger the server command, please be patience. Your server needs to be online and running, otherwise you will need to manually resend the game commands from your Tebex panel.