Roblox server ModuleScript and backend relay example for MakePay hosted payment links.
Roblox experiences should not contain MakePay merchant credentials. This package keeps the Roblox side small: a server ModuleScript calls your backend relay with game/player metadata, and the backend relay creates MakePay payment links and verifies webhooks before granting entitlements.
src/MakePayServer.lua- Luau ModuleScript for Roblox server scripts.examples/roblox/ServerScript.lua- example usage from ServerScriptService.examples/node-relay- backend relay for payment links and webhooks.docs/SETUP.md- setup and policy notes.
- Enable HTTP requests in Game Settings -> Security.
- Place
src/MakePayServer.luain ServerScriptService or ReplicatedStorage. - Require it from a server Script.
- Configure your backend relay URL.
localMakePay=require(path.to.MakePayServer)
MakePay.configure({
baseUrl="https://your-relay.example",
relaySecret="server-to-relay-secret"
})localok, result=MakePay.createPaymentLink(player, {
sku="vip_rank",
title="VIP Rank",
amount="4.99",
currency="USD"
})
ifokthenprint(result.checkoutUrl)
elsewarn(result)
endCheck Roblox policies before using off-platform payments for in-experience goods. Entitlements should be granted only by your backend after signed MakePay webhook confirmation.
npm test
npm run validate