API:Class/MarketplaceService

Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.
Service: This class is a service. It is a top-level singleton which can be obtained with the GetService method.
Uncreatable: This object cannot be created with Instance.new.

MarketplaceService.pngMarketplaceService : Object Icon.pngInstance

A service that is responsible for in-game transactions, item information and ownership. All of the current financial rules of Roblox apply to in-game sales. At present if you are a member of builders club you will earn 70% of the total cost of the transaction, and 10% of affiliate gear sales. If you are not a member of builders club you will only earn 10% of the total cost of the transaction.

Functions

FunctionsmemberhiddenFunctions [toggle]

voidPromptGamePassPurchase ( Player player, int gamePassId )

Used to prompt a user to purchase a game pass with the given assetId.

|RMD member="API:Class/MarketplaceService/PromptGamePassPurchase"|Used to prompt a user to purchase a game pass with the given assetId.|/RMD|
voidPromptProductPurchase ( Player player, int productId, bool equipIfPurchased = true, CurrencyType currencyType = Default )

Used to prompt a user to purchase a product with the given product id.

|RMD member="API:Class/MarketplaceService/PromptProductPurchase"|Used to prompt a user to purchase a product with the given product id.|/RMD|
voidPromptPurchase ( Player player, int assetId, bool equipIfPurchased = true, CurrencyType currencyType = Default )

Used to prompt a user to purchase an item with the given assetId.

|RMD member="API:Class/MarketplaceService/PromptPurchase"|Used to prompt a user to purchase an item with the given assetId.|/RMD|
voidPromptThirdPartyPurchase ( Player player, string productId ) [LocalUserSecurity]

Prompts a third-party purchase.

|RMD member="API:Class/MarketplaceService/PromptThirdPartyPurchase"|Prompts a third-party purchase.|/RMD|
PromptGamePassPurchase ( Player player, int gamePassId )
Used to prompt a user to purchase a game pass with the given assetId.
PromptProductPurchase ( Player player, int productId, bool equipIfPurchased = true, CurrencyType currencyType = Default )
Used to prompt a user to purchase a product with the given product id.
PromptPurchase ( Player player, int assetId, bool equipIfPurchased = true, CurrencyType currencyType = Default )
Used to prompt a user to purchase an item with the given assetId.
PromptThirdPartyPurchase ( Player player, string productId ) [LocalUserSecurity]
Prompts a third-party purchase.

YieldFunctions

YieldFunctions [toggle]

StandardPagesGetDeveloperProductsAsync ( )

Returns a Page object which contains information for all of the current game's developer products.

|RMD member="API:Class/MarketplaceService/GetDeveloperProductsAsync"|Returns a Page object which contains information for all of the current game's developer products.|/RMD|
dictionary<Variant>GetProductInfo ( int assetId, InfoType infoType = Asset )

Returns the product information of an asset using its assetId.

|RMD member="API:Class/MarketplaceService/GetProductInfo"|Returns the product information of an asset using its assetId.|/RMD|
boolPlayerOwnsAsset ( Player player, int assetId )

Returns whether the given player has the given asset.

|RMD member="API:Class/MarketplaceService/PlayerOwnsAsset"|Returns whether the given player has the given asset.|/RMD|
Returns a Page object which contains information for all of the current game's developer products.
GetProductInfo ( int assetId, InfoType infoType = Asset )
Returns the product information of an asset using its assetId.
PlayerOwnsAsset ( Player player, int assetId )
Returns whether the given player has the given asset.

Callbacks

Callbacks [toggle]

ProductPurchaseDecisionProcessReceipt ( dictionary<string, Variant> receiptInfo )

Callback handling purchases made by a player through MarketplaceService.

|RMD member="API:Class/MarketplaceService/ProcessReceipt"|Callback handling purchases made by a player through MarketplaceService.|/RMD|
Callback handling purchases made by a player through MarketplaceService.

Events

EventsmemberhiddenEvents [toggle]

PromptGamePassPurchaseFinished ( Player player, int gamePassId, bool wasPurchased )

Fires when a gamepass purchase is finished.

|RMD member="API:Class/MarketplaceService/PromptGamePassPurchaseFinished"|Fires when a gamepass purchase is finished.|/RMD|
PromptPurchaseFinished ( Player player, int assetId, bool isPurchased )

Fires when a purchase is either denied or accepted.

|RMD member="API:Class/MarketplaceService/PromptPurchaseFinished"|Fires when a purchase is either denied or accepted.|/RMD|
PromptProductPurchaseFinished ( int userId, int productId, bool isPurchased ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/MarketplaceService/PromptProductPurchaseFinished"|Deprecated. Do not use.|/RMD|
ThirdPartyPurchaseFinished ( Player player, string productId, string receipt, bool wasPurchased ) [LocalUserSecurity]

Fires when a third-party purchase has been completed.

|RMD member="API:Class/MarketplaceService/ThirdPartyPurchaseFinished"|Fires when a third-party purchase has been completed.|/RMD|
PromptGamePassPurchaseFinished ( Player player, int gamePassId, bool wasPurchased )
Fires when a gamepass purchase is finished.
PromptPurchaseFinished ( Player player, int assetId, bool isPurchased )
Fires when a purchase is either denied or accepted.
PromptProductPurchaseFinished ( int userId, int productId, bool isPurchased ) [deprecated]
Deprecated. Do not use.
ThirdPartyPurchaseFinished ( Player player, string productId, string receipt, bool wasPurchased ) [LocalUserSecurity]
Fires when a third-party purchase has been completed.

|RMD member="API:Class/MarketplaceService"|A service that is responsible for in-game transactions, item information and ownership. All of the current financial rules of Roblox apply to in-game sales. At present if you are a member of builders club you will earn 70% of the total cost of the transaction, and 10% of affiliate gear sales. If you are not a member of builders club you will only earn 10% of the total cost of the transaction. |/RMD|



Tutorials Used In

Developer product