I'm trying to get the total of robux spent on my gamepasses

MarketplaceService:GetProductInfo().Sales returns 0 In game?


local Gamepasses = {
	[1] = 218170241,
	[2] = 218180369,
local TotalRobux = 0

for Number, Pass in pairs(Gamepasses) do
	local Info = MarketplaceService:GetProductInfo(Pass, Enum.InfoType.GamePass)
	if Info then
		local Sales = Info.Sales
		local PriceInRobux = Info.PriceInRobux
		print("Sales", Sales)
		print("PriceInRobux", PriceInRobux)
		if Sales and PriceInRobux then
			TotalRobux += (Sales * PriceInRobux)
			print("TotalRobux", TotalRobux)

I also recommend that you convert the script to webhook for discord, so it’s easier to look at the totalrobux spent


Rest assured that this Service does what is required.

I believe what has you mistaken is your method of testing the increase. You see, when you purchase the gamepass within studio in a testing environment, it has the advantage of not taking your ROBUX away. However, this does not actually go to the server, hence no receipt is printed. I would check if


is set to true and manually increase it for testing purposes. I would recommend this method due to the redundance of spending ROBUX on your own game pass to register it to the system.

Let me know if that fixes your issue. :grinning:


I recommend this as well. However be careful not to spam it as you may get Webhook blacklisted!

1 Like

I have purchased my game pass on a different user In game and I have the same result. I might need to learn webhooks

If it went through it would’ve showed up prior to all of this… Are you sure you didn’t do it in studio?

yep, quick question would the sale need to fully process for it to show up?

That is correct. If you leave the game or the process fails before the purchase is complete, the purchase is voided. Check the alt account’s inventory to see if the purchase came through.

The purchase is still pending, but I did buy It

1 Like

That would be the verdict. Allow it time to process and confirm it. That is when a sale is truly completed.

I tested it out in one of my games where I know for a fact that several thousand people have purchased gamepasses, and it still gives a result of 0.
It’s possible that it’s a studio exclusive thing, or maybe just bugged. Waiting for it to be finish being pending will have no effect on it.

so maybe this might need a bug report?

Alrighty then… Yeah that may be a server side issue then. I’d suggest waiting a day @sopkhim @PoppyandNeivaarecute and if it still doesn’t work, file a report to the software engineers. Could be a fast flag that’s being switched off for testing momentarily. I will check in the morning to see if there’s anything like that going on.

I found out that I can only view my sales through a local script but if I am logged into a different account I can’t see my sales It’s just an issue that you can’t make your sales public… welp my game idea can’t happen

Worst case scenario there is most likely an API that will let you get that information with a token.