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
Copy the script files to your server's
resourcesfolderMake 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
Log in to Tebex Creator Panel
Go to Developers > API Keys section
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
privateKeyandpublicTokenpublicly!
General Settings
Edit the shared/conf.lua file:
Language Settings
The script supports the following languages:
en- Englishtr- 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.logfile
β 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:
Server.log output
Step-by-step description of how the error occurs
Expected behavior vs actual behavior
Server version and other scripts used
π License and Copyright
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