Currently studio allows you to “test purchase” gamepasses however this does not work with UserOwnsPass, meaning you need to write special-case logic in your game or a wrapper for gamepass purchases so you can validate if a player owns it or not. Ideally MarketplaceService keeps track of roblox-assets that the player owns, including for test purchases.
Expected behavior:
After purchasing a gamepass in studio, calling UserOwnsPassAsync for the game gamepass ID will return “true” in the same session
Note: I am using this API in accurate play solo on the server
Hey, we recently made some changes under the hood to the purchase prompt, so I just want to make sure: Is this a regression? Or are you requesting new behavior?
The test purchasing is pretty simplistic, and probably needs some attention. All it really does is:
Pretend you have infinite robux
Tell you the purchase completed when you click buy now, without hitting any endpoints
If it’s a dev product purchase, generates a fake value for the receipt field of the result
UserOwnsPassAsync should return true for game passes bought during a play solo session and then cleared when the session is over. Currently it only checks the actual ownership of the game pass so after purchasing it still returns false for that session.
Technically it’s a regression, but not in the way you think. Ever since game passes were given their own IDs and stuff game pass test purchases don’t remember if you bought it or not. Before this change, they did. It’s been a problem for months now and I’d really like this functionality again.