The ForgeStore Plugin API lets your game server plugin automatically deliver purchases to players.
When a player buys a package, ForgeStore stores the server command in a queue.
Your plugin polls the queue, executes the commands, and marks them as done.
How it works
1
Player buys a package
The player selects a package on the store, pays via ForgeStore Pay, and the payment is confirmed.
3
Command added to queue
ForgeStore receives the webhook from ForgeStore Pay, confirms the payment, and adds the server command to the queue with the player's username.
3
Plugin polls the queue
Every 30 seconds, your plugin calls GET /api/plugin/queue to check if any commands are pending.
4
Execute the commands
For each pending command, the plugin executes it on the server (e.g. lp user {player} parent set vip).
7
Mark as done
After execution, the plugin calls DELETE /api/plugin/queue with the command IDs. They are removed from the queue.
🔑 Authentication
Every request must include your server secret key as a header: X-ForgeStore-Secret: YOUR_SERVER_SECRET_KEY
Your secret key is found in: Dashboard → Store Settings → Developers → Server Secret Key
All requests must use HTTPS. Rate limit: 60 requests / minute.
Command Variables
When you define a server command on a package, you can use these variables. ForgeStore replaces them automatically:
Variable
Description
Example
{player}
The player's username as entered at checkout
Notch
{name}
Alias for {player}
Notch
{id}
Same as {player} (UUID on supported games)
Notch
{uuid}
Same as {player}
Notch
{amount}
The purchase amount (formatted, 2 decimals)
9.99
Example command for Minecraft + LuckPerms: lp user {player} parent set vip
API Endpoints
GET/informationGet Store Information
Returns general information about the store associated with your secret key. Use on plugin startup to verify the connection.
Returns players who have online commands pending, and whether offline commands are waiting. Call this every 30 seconds. If execute_offline is true, call /queue/offline immediately.
Returns commands that do not require the player to be online. Execute these immediately when you receive them. After execution, call DELETE /api/plugin/queue with the command IDs.
GET/queue/online/{playerName}Get Online Commands for a Player
Returns pending commands for a specific player who is currently online. Only call this when the player is confirmed online on your server. After execution, call DELETE /api/plugin/queue.
Call this after successfully executing commands on your server. Pass the IDs of the commands that were executed. They will be removed from the queue and will not be returned again.
Request Body (JSON)
idsarrayArray of command IDs: [1, 2, 3]
Response
204 No Content
GET/bansList Bans
Returns all bans for this store. You can use this to prevent banned players from receiving purchases.
Here is the typical flow your plugin should implement:
every 30 seconds:
queue = GET /api/plugin/queue
// 1. Execute offline commands
if queue.meta.execute_offline:
offline = GET /api/plugin/queue/offline
for each command in offline.commands:
execute(command.command)
mark_done.append(command.id)
// 2. Execute online commands for each player
for each player in queue.players:
if isOnline(player.uuid):
cmds = GET /api/plugin/queue/online/{player.name}
for each cmd in cmds.commands:
if player.inventorySlots >= cmd.conditions.slots:
execute(cmd.command)
mark_done.append(cmd.id)
// 3. Mark all executed commands as done
if mark_done is not empty:
DELETE /api/plugin/queue body: {"ids": mark_done}
⛏️ Minecraft
Compatible with Paper, Spigot, and Bukkit. Requires Java 11+.
Installation
1
Download the plugin
Download ForgeStore.jar from your Dashboard → Plugins. Drop it in your plugins/ folder.
2
Configure
Start the server once to generate plugins/ForgeStore/config.yml. Set api_key and store_id.
3
Reload
Run /fs reload or restart the server. Check the console for [ForgeStore] Connected ✓.
Example commands
# LuckPerms — add rank
lp user {player} parent set vip
# Give items
give {player} diamond 64
# Run custom command
eco give {player} 1000
# Broadcast purchase
broadcast &6{player} &fjust bought &6VIP&f on our store!
💡
Use LuckPerms for permissions. It's the most reliable way to manage ranks across restarts.
🏚️ Rust
Compatible with uMod (Oxide) and Carbon. Requires Rust server 2023+.
Installation
1
Download the plugin
Download ForgeStore.cs from your Dashboard → Plugins. Drop it in oxide/plugins/ or carbon/plugins/.
2
Configure
The config file is generated at oxide/config/ForgeStore.json. Set ApiKey and StoreId.
3
Reload
Run oxide.reload ForgeStore in the server console.
Example commands
# Give kit
inventory.giveto {player} kit_vip
# Add VIP group (Oxide)
oxide.usergroup add {player} vip
# Give item by item ID
giveplayeritem {player} 1751045826 1
# Custom server points
sr add {player} 500
🚗 FiveM
Compatible with ESX, QBCore, and standalone FiveM servers.
Installation
1
Download the resource
Download the forgestore resource folder from Dashboard → Plugins. Place it in your resources/ folder.
2
Add to server.cfg
Add ensure forgestore to your server.cfg. Set the API key and store ID in forgestore/config.lua.
3
Restart
Restart the server or run refresh then start forgestore in the console.
FiveM uses player licenses (Steam/FiveM identifier), not player names. Make sure your players enter their in-game name at checkout, and map it to their license in your server's player database.
🔧 Garry's Mod
Compatible with all Garry's Mod server types. Uses GLua.
Installation
1
Download the addon
Download forgestore.lua from Dashboard → Plugins. Place in garrysmod/addons/forgestore/lua/autorun/server/.
2
Configure
Edit the top of the file: set FORGESTORE_API_KEY and FORGESTORE_STORE_ID.
Example commands
# ULX — add to group
ulx adduserid {steam_id} vip
# SAM — set rank
sam addrank {player} vip
# Give DarkRP money
drp setmoney {player} 5000
# Custom Lua event
forgestore.trigger("{player}", "vip_purchased")
📝 Command Variables
These variables are replaced with real values when a command is executed: