This event has been superseded by
MarketPlaceService/PromptPurchaseFinished which should be used in all new work. Despite this event’s deprecation, this is the only way to detect when a developer product purchase prompt is closed.
This event fires when a purchase dialogue of a developer product is closed. This fires right as the dialogue closes when the player presses “Cancel” at the prompt, or “OK” at the success/error message. Do not use this event to process developer product purchases! For this, you must set the
MarketplaceService/ProcessReceipt|ProcessReceipt callback once.
- For game passes, use
- For affiliate gear sales or other assets, use
Unlike the similarly-named events above, this event fires with a
Player/UserId and not a reference to the
Player object. Despite this event’s deprecation, it is currently the only way to detect when a developer product’s purchase dialog is closed.
Below is a screenshot of a game pass purchase prompt. The function in the code sample runs immediately after the player presses “Cancel” or after the player buys the developer product then presses “OK”. Should there be an issue with the purchase, the event also fires.
local MarketplaceService = game:GetService("MarketplaceService") MarketplaceService.PromptProductPurchaseFinished:Connect(function (...) -- Print all the details of the prompt, for example: -- PromptProductPurchaseFinished 269323 327064551 true print("PromptProductPurchaseFinished", ...) end)
The ID number of the developer product shown in the prompt (not to be confused with an asset ID)
Whether the item was successfully purchased (false for errors and cancellations)