Add creator codes to your game
Players enter a creator's code. For 7 days that creator earns a share of what the player buys in your game. You pay creators once a month from your Roblox group, CreatorCodeHub does the bookkeeping. Setup takes about 15 minutes.
Download module (.rbxmx) Sign in with Roblox
How it works
- Creators sign up once and get one code that works in every participating game.
- A player enters the code in your game. The module checks it with CreatorCodeHub and binds the player to that creator for 7 days (one code per player at a time).
- Dev product and game pass purchases of bound players are reported. You choose the creator share (5–50% of your net Robux).
- At the start of each month your console lists what each creator earned. You send the Robux as a group payout and mark it as paid.
Test in Studio (5 minutes)
- Connect your game in the portal (sign in). Paste the game link; if the game belongs to you or to a group you own, ownership is verified automatically.
- In your game console, click Download personal module. The file already contains the portal address, your game and a test key.
- Drag the file into Studio and move the
CreatorCodeHubfolder into ServerScriptService. HTTP requests must be allowed (Game Settings → Security → Allow HTTP Requests). - Press Play, click Codes, enter
TESTCODEand buy any dev product or game pass. Your console shows the check-in, the redemption and the purchase.
That's it for testing. You don't type any key and don't write any code.
Purchases are tracked automatically
Game passes are reported after Roblox confirms the player owns the pass. Dev products are reported when Roblox reports a completed purchase on the server. Both can't be faked by players.
New products show up under Products in your console as “pending”. Approve them with their list price; only approved products earn creators a share. This protects you against manipulated prices.
Want exact receipt data? Set Config.DevProducts = "receipt" and install your ProcessReceipt through the module:
local CreatorCodeHub = require(game.ServerScriptService.CreatorCodeHub.Service)
CreatorCodeHub.WrapProcessReceipt(function(receiptInfo)
-- your existing ProcessReceipt logic: give the item, save, ...
return Enum.ProductPurchaseDecision.PurchaseGranted
end) If another system owns ProcessReceipt, call ReportReceipt yourself, right before you grant:
-- inside your own ProcessReceipt, right before you grant:
CreatorCodeHub.ReportReceipt(receiptInfo)
return Enum.ProductPurchaseDecision.PurchaseGranted Go live
- In the console, create the live key and copy it.
- Creator Dashboard → your experience → Secrets → new secret named
CreatorCodeHub, value = live key, domain =creatorcodehub.com. - Set your creator share, who may promote (open, on request, closed) and your payout group, then switch the game live in the console and publish. From that moment real purchases count; everything before stays test data.
Reward players (optional, recommended)
A small reward for entering a code gives creators something to talk about. It is given at most once per 7-day binding:
Config.CreatorCodeReward = function(player, code)
local coins = player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Coins")
if not coins then return false, "Loading, try again in a moment." end
coins.Value += 500
return true, "+500 coins"
end Return false, "reason" if the reward cannot be given yet; the module retries every 10 seconds while the player is online.
Own UI
-- Config.ShowDefaultUI = false, then from your own server code:
local ok, message = CreatorCodeHub.Redeem(player, codeTheyTyped)
local active = CreatorCodeHub.GetActiveCode(player) -- "NOVA" or nil
CreatorCodeHub.PromptCodeEntry(player) -- opens the built-in window
CreatorCodeHub.CodeActivated.Event:Connect(function(player, code) end)
-- Clients can read the attributes CreatorCode and CreatorCodeDays on the Player. Payouts
- Your console lists each creator's open balance per month. Amounts are computed from approved purchases; you never type an amount.
- You pay from the payout group you set (Roblox group payouts). The group needs funds, ideally it owns the game.
- Roblox only pays group members, and new members may have to wait before they can receive payouts. The console shows who has joined.
- Balances below your minimum payout carry over and never expire. Creators who leave still get their rest balance.
Privacy
The module sends the creator code, a random player reference (a GUID stored in your own DataStore), timestamps and product id, name and price. It never sends Roblox user ids, names or other player data, and the same player has a different reference in every game. This follows the Roblox rule not to share players' identifying information with third parties.
If CreatorCodeHub is down
Your game keeps working. Every web call is wrapped in pcall; events wait in a queue, at shutdown in your DataStore, and are sent later.
HTTP API (for custom integrations)
All calls: Authorization: Bearer <key> and X-Game-Key: <game key>, JSON.
GET /api/v2/program– your settings and whether the key is live or sandbox.POST /api/v2/resolve{ code }– is this creator code valid in your game?POST /api/v2/events{ sentAt, redemptions: [{ id, ref, code, at }], purchases: [{ id, ref, code, type, productId, productName, robux, at }] }POST /api/v2/promo/redeem//api/v2/promo/release{ sentAt, code, ref }– free promo codes.