How do I prompt purchase finished for developer products?

It’s a really basic script that should work, but doesn’t.

Client part:

v.MouseButton1Down:Connect(function()
	MPService:PromptProductPurchase(Player, ID)
end)

Server Part:

MPService.PromptPurchaseFinished:Connect(function(player, product, purchased)
	print(purchased)
	if purchased then
		print("purchasd")

The client successfully prompts purchase, and I buy the product successfully. However the server side event doesn’t fire. Why?

What event do i use for a developer product being purchased?

1 Like

Neverminddd, found the solution, just a silly mistake I couldn’t spot :stuck_out_tongue: .

The proper function is PromptProductPurchaseFinished. Do not use this for processing purchases though, only use it if you need to determine when the prompt closes. You must use ProcessReceipt to process product purchases, give items and determine whether a purchase was granted or not so you get the sales revenue.

@TheCarbyneUniverse You don’t need a remote at all here. The client can prompt purchases to itself and use finished signals for itself as well.

4 Likes

PromptProductPurchaseFinished is now deprecated. What’s another solution?

PromptProductPurchaseFinished is still fine to use despite its deprecation. The deprecation is more of an informality than it is an actual deprecation, the informality being discouraging developers from using it wrongly to process products over ProcessReceipt.

ProcessReceipt is intended for acting when a product is purchased, granting items and telling Roblox whether or not you successfully handled the purchase. The returned ProductPurchaseDecision Enum will tell Roblox to either continually attempt to grant the purchase over 3 days or reject the purchase and refund the consumer. PromptProductPurchaseFinished just helps you check when the prompt is closed so you can use that for any reason, such as modifying a Gui post-purchase.

6 Likes