Add MarketplaceService.PromptProductPurchaseCancelled

As a Roblox developer, it is currently impossible to tell when someone closes a product purchase prompt without using a deprecated event

PromptProductPurchaseFinished is currently deprecated due to the reason quoted above. However, as developers we are taught not to use anything which is deprecated as it will not be supported in the future. That reasoning behind deprecating PromptProductPurchaseFinished is good, so I’m proposing a new event to provide the functionality we get with all other types of assets.

The event being proposed here, PromptProductPurchaseCancelled, would only fire when a player clicks cancel on the prompt. PromptProductPurchaseCancelled would have similar parameters to PromptPurchaseFinished, taking the player and assetId parameters.

By adding this event, developers would have the ability to tell when product purchase prompts are closed, just like we do with asset prompts and game pass prompts.

5 Likes

Im on mobile so I cant test stuff right now, but the page for PromptProductPurchaseFinished says to use PromptPurchaseFinished for all new work. According to the docs for PromptPurchaseFinished, it passes a third parameter, isPurchased, which tells Whether the item was successfully purchased (false for errors and cancellations). Why not use the third parameter?

2 Likes

IIRC when I tested this, PromptPurchaseFinished did not fire for developer product prompts. This sounds like a bug or oversight, but I have an easier time believing it is simply so that naive developers don’t use the event to detect when a developer product purchase is completed successfully.

3 Likes

On the page for PromptProductPurchaseFinished
It’s deprecated

And says to use PromptPurchaseFinished

But then on that page it has this

I confirmed in-game just now that PromptPurchaseFinished does not work for developer products. It also wouldn’t make sense if it did, since a developer product’s ID can match an asset’s ID.

1 Like