# MarketplaceService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/MarketplaceService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/MarketplaceService

The service responsible for in-experience transactions.

## Methods

### BindReceiptHandler

```luau
MarketplaceService:BindReceiptHandler(transactionType: Enum.ReceiptType, handler: (...any) -> ...any, filter: { any }?): RBXScriptConnection
```

- Tags: Capabilities: Monetization

Registers a callback to process receipts of a specific type.

Parameters:

- `transactionType`: The `ReceiptType` indicating which kind of receipt to handle.
- `handler`: A callback function that receives a receipt info dictionary and must return an `ReceiptDecision` value.
- `filter`: An optional array of product IDs. When provided, the handler only fires for receipts matching those product IDs. Not supported for `RobuxTransferSender` or `RobuxTransferReceiver` receipt types.

Returns: A [`RBXScriptConnection`](https://rapi.sleaze.dev/index/types/RBXScriptConnection.md) that can be disconnected to unregister the handler.

### CanUsersTransferRobuxAsync

```luau
MarketplaceService:CanUsersTransferRobuxAsync(sender: Player, receiverUser: User): Enum.RobuxTransferEligibility
```

- Tags: Yields, Capabilities: PromptExternalPurchase

### ClearProductInfoCaches

```luau
MarketplaceService:ClearProductInfoCaches()
```

- Tags: Roblox script security

### GetAvailableSubscriptionProductsAsync

```luau
MarketplaceService:GetAvailableSubscriptionProductsAsync(productType: string): { any }
```

- Tags: Yields, Roblox script security

### GetDeveloperProductsAsync

```luau
MarketplaceService:GetDeveloperProductsAsync(): Instance
```

- Tags: Yields, Capabilities: AssetRead

Returns a [`Pages`](https://rapi.sleaze.dev/classes/Pages.md) object which contains information for all of the current experience's developer products.

Returns: A [`Pages`](https://rapi.sleaze.dev/classes/Pages.md) object whose entries describe the current experience's developer products.

### GetPassOwnershipAsync

```luau
MarketplaceService:GetPassOwnershipAsync(user: Player, gamePassId: number): { [string]: any }
```

- Tags: Yields, Capabilities: AssetRead

### GetProductInfoAsync

```luau
MarketplaceService:GetProductInfoAsync(assetId: number, infoType: Enum.InfoType? = Enum.InfoType.Asset): { [string]: any }
```

- Tags: Yields, Capabilities: AssetRead

Returns the product information of an asset using its asset ID.

Parameters:

- `assetId`: The asset ID of the specified product.
- `infoType`: An `InfoType` enum value specifying the type of information being retrieved.

Returns: A dictionary containing information about the queried item, described in the previous tables.

### GetRobloxSubscriptionDetailsAsync

```luau
MarketplaceService:GetRobloxSubscriptionDetailsAsync(user: Player): { [string]: any }
```

- Tags: Yields, Capabilities: Monetization

Returns the subscription details for the given user for the Roblox Subscription ecosystem.

Parameters:

- `user`: The user regarding whom to check the subscription status.

Returns: A dictionary containing subscription details such as `IsSubscribed`, `IsOriginExperience`, and optionally `StartTime`.

### GetRobuxBalance

```luau
MarketplaceService:GetRobuxBalance(): number
```

- Tags: Yields, Roblox script security

### GetSubscriptionProductInfoAsync

```luau
MarketplaceService:GetSubscriptionProductInfoAsync(subscriptionId: string): { [string]: any }
```

- Tags: Yields, Capabilities: AssetRead

Returns the product information of a subscription for the given `subscriptionId`.

Parameters:

- `subscriptionId`: The ID of the subscription to check.

Returns: A dictionary containing the subscription product information described in the following table.

### GetSubscriptionPurchaseInfoAsync

```luau
MarketplaceService:GetSubscriptionPurchaseInfoAsync(subscriptionId: string): { [string]: any }
```

- Tags: Yields, Roblox script security

### GetUsersPriceLevelsAsync

```luau
MarketplaceService:GetUsersPriceLevelsAsync(userIds: { any }): { any }
```

- Tags: Yields, Capabilities: Monetization

Returns the regionalized price levels of users, representing the recommended price for an item in each user's regional market.

Parameters:

- `userIds`: An array of user IDs.

Returns: Returns an array of `PriceLevelInfo` objects with a dictionary where the keys are user IDs (strings) and their values are the corresponding price levels (integers between 1 and 1000).

### GetUserSubscriptionDetailsAsync

```luau
MarketplaceService:GetUserSubscriptionDetailsAsync(user: Player, subscriptionId: string): { [string]: any }
```

- Tags: Yields, Capabilities: Monetization

Returns a table that contains the details of the user's subscription for a given `subscriptionId`.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) object whose subscription details you want to check.
- `subscriptionId`: The ID of the subscription to check.

Returns: A dictionary containing the user's subscription details described in the following table.

### GetUserSubscriptionDetailsInternalAsync

```luau
MarketplaceService:GetUserSubscriptionDetailsInternalAsync(subscriptionId: string): { [string]: any }
```

- Tags: Yields, Roblox script security

### GetUserSubscriptionPaymentHistoryAsync

```luau
MarketplaceService:GetUserSubscriptionPaymentHistoryAsync(user: Player, subscriptionId: string): { any }
```

- Tags: Yields, Capabilities: Monetization

Returns an [`Array`](https://rapi.sleaze.dev/index/types/Array.md) that contains up to one year of the user's subscription payment history for the given `subscriptionId`.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose subscription payment history you want to retrieve.
- `subscriptionId`: The ID of the subscription whose payment history you want to retrieve.

Returns: An array of payment-history entries, ordered from most recent to least recent, as described in the following table.

### GetUserSubscriptionStatusAsync

```luau
MarketplaceService:GetUserSubscriptionStatusAsync(user: Player, subscriptionId: string): { [string]: any }
```

- Tags: Yields, Capabilities: Monetization

Returns a `table` that contains the subscription status of the user for the given `subscriptionId`.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) object whose subscription status you want to check.
- `subscriptionId`: The ID of the subscription to check for.

Returns: A dictionary containing the user's subscription status described in the following table.

### IsPurchaseSimulated

```luau
MarketplaceService:IsPurchaseSimulated(): boolean
```

- Tags: Roblox script security

### OpenShop

```luau
MarketplaceService:OpenShop(player: Player)
```

- Tags: Capabilities: PromptExternalPurchase

Opens a personalized in-game Shop for the given player.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) for whom to open the shop. If called from a [`LocalScript`](https://rapi.sleaze.dev/classes/LocalScript.md), this must be the local player.

### PerformBulkPurchase

```luau
MarketplaceService:PerformBulkPurchase(orderRequest: { [string]: any }, options: { [string]: any }): { [string]: any }
```

- Tags: Yields, Roblox script security

### PerformCancelSubscription

```luau
MarketplaceService:PerformCancelSubscription(subscriptionId: string)
```

- Tags: Yields, Roblox script security

### PerformPurchase

```luau
MarketplaceService:PerformPurchase(infoType: Enum.InfoType, productId: number, expectedPrice: number, requestId: string, isRobloxPurchase: boolean, collectibleItemId: string? = "", collectibleProductId: string? = "", idempotencyKey: string? = "", purchaseAuthToken: string? = "", timedOptionsDays: number? = 0, purchasePayload: string? = "", purchaseOptions: { [string]: any }? = nil): { [string]: any }
```

- Tags: Yields, Roblox script security

### PerformPurchaseV2

```luau
MarketplaceService:PerformPurchaseV2(infoType: Enum.InfoType, productId: number, expectedPrice: number, requestId: string, isRobloxPurchase: boolean, collectiblesProductDetails: { [string]: any }): { [string]: any }
```

- Tags: Yields, Roblox script security

### PerformSubscriptionPurchase

```luau
MarketplaceService:PerformSubscriptionPurchase(subscriptionId: string): string
```

- Tags: Yields, Roblox script security

### PerformSubscriptionPurchaseV2

```luau
MarketplaceService:PerformSubscriptionPurchaseV2(subscriptionId: string, paymentProvider: string)
```

- Tags: Yields, Roblox script security

### PerformSubscriptionPurchaseV3Async

```luau
MarketplaceService:PerformSubscriptionPurchaseV3Async(productType: string, productId: string, paymentProvider: string, paymentSessionId: string, referrerId: number?)
```

- Tags: Yields, Roblox script security

### PerformSubscriptionPurchaseWithRobuxAsync

```luau
MarketplaceService:PerformSubscriptionPurchaseWithRobuxAsync(subscriptionId: string, priceInRobux: number)
```

- Tags: Yields, Roblox script security

### PlayerCanMakePurchases

```luau
MarketplaceService:PlayerCanMakePurchases(player: Instance): boolean
```

- Tags: Roblox script security

### PlayerOwnsAssetAsync

```luau
MarketplaceService:PlayerOwnsAssetAsync(player: Instance, assetId: number): boolean
```

- Tags: Yields, Capabilities: AssetRead

Returns whether the given user has the given asset.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose inventory is tested for ownership of the given asset.
- `assetId`: The asset ID for which the given player's inventory is tested.

Returns: Indicates whether the given player's inventory contains the given asset.

### PlayerOwnsBundleAsync

```luau
MarketplaceService:PlayerOwnsBundleAsync(player: Player, bundleId: number): boolean
```

- Tags: Yields, Capabilities: AssetRead

Returns whether the given player owns the given bundle.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose inventory is tested for ownership of the given bundle.
- `bundleId`: The bundle ID for which the given player's inventory is tested.

Returns: Indicates whether the given player's inventory contains the given bundle.

### PrepareCollectiblesPurchase

```luau
MarketplaceService:PrepareCollectiblesPurchase(player: Instance, assetId: number, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: number)
```

- Tags: Roblox script security

### PromptBulkPurchase

```luau
MarketplaceService:PromptBulkPurchase(player: Player, lineItems: { any }, options: { [string]: any })
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase multiple avatar items with the given `assetId` or `bundleId`.

Parameters:

- `player`: The user to prompt to purchase items.
- `lineItems`: An array of avatar items to be included in the bulk purchase. Each line item contains the following structure:

```luau
{   Type: MarketplaceProductType,   Id: string,   PurchaseOptions: { {Type: PurchaseOption, Value: number?} }? }
```

 Each line item contains the following pairs:

- `Type`: The corresponding `MarketplaceProductType` (Enum).
- `Id`: The ID of the asset or bundle.
- `PurchaseOptions`: Optional. An array containing a single purchase option to display in the prompt. If omitted, the permanent purchase is prompted. See the PurchaseOptions section below for details.
- `options`: Not available at this time.

### PromptBundlePurchase

```luau
MarketplaceService:PromptBundlePurchase(player: Instance, bundleId: number)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase a bundle with the given `bundleId`.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt.
- `bundleId`: The ID of the bundle to purchase.

### PromptCancelSubscription

```luau
MarketplaceService:PromptCancelSubscription(user: Player, subscriptionId: string)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to cancel a subscription for the given `subscriptionId`.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt.
- `subscriptionId`: The ID of the subscription to cancel.

### PromptCollectiblesPurchase

```luau
MarketplaceService:PromptCollectiblesPurchase(player: Instance, assetId: number, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: number)
```

- Tags: Roblox script security

### PromptGamePassPurchase

```luau
MarketplaceService:PromptGamePassPurchase(player: Instance, gamePassId: number)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase a pass with the given `gamePassId`.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt.
- `gamePassId`: The pass ID to purchase. This is the `TargetId` returned by [`GetProductInfo()`](https://rapi.sleaze.dev/classes/MarketplaceService.md) when `InfoType` is `GamePass`. It is not the pass's asset ID and not its `ProductId`.

### PromptNativePurchase

```luau
MarketplaceService:PromptNativePurchase(player: Instance, productId: string)
```

- Tags: Roblox script security

### PromptNativePurchaseWithLocalPlayer

```luau
MarketplaceService:PromptNativePurchaseWithLocalPlayer(productId: string)
```

- Tags: Roblox script security

### PromptNativePurchaseWithLocalPlayerWithPaymentSessionId

```luau
MarketplaceService:PromptNativePurchaseWithLocalPlayerWithPaymentSessionId(productId: string, paymentSessionId: string)
```

- Tags: Roblox script security

### PromptNativePurchaseWithPaymentSessionId

```luau
MarketplaceService:PromptNativePurchaseWithPaymentSessionId(player: Instance, productId: string, paymentSessionId: string)
```

- Tags: Roblox script security

### PromptProductPurchase

```luau
MarketplaceService:PromptProductPurchase(player: Instance, productId: number, equipIfPurchased: boolean? = true, currencyType: Enum.CurrencyType? = Enum.CurrencyType.Default)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase a developer product with the given `productId`.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt.
- `productId`: The ID of the developer product to purchase.
- `equipIfPurchased`: Ignored.
- `currencyType`: Ignored.

### PromptPurchase

```luau
MarketplaceService:PromptPurchase(player: Instance, assetId: number, equipIfPurchased: boolean? = true, currencyType: Enum.CurrencyType? = Enum.CurrencyType.Default)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase an item with the given `assetId`. Does not work for USD Creator Store purchases.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt.
- `assetId`: The ID of the asset to purchase.
- `equipIfPurchased`: Ignored.
- `currencyType`: Ignored.

### PromptRobloxPurchase

```luau
MarketplaceService:PromptRobloxPurchase(assetId: number, equipIfPurchased: boolean)
```

- Tags: Roblox script security

### PromptRobloxSubscriptionPurchase

```luau
MarketplaceService:PromptRobloxSubscriptionPurchase(user: Player)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase a Roblox Plus subscription.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to be prompted to purchase Roblox Plus.

### PromptRobuxTransferAsync

```luau
MarketplaceService:PromptRobuxTransferAsync(sender: Player, receiverUserId: number, amount: number): string
```

- Tags: Yields, Capabilities: PromptExternalPurchase

Initiates a Robux transfer from the sender to another user.

Parameters:

- `sender`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) initiating the transfer. Must be a valid player currently in the server.
- `receiverUserId`: The `UserId` of the user who will receive the Robux.
- `amount`: The amount of Robux to transfer. Must be a positive integer.

Returns: A string `transferRequestId` that uniquely identifies this transfer request. Use this ID to correlate with receipts delivered through [`BindReceiptHandler`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

### PromptSubscriptionPurchase

```luau
MarketplaceService:PromptSubscriptionPurchase(user: Player, subscriptionId: string)
```

- Tags: Capabilities: PromptExternalPurchase

Prompts a user to purchase a subscription for the given `subscriptionId`.

Parameters:

- `user`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) object to be prompted to subscribe.
- `subscriptionId`: The ID of the subscription to subscribe to.

### PromptThirdPartyPurchase

```luau
MarketplaceService:PromptThirdPartyPurchase(player: Instance, productId: string)
```

- Tags: Local user security

### PromptVIPServerPurchase

```luau
MarketplaceService:PromptVIPServerPurchase(player: Player)
```

- Tags: Capabilities: PromptExternalPurchase

### RankProductsAsync

```luau
MarketplaceService:RankProductsAsync(productIdentifiers: { any }): { any }
```

- Tags: Yields

Takes a list of product IDs and returns a personalized ordered list of those products.

Parameters:

- `productIdentifiers`: An array of objects identifying the products you want to rank. This array can include up to 50 items. Each `ProductIdentifier` has:

- `InfoType`: Enum.InfoType
- Must be either `InfoType.GamePass` or `InfoType.Product`.
- `Id`: number
- The ID of the game pass or developer product.

```luau
local ProductIdentifier = {     InfoType = Enum.InfoType.GamePass,     Id = 123456 }
```

Returns: The array of ranked items in a personalized order for the current user. Each array has:

- `ProductIdentifier`: The corresponding ID from the input array.
- `ProductInfo`: The standard product info dictionary returned by [`GetProductInfoAsync`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

### RecommendTopProductsAsync

```luau
MarketplaceService:RecommendTopProductsAsync(infoTypes: { any }): { any }
```

- Tags: Yields

- Takes an array of `InfoType` and returns up to 50 items representing the products a user is most likely to engage with and purchase.

Parameters:

- `infoTypes`: An array of `InfoType` values specifying the types of product to retrieve recommendations for. Supported `InfoTypes`: `InfoType.GamePass`, `InfoType.Product`.

```luau
local infoTypes = {     Enum.InfoType.GamePass,     Enum.InfoType.Product }
```

Returns: A ranked list of up to 50 items the user is most likely to engage with, based on the provided `InfoTypes`. If no recommendations can be determined, the method returns an empty list.

### RedeemGamePassFreeTrial

```luau
MarketplaceService:RedeemGamePassFreeTrial(user: Player, gamePassId: number, startTime: string, endTime: string)
```

- Tags: Roblox script security

### RefreshBulkPurchase

```luau
MarketplaceService:RefreshBulkPurchase(batchPurchaseAuthToken: string, options: { [string]: any }? = nil)
```

- Tags: Roblox script security

### ReportAssetSale

```luau
MarketplaceService:ReportAssetSale(assetId: string, robuxAmount: number)
```

- Tags: Roblox script security

### ReportRobuxUpsellStarted

```luau
MarketplaceService:ReportRobuxUpsellStarted()
```

- Tags: Roblox script security

### SignalAssetTypePurchased

```luau
MarketplaceService:SignalAssetTypePurchased(player: Instance, assetType: Enum.AssetType)
```

- Tags: Roblox script security

### SignalCheckPlayerHasRobloxSubscription

```luau
MarketplaceService:SignalCheckPlayerHasRobloxSubscription()
```

- Tags: Roblox script security

### SignalClientPurchaseSuccess

```luau
MarketplaceService:SignalClientPurchaseSuccess(ticket: string, playerId: number, productId: number)
```

- Tags: Roblox script security

### SignalMockPurchasePremium

```luau
MarketplaceService:SignalMockPurchasePremium()
```

- Tags: Roblox script security

### SignalMockPurchaseRobloxSubscription

```luau
MarketplaceService:SignalMockPurchaseRobloxSubscription()
```

- Tags: Roblox script security

### SignalPromptBulkPurchaseFinished

```luau
MarketplaceService:SignalPromptBulkPurchaseFinished(status: Enum.MarketplaceBulkPurchasePromptStatus, results: { [string]: any })
```

- Tags: Roblox script security

### SignalPromptBundlePurchaseFinished

```luau
MarketplaceService:SignalPromptBundlePurchaseFinished(player: Instance, bundleId: number, success: boolean)
```

- Tags: Roblox script security

### SignalPromptGamePassPurchaseFinished

```luau
MarketplaceService:SignalPromptGamePassPurchaseFinished(player: Instance, gamePassId: number, success: boolean)
```

- Tags: Roblox script security

### SignalPromptPremiumPurchaseFinished

```luau
MarketplaceService:SignalPromptPremiumPurchaseFinished(didTryPurchasing: boolean)
```

- Tags: Roblox script security

### SignalPromptProductPurchaseFinished

```luau
MarketplaceService:SignalPromptProductPurchaseFinished(userId: number, productId: number, success: boolean)
```

- Tags: Roblox script security

### SignalPromptPurchaseFinished

```luau
MarketplaceService:SignalPromptPurchaseFinished(player: Instance, assetId: number, success: boolean)
```

- Tags: Roblox script security

### SignalPromptRobloxSubscriptionPurchaseFinished

```luau
MarketplaceService:SignalPromptRobloxSubscriptionPurchaseFinished(subscriptionId: string, didTryPurchasing: boolean)
```

- Tags: Roblox script security

### SignalPromptSubscriptionPurchaseFinished

```luau
MarketplaceService:SignalPromptSubscriptionPurchaseFinished(subscriptionId: string, didTryPurchasing: boolean)
```

- Tags: Roblox script security

### SignalRobuxTransferCompleted

```luau
MarketplaceService:SignalRobuxTransferCompleted(userId: number)
```

- Tags: Roblox script security

### SignalServerLuaDialogClosed

```luau
MarketplaceService:SignalServerLuaDialogClosed(value: boolean)
```

- Tags: Roblox script security

### SignalUserSubscriptionStatusChanged

```luau
MarketplaceService:SignalUserSubscriptionStatusChanged(subscriptionId: string)
```

- Tags: Roblox script security

### UserOwnsGamePassAsync

```luau
MarketplaceService:UserOwnsGamePassAsync(userId: User, gamePassId: number): boolean
```

- Tags: Yields, Capabilities: AssetRead

Returns true if the player with the given `UserId` owns the pass with the given `gamePassId`.

Parameters:

- `userId`: The `UserId` of the [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose inventory you're checking.
- `gamePassId`: The pass ID you want to check for. Not to be confused with an asset ID.

Returns: Whether the user owns the pass.

### GetProductInfo

```luau
MarketplaceService:GetProductInfo(assetId: number, infoType: Enum.InfoType? = Enum.InfoType.Asset): { [string]: any }
```

- Tags: Deprecated, Yields, Capabilities: AssetRead
- Use instead: [`MarketplaceService.GetProductInfoAsync`](https://rapi.sleaze.dev/classes/MarketplaceService.md)

**Deprecated:** This method has been superseded by [`GetProductInfoAsync()`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

Returns the product information of an asset using its asset ID.

Parameters:

- `assetId`: The asset ID of the specified product.
- `infoType`: An `InfoType` enum value specifying the type of information being retrieved.

Returns: A dictionary containing information about the queried item, described in the previous tables.

### PlayerOwnsAsset

```luau
MarketplaceService:PlayerOwnsAsset(player: Instance, assetId: number): boolean
```

- Tags: Deprecated, Yields, Capabilities: AssetRead
- Use instead: [`MarketplaceService.PlayerOwnsAssetAsync`](https://rapi.sleaze.dev/classes/MarketplaceService.md)

**Deprecated:** This method has been superseded by [`PlayerOwnsAssetAsync()`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

Returns whether the given user has the given asset.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose inventory is tested for ownership of the given asset.
- `assetId`: The asset ID for which the given player's inventory is tested.

Returns: Indicates whether the given player's inventory contains the given asset.

### PlayerOwnsBundle

```luau
MarketplaceService:PlayerOwnsBundle(player: Player, bundleId: number): boolean
```

- Tags: Deprecated, Yields, Capabilities: AssetRead
- Use instead: [`MarketplaceService.PlayerOwnsBundleAsync`](https://rapi.sleaze.dev/classes/MarketplaceService.md)

**Deprecated:** This method has been superseded by [`PlayerOwnsBundleAsync()`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

Returns whether the given player owns the given bundle.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) whose inventory is tested for ownership of the given bundle.
- `bundleId`: The bundle ID for which the given player's inventory is tested.

Returns: Indicates whether the given player's inventory contains the given bundle.

### PromptPremiumPurchase

```luau
MarketplaceService:PromptPremiumPurchase(player: Instance)
```

- Tags: Deprecated, Capabilities: PromptExternalPurchase
- Use instead: [`MarketplaceService.PromptRobloxSubscriptionPurchase`](https://rapi.sleaze.dev/classes/MarketplaceService.md)

**Deprecated:** This method has been superseded by [`PromptRobloxSubscriptionPurchase()`](https://rapi.sleaze.dev/classes/MarketplaceService.md).

Prompts a user to purchase Roblox Premium.

Parameters:

- `player`: The user being prompted to purchase Premium.

## Events

### AssetTypePurchased

```luau
MarketplaceService.AssetTypePurchased: RBXScriptSignal<(player: Instance, assetType: Enum.AssetType)>
```

- Tags: Hidden, Roblox script security

### ClientLuaDialogRequested

```luau
MarketplaceService.ClientLuaDialogRequested: RBXScriptSignal<(...: any)>
```

- Tags: Roblox script security

### ClientPurchaseSuccess

```luau
MarketplaceService.ClientPurchaseSuccess: RBXScriptSignal<(ticket: string, playerId: number, productId: number)>
```

- Tags: Roblox script security

### ConfirmPlayerHasRobloxSubscription

```luau
MarketplaceService.ConfirmPlayerHasRobloxSubscription: RBXScriptSignal<()>
```

- Tags: Hidden, Roblox script security

### ConfirmPlayerMembership

```luau
MarketplaceService.ConfirmPlayerMembership: RBXScriptSignal<()>
```

- Tags: Hidden, Roblox script security

### ConfirmUserSubscriptionPurchase

```luau
MarketplaceService.ConfirmUserSubscriptionPurchase: RBXScriptSignal<(subscriptionId: string)>
```

- Tags: Hidden, Roblox engine security

### GamePassFreeTrialRedeemed

```luau
MarketplaceService.GamePassFreeTrialRedeemed: RBXScriptSignal<(player: Instance, gamePassId: number)>
```

- Tags: Roblox script security

### LuaDialogCallbackSignal

```luau
MarketplaceService.LuaDialogCallbackSignal: RBXScriptSignal<(value: boolean, player: Instance)>
```

- Tags: Hidden, Roblox script security

### MockConfirmUserSubscriptionPurchase

```luau
MarketplaceService.MockConfirmUserSubscriptionPurchase: RBXScriptSignal<(userId: number, subscriptionId: string)>
```

- Tags: Hidden, Roblox engine security

### MockPurchasePremium

```luau
MarketplaceService.MockPurchasePremium: RBXScriptSignal<()>
```

- Tags: Hidden, Roblox script security

### MockPurchaseRobloxSubscription

```luau
MarketplaceService.MockPurchaseRobloxSubscription: RBXScriptSignal<()>
```

- Tags: Hidden, Roblox script security

### NativePurchaseFinished

```luau
MarketplaceService.NativePurchaseFinished: RBXScriptSignal<(player: Instance, productId: string, wasPurchased: boolean)>
```

- Tags: Roblox script security

### NativePurchaseFinishedV2

```luau
MarketplaceService.NativePurchaseFinishedV2: RBXScriptSignal<(player: Instance, productId: string, wasPurchased: boolean, checkoutSessionId: string)>
```

- Tags: Roblox script security

### NativePurchaseFinishedWithLocalPlayer

```luau
MarketplaceService.NativePurchaseFinishedWithLocalPlayer: RBXScriptSignal<(productId: string, wasPurchased: boolean)>
```

- Tags: Roblox script security

### NativePurchaseFinishedWithLocalPlayerV2

```luau
MarketplaceService.NativePurchaseFinishedWithLocalPlayerV2: RBXScriptSignal<(productId: string, wasPurchased: boolean, checkoutSessionId: string)>
```

- Tags: Roblox script security

### OpenShopRequested

```luau
MarketplaceService.OpenShopRequested: RBXScriptSignal<(player: Player)>
```

- Tags: Roblox script security

### PrepareCollectiblesPurchaseRequested

```luau
MarketplaceService.PrepareCollectiblesPurchaseRequested: RBXScriptSignal<(player: Instance, assetId: number, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: number)>
```

- Tags: Roblox script security

### PromptBulkPurchaseFinished

```luau
MarketplaceService.PromptBulkPurchaseFinished: RBXScriptSignal<(player: Instance, status: Enum.MarketplaceBulkPurchasePromptStatus, results: { [string]: any })>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for bulk avatar items is closed.

### PromptBulkPurchaseRefreshed

```luau
MarketplaceService.PromptBulkPurchaseRefreshed: RBXScriptSignal<(player: Instance, status: Enum.MarketplaceBulkPurchasePromptStatus, response: { [string]: any })>
```

- Tags: Roblox script security

### PromptBulkPurchaseRequested

```luau
MarketplaceService.PromptBulkPurchaseRequested: RBXScriptSignal<(player: Instance, displayData: { any }, orderRequest: { [string]: any }, purchaserRobuxBalance: number, orderTotalRobux: number, options: { [string]: any })>
```

- Tags: Roblox script security

### PromptBulkPurchaseRequestedV2

```luau
MarketplaceService.PromptBulkPurchaseRequestedV2: RBXScriptSignal<(player: Instance, displayData: { any }, orderRequest: { [string]: any }, purchaserRobuxBalance: number, orderTotalRobux: number, options: { [string]: any }, discountInformation: { [string]: any })>
```

- Tags: Roblox script security

### PromptBulkPurchaseRequestedV3

```luau
MarketplaceService.PromptBulkPurchaseRequestedV3: RBXScriptSignal<(player: Instance, status: Enum.MarketplaceBulkPurchasePromptStatus, response: { [string]: any })>
```

- Tags: Roblox script security

### PromptBundlePurchaseFinished

```luau
MarketplaceService.PromptBundlePurchaseFinished: RBXScriptSignal<(player: Instance, bundleId: number, wasPurchased: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a bundle purchase prompt closes.

### PromptBundlePurchaseRequested

```luau
MarketplaceService.PromptBundlePurchaseRequested: RBXScriptSignal<(player: Instance, bundleId: number)>
```

- Tags: Roblox script security

### PromptCancelSubscriptionRequested

```luau
MarketplaceService.PromptCancelSubscriptionRequested: RBXScriptSignal<(subscriptionId: string)>
```

- Tags: Roblox script security

### PromptCollectibleBundlePurchaseRequested

```luau
MarketplaceService.PromptCollectibleBundlePurchaseRequested: RBXScriptSignal<(player: Instance, bundleId: number, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: number, idempotencyKey: string, purchaseAuthToken: string)>
```

- Tags: Roblox script security

### PromptCollectiblesPurchaseRequested

```luau
MarketplaceService.PromptCollectiblesPurchaseRequested: RBXScriptSignal<(player: Instance, assetId: number, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: number, idempotencyKey: string, purchaseAuthToken: string)>
```

- Tags: Roblox script security

### PromptGamePassPurchaseFinished

```luau
MarketplaceService.PromptGamePassPurchaseFinished: RBXScriptSignal<(player: Instance, gamePassId: number, wasPurchased: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for a pass is closed.

### PromptGamePassPurchaseRequested

```luau
MarketplaceService.PromptGamePassPurchaseRequested: RBXScriptSignal<(player: Instance, gamePassId: number)>
```

- Tags: Roblox script security

### PromptNativePurchaseRequested

```luau
MarketplaceService.PromptNativePurchaseRequested: RBXScriptSignal<(player: Instance, productId: string)>
```

- Tags: Hidden, Roblox engine security

### PromptNativePurchaseRequestedWithLocalPlayer

```luau
MarketplaceService.PromptNativePurchaseRequestedWithLocalPlayer: RBXScriptSignal<(userId: number, productId: string)>
```

- Tags: Hidden, Roblox engine security

### PromptNativePurchaseRequestedWithLocalPlayerWithPaymentSessionId

```luau
MarketplaceService.PromptNativePurchaseRequestedWithLocalPlayerWithPaymentSessionId: RBXScriptSignal<(userId: number, productId: string, paymentSessionId: string)>
```

- Tags: Hidden, Roblox engine security

### PromptNativePurchaseRequestedWithPaymentSessionId

```luau
MarketplaceService.PromptNativePurchaseRequestedWithPaymentSessionId: RBXScriptSignal<(player: Instance, productId: string, paymentSessionId: string)>
```

- Tags: Hidden, Roblox engine security

### PromptPremiumPurchaseFinished

```luau
MarketplaceService.PromptPremiumPurchaseFinished: RBXScriptSignal<()>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for Roblox Premium is closed.

### PromptPremiumPurchaseRequested

```luau
MarketplaceService.PromptPremiumPurchaseRequested: RBXScriptSignal<(player: Instance)>
```

- Tags: Roblox script security

### PromptProductPurchaseFinished

```luau
MarketplaceService.PromptProductPurchaseFinished: RBXScriptSignal<(userId: number, productId: number, isPurchased: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for a developer product is closed. Do not use this event to process purchases.

### PromptProductPurchaseRequested

```luau
MarketplaceService.PromptProductPurchaseRequested: RBXScriptSignal<(player: Instance, productId: number, equipIfPurchased: boolean, currencyType: Enum.CurrencyType)>
```

- Tags: Roblox script security

### PromptPurchaseFinished

```luau
MarketplaceService.PromptPurchaseFinished: RBXScriptSignal<(player: Instance, assetId: number, isPurchased: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for an affiliate gear sale or other asset is closed. Does **not** fire for developer product or pass prompts.

### PromptPurchaseRequested

```luau
MarketplaceService.PromptPurchaseRequested: RBXScriptSignal<(player: Instance, assetId: number, equipIfPurchased: boolean, currencyType: Enum.CurrencyType)>
```

- Tags: Roblox script security

### PromptPurchaseRequestedV2

```luau
MarketplaceService.PromptPurchaseRequestedV2: RBXScriptSignal<(player: Instance, assetId: number, equipIfPurchased: boolean, currencyType: Enum.CurrencyType, idempotencyKey: string, purchaseAuthToken: string)>
```

- Tags: Roblox script security

### PromptRobloxPurchaseRequested

```luau
MarketplaceService.PromptRobloxPurchaseRequested: RBXScriptSignal<(assetId: number, equipIfPurchased: boolean)>
```

- Tags: Roblox script security

### PromptRobloxSubscriptionPurchaseFinished

```luau
MarketplaceService.PromptRobloxSubscriptionPurchaseFinished: RBXScriptSignal<(user: Player, didTryPurchasing: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for Roblox Plus is closed.

### PromptRobloxSubscriptionPurchaseRequested

```luau
MarketplaceService.PromptRobloxSubscriptionPurchaseRequested: RBXScriptSignal<()>
```

- Tags: Roblox script security

### PromptRobuxTransferRequested

```luau
MarketplaceService.PromptRobuxTransferRequested: RBXScriptSignal<(player: Instance, jsonResponse: string)>
```

- Tags: Roblox script security

### PromptRobuxTransferSubscriptionUpsellRequested

```luau
MarketplaceService.PromptRobuxTransferSubscriptionUpsellRequested: RBXScriptSignal<()>
```

- Tags: Roblox script security

### PromptSubscriptionPurchaseFinished

```luau
MarketplaceService.PromptSubscriptionPurchaseFinished: RBXScriptSignal<(user: Player, subscriptionId: string, didTryPurchasing: boolean)>
```

- Tags: Capabilities: PromptExternalPurchase

Fires when a purchase prompt for a subscription is closed.

### PromptSubscriptionPurchaseRequested

```luau
MarketplaceService.PromptSubscriptionPurchaseRequested: RBXScriptSignal<(subscriptionId: string)>
```

- Tags: Roblox script security

### PromptThirdPartyPurchaseRequested

```luau
MarketplaceService.PromptThirdPartyPurchaseRequested: RBXScriptSignal<(player: Instance, productId: string)>
```

- Tags: Hidden, Roblox engine security

### PromptVIPServerPurchaseRequested

```luau
MarketplaceService.PromptVIPServerPurchaseRequested: RBXScriptSignal<()>
```

- Tags: Roblox script security

### RefreshBulkPurchaseRequested

```luau
MarketplaceService.RefreshBulkPurchaseRequested: RBXScriptSignal<(playerId: number, batchPurchaseAuthToken: string, options: { [string]: any })>
```

- Tags: Roblox script security

### RobuxTransferCompleted

```luau
MarketplaceService.RobuxTransferCompleted: RBXScriptSignal<(userId: number)>
```

- Tags: Roblox script security

### ServerPurchaseVerification

```luau
MarketplaceService.ServerPurchaseVerification: RBXScriptSignal<(serverResponseTable: { [string]: any })>
```

- Tags: Roblox script security

### ThirdPartyPurchaseFinished

```luau
MarketplaceService.ThirdPartyPurchaseFinished: RBXScriptSignal<(player: Instance, productId: string, receipt: string, wasPurchased: boolean)>
```

- Tags: Local user security

### UserSubscriptionStatusChanged

```luau
MarketplaceService.UserSubscriptionStatusChanged: RBXScriptSignal<(subscriptionId: string)>
```

- Tags: Roblox script security

## Callbacks

### ProcessReceipt

```luau
MarketplaceService.ProcessReceipt: (receiptInfo: { [string]: any }) -> Enum.ProductPurchaseDecision
```

- Tags: Capabilities: Monetization

A callback to process receipts of developer product purchases.

Parameters:

- `receiptInfo`: The `receiptInfo` table passed to this callback contains the following data:

- `PurchaseId` — A unique identifier for the specific purchase.
- `PlayerId` — The user ID of the user who made the purchase.
- `ProductId` — The ID of the purchased product.
- `PlaceIdWherePurchased` — The place ID in which the purchase was made. Depending on where the user is during gameplay, the purchase place's ID can be the same as or different from the current place's ID.
- `CurrencySpent` — The amount of currency spent in the transaction.
- `CurrencyType` — The type of currency spent in the purchase; always `CurrencyType.Robux`.
- `ProductPurchaseChannel` — How the user acquired the developer product. One of `ProductPurchaseChannel`.

Returns: An enum that represents how the developer product receipt was processed.

- `PurchaseGranted`:
- Indicates that the experience successfully granted the player the developer product.
- Indicates to Roblox that the developer product sale was successful.
- `NotProcessedYet`:
- Indicates that the experience failed to grant the player the developer product.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
