Detecting purchases in MarketplaceService

All MarketplaceService.PromptXPurchaseFinished signals are fired by clients when the player finishes a purchase client-side. This makes them unsafe to use for detecting purchases within an experience, because they can theoretically be spoofed and they do not necessarily correspond to the state of Roblox's purchasing backend.

For detecting product purchases, use MarketplaceService.ProcessReceipt instead of MarketplaceService.PromptProductPurchaseFinished.

For detecting any other purchases (game passes, subscriptions, assets, bundles, etc.) there are no trusted signalling APIs specifically for purchases, so you must use the MarketplaceService.PromptXPurchaseFinished signals, and within the callback you must also perform a separate API call to query whether the item is actually owned or not according to Roblox's backend (for example, MarketplaceService.UserOwnsGamePassAsync).

Also, in some cases there may be some other signalling APIs for detecting the change of the state in question, without necessarily being related to a specific purchase. For example you can use MarketplaceService.UserSubscriptionStatusChanged for detecting subscription purchases. So these should be preferred when available

Last updated