Browse docs

Tebex Implementation

This guide explains how to connect your Battle Pass V3 with Tebex to handle premium purchases via Tebex.

Add Tebex Secret Key to Your server.cfg

  1. Log in to your Tebex control panel.
  2. On the left-hand navigation menu, click Integrations and Game Servers.
  3. Click Instructions next to the Game Server you want to use.
  4. Copy the command provided and paste it into your server.cfg. It should look something like this:
server.cfg
sv_tebexSecret <YourSecretKey>

Make sure to replace <YourSecretKey> with the actual secret key provided by Tebex.

Restart the FiveM server, then return to Tebex and verify the game-server connection. See Tebex's FiveM setup guide.

Create a Tebex Package

  1. In your Tebex control panel, navigate to Packages.
  2. Create a new package, for example, "Premium Battle Pass".
  3. At the bottom of the package creation screen, select Game Server Commands as the deliverable type.

  1. Select your game server and click Add Command.
  2. Use the following command to deliver premium:
    bpsaveredeemcode {transaction}
    
  3. Open the command settings.
  4. Select the intended game server and allow the command to run while the player is offline. This command records the payment for the player to claim later.

  1. Save your package.

Test the Integration

  1. In the Tebex control panel, click Payments on the left-hand menu.
  2. Click on Create Payment.
  3. Enter your username under Customer and select the package you created earlier.
  4. After creating the payment, you should be able to claim premium in-game by using your payment ID.

Possible Problems

If players are unable to claim premium after a Tebex purchase, try the following solutions:

Wait for Processing

Problem: Sometimes there's a short delay before premium becomes available after a successful purchase.

Fix: Inform players that it can take up to 5 minutes for premium to be claimable in-game after completing the purchase.

Check Tebex Secret Key Usage

Problem: Payment commands may run on the wrong server if multiple servers use the same sv_tebexSecret.

Fix:

  • Open the server.cfg file on all running servers.
  • Check that the package targets the intended game server in Tebex.
  • Make sure only that server uses its sv_tebexSecret; remove the same key from development or test servers.
  • Restart any server whose configuration you changed.