Wrong ProductID despite countless checks and confirmations

I’ve been trying to make this Skip Stage gamepass for my game work, but each time I test the purchase it sends the same Server response

[Server] Wrong ProductId, ignoring.

I’ve double-triple-checked that the ProductIDs match in studio and under my DevProducts. I wrote a separate script to print them all out to ensure I wasn’t losing my mind. These IDs match and are the same as the ones on my end.

LocalScript (under the ImageButton, nested under a TextLabel and a ScreenGUI)

local button = script.Parent
local player = game.Players.LocalPlayer
local MarketplaceService = game:GetService("MarketplaceService")

local devProductId = 3396791435

button.MouseButton1Click:Connect(function()	
	MarketplaceService:PromptProductPurchase(player, devProductId)
end)

ServerScript (in ServerScriptService)

local MarketplaceService = game:GetService("MarketplaceService")
local devProductId = 3396791435

for _, product in pairs(game:GetService("MarketplaceService"):GetDeveloperProductsAsync():GetCurrentPage()) do
	print("Product:", product.Name, "ID:", product.ProductId)
end


local function processReceipt(receiptInfo)
	local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
	if not player then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	if receiptInfo.ProductId == devProductId then
		local leaderstats = player:FindFirstChild("leaderstats")
		local stage = leaderstats and leaderstats:FindFirstChild("Stage")

		if stage then
			stage.Value += 1
			print(player.Name .. " bought Skip Stage. New Stage: " .. stage.Value)
		else
			warn("No leaderstats or Stage found for " .. player.Name)
		end
	end

	return Enum.ProductPurchaseDecision.PurchaseGranted
end

MarketplaceService.ProcessReceipt:Connect(processReceipt)

Here is an image of my DevProduct:

Help! Me and my team agreed to push this game in an hour, and this was supposed to be a twenty minute fix, but I’ve not the faintest clue what’s going on.

Of note: Other DevProducts work fine (Nuke Gamepass, etc.) from a separate script – and use the same logic.

ok so apparently you have to call all devproduct purchases using the same script and if you don’t it won’t process the purchase properly sorry for opening this when i hadn’t tried that

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.