MarketService.ProcessReceipt not being called on product purchase in live games

I have this code in a module in ServerScriptService

local MarketService = game:GetService("MarketplaceService")

print("Product handler loaded")

MarketService.ProcessReceipt = function(Info)
	print("Receipt Start")
        --etc other stuff comes below this

When PromptProductPurchase is used and a player chooses to purchase the product, the purchase prompt immediately displays an error and ProcessReceipt is never called. The module containing the ProcessReceipt function loads as indicated by the print statement situated immediately above the function… This system does however call ProcessReceipt on test purchases made in studio. Roblox servers dont seem to be down, so does anyone have any idea why? The module loads, but that’s it.

Results are identical whether PromptProductPurchase is called on the client or the server.

1 Like

isn’t it supposed to be marketplaceservice?

1 Like

Just a shorthand variable name, updated OP

Do you know what error is shown to the player?

The prompt shows a generic ‘Your purchase could not be processed, you have not been charged’ error, there are no client script errors or server errors.

Can you show the line where the purchase is prompted? It seems like something is wrong and it can’t properly start the purchase.

game:GetService("MarketplaceService"):PromptProductPurchase(Player, ProductId)

Its probably not to do with this or else it would not prompt the purchase of the correct product to begin with I think.

1 Like

Ah, that’s true. I thought it just immediately popped up with an error. It is probably a Roblox error. You might want to make a post in #platform-feedback:engine-bugs or #platform-feedback:website-bugs (on a technicality though, since this is an API issue)

Looking at it, they seem to drop the reason given from the API if it doesn’t fit a few of their messages they show.

Edit: Here’s where they drop the reason, annoyingly: https://github.com/CloneTrooper1019/Roblox-Client-Tracker/blob/roblox/LuaPackages/Packages/_Index/roblox_purchase-prompt/purchase-prompt/Network/performPurchase.lua#L21-L50

Also, it’s probably gonna be the Website Bugs since I’m seeing API issue reports there too (not about this, but in general)

1 Like

I think this may be a case of undocumented behaviour. The product I was calling was third party, and despite AllowThirdPartyPurchases being true, I don’t think this works for DeveloperProducts outiside of studio
.