Hello
the player can initiate a product purchase and the popup asking “Do you want to spend 50 Robux for this product?” will appear.
However the player may not respond to this popup for some time (e.g. 5 minutes).
Then the player can still press OK, however the conditions in the game may have changed and granting the product may be already impossible.
Is there a way to verify if the purchase is valid at the moment, when the player presses “OK” on the purchase confirmation dialog and how do you handle such issue?
Once a player purchases a developer product, the Roblox game engine will invoke the developer’s MarketplaceService.ProcessReceipt callback. There is no way for you to refund the purchase at this point, as returning Enum.ProductPurchaseDecision.NotProcessedYet will simply postpone the transaction. You, however, can still deny the deliverance of goods. To combat this, consider adding a lull zone where the product can be purchased. This way, the game does not progress until the player has made their decision on whether or not to buy the product