MarketPlaceService receipt confusion

Hey Guys

So I am trying to add gamepasses to my game right now and understand the importance of getting this right. I am pretty experienced but am a little lost in the sauce for marketPlaceService.

Can somebody explain why the ProcessReceipt() code snippet on roblox doc website is so darn complicated? It seems to use a datastore and I have no idea why that is required???

please help.

1 Like

ProcessReceipt is an event that fires when a player purchase a developer product it will not fire if the player closed the purchase window , you can only use it in one server script meaning that you can not connect to ProcessReceipt in multiple script and it will only work on the server side , it will give a table called ReceiptInfo that contains some important values like PlayerId which is the UserId for the player who bought the developer product , if you wanna trigger game pass purchaes use PromptGamePassPurchaseFinished it will give you (Player , GamePassId , IsPurchased) check if IsPurchased equal true if it is true then this mean that the player clicked on the Buy button to ensure that the player actually bought the game pass use UserOwnsGamePassAsync which will need the player UserId and the gamepassid it will return true if the player owns the gamepass and false if the player does not own the gamepass and here you go !

1 Like

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