How to SAFELY check gamepass' price in proccess of buying

Hey devforum! I have one question: “How to get spent price of bought gamepass”
I used GetProductInfo after buying but it have one vuenability: user can change price of gamepass after buy and game will count it as new price.

Possible ways to fix:

  1. check price BEFORE buying (price can be changed after checking (or not idk))
  2. somehow get price from PromptGamePassPurchaseFinished but dont know how
1 Like

Idts, the info you getting about the gamespass using GetProductInfo can be changed by player.

1 Like


  1. Player buy gamepass
  2. After buying (spent robux) but not closed prompt, user changing price on Roblox to another
  3. Closing prompt
  4. Checking price from GetProductInfo (returns new price)
  5. Spent value counted as new price (not spent)
1 Like

are you doin this using a local script?? and who the user and how is he changin the prince??

Maybe put all the gamepass ids in a table and then loop through the table and get info about all the gamepass and then store the prices some where. Do this when the game starts

1 Like

More context: doing some pls donate like game. Need to count raised/donated value. Looking for price, returns new, not really spended.
Doing with server side only ofc

Thats bad idea, overload http requests + price can be changed before updating info

1 Like

Fetch the price as soon as you initiate the purchase prompt.

If the price changes while the prompt is on screen, the number on the button will not change.
When the player clicks buy, one of the parameters sent to the “purchase” endpoint is the expected price of the item (the number shown to them on the button). If the price has changed, it’ll hit them with an error. This is to prevent people from getting scammed.

This means if the price changes sometime between when the prompt was displayed and when the buy button is clicked, the purchase will not go through. Therefore, you can be fairly confident the price you fetched earlier was the actual amount they spent.


So you mean check price BEFORE prompt bcuz it always be same cuz of roblox? Yea?

1 Like

Yes, fetch it at the same time as prompting the purchase.

1 Like

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