Skip to content

feat: Add server-only purchasing mode to GameProductService#721

Open
unrooot wants to merge 2 commits into
mainfrom
users/unrooot/server-only-purchase-gameproductservice
Open

feat: Add server-only purchasing mode to GameProductService#721
unrooot wants to merge 2 commits into
mainfrom
users/unrooot/server-only-purchase-gameproductservice

Conversation

@unrooot

@unrooot unrooot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

By default a client can prompt a purchase for any asset id via GameProductServiceClient:PromisePromptPurchase. When selling limited UGC this lets an exploiter prompt arbitrary asset ids. Enabling server-only prompting makes the client reject local prompts so that prompts must be initiated from the server, where you can validate the asset id:

-- Server
local gameProductService = serviceBag:GetService(require("GameProductService"))
gameProductService:SetServerOnlyPromptingEnabled(true)

-- Now prompt from the server (validate idOrKey first), e.g.
gameProductService:PromisePlayerPromptPurchase(player, GameConfigAssetTypes.ASSET, assetId)

On the client, GameProductServiceClient:PromisePromptPurchase rejects while this mode is enabled. Use GameProductServiceClient:ObserveServerOnlyPromptingEnabled() to hide or disable buy buttons.

Note: this prevents the helper API from prompting arbitrary ids; a client can still call Roblox's MarketplaceService:PromptPurchase directly, so server-side validation of what you sell remains the real authority.

@unrooot unrooot requested a review from Quenty June 30, 2026 17:17
@unrooot unrooot self-assigned this Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Results

ℹ️ No changed packages with deploy targets were discovered for this PR. · View logs

Test Results

Package Status Try it
@quenty/gameproductservice ✅ Passed (927ms) Open | Play

1 tested, 1 passed, 0 failed in 6.3s · View logs

@unrooot unrooot deployed to integration June 30, 2026 17:43 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants