Qadr Ingame Tebex Shop

πŸ“‹ Table of Contents


🎯 Overview

QADR Tebex Shop is a professional Tebex payment system integration developed for RedM servers. This script allows your players to securely shop from the in-game store and automatically receive their rewards.

✨ Features

  • βœ… Secure Payment System: Safe payment processing with Tebex infrastructure

  • βœ… Automatic Product Delivery: Products are automatically delivered to players upon payment completion

  • βœ… Multi-Package Support: Multiple packages can be purchased in a single transaction

  • βœ… Browser Integration: Seamless payment experience through Steam overlay

  • βœ… Real-time Status Tracking: Track payment status in real-time

  • βœ… Multi-Language Support: English and Turkish language support

  • βœ… Database Management: All transactions are stored in the database

  • βœ… Cancel and Rollback: Players can cancel the transaction at any time

πŸ”§ Technical Requirements

  • RedM Server (prerelease build)

  • MySQL Database (mysql-async or oxmysql)

  • RedEM Roleplay Framework

  • Tebex Account (with Creator API access)


πŸ“¦ Installation

Step 1: Script Download and Placement

  1. Copy the script files to your server's resources folder

  2. Make sure the folder name is qadr_tebex_shop

Step 2: Database Setup

The script will automatically create the required table on first startup. However, if you want to create it manually:

Step 3: server.cfg Configuration

Add the following line to your server.cfg file:

Important: Make sure the script starts after redem_roleplay and database resource:

Step 4: Database Connection

If you're using oxmysql, edit the fxmanifest.lua file:


βš™οΈ Configuration

Tebex API Settings

Edit the server/server_conf.lua file:

Getting Tebex API Keys

  1. Go to Developers > API Keys section

  2. Copy the following information:

    • Project ID: Your project number

    • Private API Key: Your private API key

    • Public Token: Your public token

⚠️ Security Warning: Never share your privateKey and publicToken publicly!

General Settings

Edit the shared/conf.lua file:

Language Settings

The script supports the following languages:

  • en - English

  • tr - Turkish

You can create a new file in the lang/ folder to add a new language.


πŸš€ Usage

Basic Usage

To allow players to shop from the store, you need to initiate a checkout process. This is usually triggered by a command, menu, or NPC interaction.

Starting Checkout

Flow Diagram


πŸ“š API Reference

Client-Side Events

qadr_tebex_shop:changestatus

Updates payment status and changes UI.

Parameters:

qadr_tebex_shop:paymentSuccess

Triggered when payment is successful.

Parameters:

NUI Callbacks

closePanel

Closes the payment panel and cancels the transaction.


πŸ’‘ Examples

Example 1: Simple Single Package Sale

Example 2: Multi-Package Sale

Example 3: Money Only

Example 4: Item with Metadata

Example 5: Menu Integration

Example 6: Listening to Payment Success Event


πŸ”§ Troubleshooting

Common Errors

1. "Code Used" Error

Cause: Transaction ID has been used before.

Solution:

  • A new transaction ID is generated for each payment

  • Check database: SELECT * FROM qadr_tebex_shop_orders WHERE ordernumber = 'TXN_ID'

2. "Code Wrong" Error

Cause: Transaction ID is invalid or payment is not completed.

Solution:

  • Verify payment is completed from Tebex panel

  • Make sure the transaction ID is correct

3. Item Not Given

Cause: Item name or metadata is incorrect.

Solution:

4. Database Error

Cause: Table not created or connection issue.

Solution:

  • Make sure MySQL service is running

  • Run table creation SQL manually

  • Check server.log file


❓ FAQ (Frequently Asked Questions)

Technical Questions

Q: Is it compatible with other inventory systems? A: No, it currently only works with RedEM Roleplay inventory system.

Q: Can a player start multiple checkouts? A: No, a player can only have one checkout process at a time.

Q: Can I change the payment timeout duration? A: Yes, change the qadr_tebex_shop_payment_timeout value in shared/conf.lua file.

Security Questions

Q: Are my API keys safe? A: Yes, API keys are only used server-side and are never sent to the client.

Q: Can fake payments be made? A: No, all payments are verified through Tebex API and recorded in the database.

Q: Can transaction IDs be reused? A: No, each transaction ID can only be used once. The system performs duplicate checks.

Customization Questions

Q: Can I add a new language? A: Yes, you can create a new language file in the lang/ folder:

Then in shared/conf.lua file:


πŸ“ž Support and Contact

Bug Report

If you find a bug, please report it with the following information:

  1. Server.log output

  2. Step-by-step description of how the error occurs

  3. Expected behavior vs actual behavior

  4. Server version and other scripts used


This script uses the Tebex Limited API. You must comply with Tebex's terms of service.

Important Notes:

  • You cannot redistribute this script without permission

  • You cannot modify files under escrow protection

  • All payment transactions are managed by Tebex Limited


πŸ”„ Version History

v1.0.0

  • βœ… First stable release

  • βœ… Basic payment system

  • βœ… Multi-package support

  • βœ… TR/EN language support


Last Update: November 4, 2025 Document Version: 1.0.0

Last updated