MarketplaceService
The service responsible for in-experience transactions.
Memory category | Instances |
---|
Member index 85
Removed member index 10
History | Member | |
---|---|---|
396 | GetSubscriptionStatus(player: Instance, subscriptionId: int64): Dictionary | |
589 | IsPlayerSubscribed(player: Instance, subscriptionId: int64): bool | |
589 | PromptSubscriptionCancellation(player: Instance, subscriptionId: int64): null | |
158 | SetDevProductInfoUrl(url: string): void | |
158 | SetPlayerOwnsAssetUrl(url: string): void | |
158 | SetProductInfoUrl(url: string): void | |
589 | SignalPromptSubscriptionCancellationFinished(player: Instance, subscriptionId: int64, wasCanceled: bool): null | |
589 | PromptSubscriptionCancellationFinished(player: Instance, subscriptionId: int64, wasCanceled: bool) | |
589 | PromptSubscriptionCancellationRequested(player: Instance, subscriptionId: int64) |
Description
MarketplaceService is responsible for in-experience transactions. The most notable methods are PromptProductPurchase and PromptPurchase, as well as the callback ProcessReceipt which must be defined so that transactions do not fail.
MarketplaceService also has methods that fetch information about developer products (GetProductInfo and GetDeveloperProductsAsync), passes (UserOwnsGamePassAsync), and other assets (PlayerOwnsAsset, PlayerOwnsBundle).
Understanding MarketplaceService is the first step towards learning to monetize an experience on Roblox, as well as DataStoreService which is responsible for saving and loading data related to purchases.
History 242
- 640 Add GetDeveloperProductsForExperienceDetailsPageAsync
- 639 Add UserSubscriptionStatusChanged
- 639 Add SignalUserSubscriptionStatusChanged
- 639 Add PerformCancelSubscription
- 636 Add PromptCancelSubscriptionRequested
- 636 Add PromptCancelSubscription
- 636 Add GetUserSubscriptionDetailsInternalAsync
- 625 Add PromptBulkPurchaseRequested
- 625 Add PromptBulkPurchaseFinished
- 625 Add SignalPromptBulkPurchaseFinished
- 625 Add PromptBulkPurchase
- 625 Add PerformBulkPurchase
- 618 Add PromptCollectibleBundlePurchaseRequested
- 618 Add PerformSubscriptionPurchaseV2
- 614 Add GetUserSubscriptionDetailsAsync
- 599 Add
- 597 Add PerformSubscriptionPurchase
- 593 Add GetUserSubscriptionStatusAsync
- 593 Add GetUserSubscriptionPaymentHistoryAsync
- 593 Add GetSubscriptionProductInfoAsync
- 592 Change Security of PromptSubscriptionPurchaseFinished from RobloxScriptSecurity to None
- 592 Change Security of SignalPromptSubscriptionPurchaseFinished from None to RobloxScriptSecurity
- 590 Change Parameters of PromptSubscriptionPurchaseRequested from (user: Instance, subscriptionId: string) to (subscriptionId: string)
- 590 Add PromptSubscriptionPurchaseFinished
- 590 Add
- 590 Add SignalPromptSubscriptionPurchaseFinished
- 590 Remove PromptSubscriptionPurchaseFinished
- 590 Add PromptSubscriptionPurchase
- 589 Change Parameters of PromptSubscriptionPurchaseRequested from (player: Instance, subscriptionId: int64) to (user: Instance, subscriptionId: string)
- 589 Remove PromptSubscriptionPurchaseFinished
- 589 Remove PromptSubscriptionCancellationRequested
- 589 Remove PromptSubscriptionCancellationFinished
- 589 Remove
- 589 Remove SignalPromptSubscriptionPurchaseFinished
- 589 Remove SignalPromptSubscriptionCancellationFinished
- 589 Add PromptSubscriptionPurchaseFinished
- 589 Remove PromptSubscriptionPurchase
- 589 Remove PromptSubscriptionCancellation
- 589 Remove IsPlayerSubscribed
- 589 Add GetSubscriptionPurchaseInfoAsync
- 588 Change Parameters of PromptCollectiblesPurchaseRequested from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int, idempotencyKey: string, purchaseAuthToken: string) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int, idempotencyKey: string, purchaseAuthToken: string)
- 588 Change Parameters of PrepareCollectiblesPurchaseRequested from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 588 Change Parameters of PromptCollectiblesPurchase from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 588 Change Parameters of PrepareCollectiblesPurchase from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 587 Change Tags of PromptSubscriptionPurchaseFinished from [] to [Deprecated]
- 587 Change Tags of PromptSubscriptionCancellationFinished from [] to [Deprecated]
- 587 Add PromptCollectiblesPurchaseRequested
- 587 Add PrepareCollectiblesPurchaseRequested
- 587 Change Tags of PromptSubscriptionPurchase from [] to [Deprecated]
- 587 Change Tags of PromptSubscriptionCancellation from [] to [Deprecated]
- 587 Add PromptCollectiblesPurchase
- 587 Add PrepareCollectiblesPurchase
- 587 Add PerformPurchaseV2
- 587 Change Tags of IsPlayerSubscribed from [Yields] to [Yields, Deprecated]
- 580 Add PromptPurchaseRequestedV2
- 580 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = ) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = , purchaseAuthToken: string = )
- 573 Change ReturnType of SignalServerLuaDialogClosed from void to null
- 573 Change ReturnType of SignalPromptSubscriptionPurchaseFinished from void to null
- 573 Change ReturnType of SignalPromptSubscriptionCancellationFinished from void to null
- 573 Change ReturnType of SignalPromptPurchaseFinished from void to null
- 573 Change ReturnType of SignalPromptProductPurchaseFinished from void to null
- 573 Change ReturnType of SignalPromptPremiumPurchaseFinished from void to null
- 573 Change ReturnType of SignalPromptGamePassPurchaseFinished from void to null
- 573 Change ReturnType of SignalPromptBundlePurchaseFinished from void to null
- 573 Change ReturnType of SignalMockPurchasePremium from void to null
- 573 Change ReturnType of SignalClientPurchaseSuccess from void to null
- 573 Change ReturnType of SignalAssetTypePurchased from void to null
- 573 Change ReturnType of ReportRobuxUpsellStarted from void to null
- 573 Change ReturnType of ReportAssetSale from void to null
- 573 Change ReturnType of PromptThirdPartyPurchase from void to null
- 573 Change ReturnType of PromptSubscriptionPurchase from void to null
- 573 Change ReturnType of PromptSubscriptionCancellation from void to null
- 573 Change ReturnType of PromptRobloxPurchase from void to null
- 573 Change ReturnType of PromptPurchase from void to null
- 573 Change ReturnType of PromptProductPurchase from void to null
- 573 Change ReturnType of PromptPremiumPurchase from void to null
- 573 Change ReturnType of PromptNativePurchaseWithLocalPlayer from void to null
- 573 Change ReturnType of PromptNativePurchase from void to null
- 573 Change ReturnType of PromptGamePassPurchase from void to null
- 573 Change ReturnType of PromptBundlePurchase from void to null
- 570 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = )
- 557 Change Tags of PromptProductPurchaseFinished from [Deprecated] to []
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 546 Add NativePurchaseFinishedWithLocalPlayer
- 546 Add PromptNativePurchaseWithLocalPlayer
- 529 Add PlayerOwnsBundle
- 462 Change ThreadSafety of ProcessReceipt from to Unsafe
- 462 Change ThreadSafety of ThirdPartyPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of ServerPurchaseVerification from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionCancellationRequested from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionCancellationFinished from to Unsafe
- 462 Change ThreadSafety of PromptRobloxPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of PromptProductPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptProductPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of PromptPremiumPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptPremiumPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of PromptGamePassPurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptGamePassPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of PromptBundlePurchaseRequested from to Unsafe
- 462 Change ThreadSafety of PromptBundlePurchaseFinished from to Unsafe
- 462 Change ThreadSafety of NativePurchaseFinished from to Unsafe
- 462 Change ThreadSafety of ClientPurchaseSuccess from to Unsafe
- 462 Change ThreadSafety of ClientLuaDialogRequested from to Unsafe
- 462 Change ThreadSafety of UserOwnsGamePassAsync from to Unsafe
- 462 Change ThreadSafety of SignalServerLuaDialogClosed from to Unsafe
- 462 Change ThreadSafety of SignalPromptSubscriptionPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptSubscriptionCancellationFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptProductPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptPremiumPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptGamePassPurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalPromptBundlePurchaseFinished from to Unsafe
- 462 Change ThreadSafety of SignalMockPurchasePremium from to Unsafe
- 462 Change ThreadSafety of SignalClientPurchaseSuccess from to Unsafe
- 462 Change ThreadSafety of SignalAssetTypePurchased from to Unsafe
- 462 Change ThreadSafety of ReportRobuxUpsellStarted from to Unsafe
- 462 Change ThreadSafety of ReportAssetSale from to Unsafe
- 462 Change ThreadSafety of PromptThirdPartyPurchase from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionPurchase from to Unsafe
- 462 Change ThreadSafety of PromptSubscriptionCancellation from to Unsafe
- 462 Change ThreadSafety of PromptRobloxPurchase from to Unsafe
- 462 Change ThreadSafety of PromptPurchase from to Unsafe
- 462 Change ThreadSafety of PromptProductPurchase from to Unsafe
- 462 Change ThreadSafety of PromptPremiumPurchase from to Unsafe
- 462 Change ThreadSafety of PromptNativePurchase from to Unsafe
- 462 Change ThreadSafety of PromptGamePassPurchase from to Unsafe
- 462 Change ThreadSafety of PromptBundlePurchase from to Unsafe
- 462 Change ThreadSafety of PlayerOwnsAsset from to Unsafe
- 462 Change ThreadSafety of PlayerCanMakePurchases from to Unsafe
- 462 Change ThreadSafety of PerformPurchase from to Unsafe
- 462 Change ThreadSafety of IsPlayerSubscribed from to Unsafe
- 462 Change ThreadSafety of GetRobuxBalance from to Unsafe
- 462 Change ThreadSafety of GetProductInfo from to Unsafe
- 462 Change ThreadSafety of GetDeveloperProductsAsync from to Unsafe
- 455 Change Security of PromptBundlePurchaseFinished from RobloxScriptSecurity to None
- 455 Change Security of PromptBundlePurchase from RobloxScriptSecurity to None
- 424 Add PromptRobloxPurchaseRequested
- 424 Add PromptRobloxPurchase
- 424 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool)
- 416 Add PromptPremiumPurchaseRequested
- 416 Add PromptPremiumPurchaseFinished
- 416 Add SignalPromptPremiumPurchaseFinished
- 416 Add SignalMockPurchasePremium
- 416 Add PromptPremiumPurchase
- 396 Add IsPlayerSubscribed
- 396 Remove GetSubscriptionStatus
- 394 Add PromptBundlePurchaseFinished
- 394 Add SignalPromptBundlePurchaseFinished
- 393 Add PromptSubscriptionPurchaseRequested
- 393 Add PromptSubscriptionPurchaseFinished
- 393 Add PromptSubscriptionCancellationRequested
- 393 Add PromptSubscriptionCancellationFinished
- 393 Add SignalPromptSubscriptionPurchaseFinished
- 393 Add SignalPromptSubscriptionCancellationFinished
- 393 Add PromptSubscriptionPurchase
- 393 Add PromptSubscriptionCancellation
- 393 Add GetSubscriptionStatus
- 384 Add PromptBundlePurchaseRequested
- 384 Add SignalAssetTypePurchased
- 384 Add PromptBundlePurchase
- 329 Add UserOwnsGamePassAsync
- 320 Change Parameters of PromptPurchaseRequested from (player: Instance, assetId: int, equipIfPurchased: bool, currencyType: CurrencyType) to (player: Instance, assetId: int64, equipIfPurchased: bool, currencyType: CurrencyType)
- 320 Change Parameters of PromptPurchaseFinished from (player: Instance, assetId: int, isPurchased: bool) to (player: Instance, assetId: int64, isPurchased: bool)
- 320 Change Parameters of PromptProductPurchaseRequested from (player: Instance, productId: int, equipIfPurchased: bool, currencyType: CurrencyType) to (player: Instance, productId: int64, equipIfPurchased: bool, currencyType: CurrencyType)
- 320 Change Parameters of PromptProductPurchaseFinished from (userId: int, productId: int, isPurchased: bool) to (userId: int64, productId: int64, isPurchased: bool)
- 320 Change Parameters of PromptGamePassPurchaseRequested from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 320 Change Parameters of PromptGamePassPurchaseFinished from (player: Instance, gamePassId: int, wasPurchased: bool) to (player: Instance, gamePassId: int64, wasPurchased: bool)
- 320 Change Parameters of ClientPurchaseSuccess from (ticket: string, playerId: int, productId: int) to (ticket: string, playerId: int64, productId: int64)
- 320 Change Parameters of SignalPromptPurchaseFinished from (player: Instance, assetId: int, success: bool) to (player: Instance, assetId: int64, success: bool)
- 320 Change Parameters of SignalPromptProductPurchaseFinished from (userId: int, productId: int, success: bool) to (userId: int64, productId: int64, success: bool)
- 320 Change Parameters of SignalPromptGamePassPurchaseFinished from (player: Instance, gamePassId: int, success: bool) to (player: Instance, gamePassId: int64, success: bool)
- 320 Change Parameters of SignalClientPurchaseSuccess from (ticket: string, playerId: int, productId: int) to (ticket: string, playerId: int64, productId: int64)
- 320 Change Parameters of PromptPurchase from (player: Instance, assetId: int, equipIfPurchased: bool = true, currencyType: CurrencyType = Default) to (player: Instance, assetId: int64, equipIfPurchased: bool = true, currencyType: CurrencyType = Default)
- 320 Change Parameters of PromptProductPurchase from (player: Instance, productId: int, equipIfPurchased: bool = true, currencyType: CurrencyType = Default) to (player: Instance, productId: int64, equipIfPurchased: bool = true, currencyType: CurrencyType = Default)
- 320 Change Parameters of PromptGamePassPurchase from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 320 Change Parameters of PlayerOwnsAsset from (player: Instance, assetId: int) to (player: Instance, assetId: int64)
- 320 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int, expectedPrice: int, requestId: string) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string)
- 320 Change Parameters of GetProductInfo from (assetId: int, infoType: InfoType = Asset) to (assetId: int64, infoType: InfoType = Asset)
- 311 Change Security of ThirdPartyPurchaseFinished from RobloxPlaceSecurity to LocalUserSecurity
- 311 Change Security of PromptThirdPartyPurchase from RobloxPlaceSecurity to LocalUserSecurity
- 302 Add PromptGamePassPurchaseRequested
- 302 Add PromptGamePassPurchaseFinished
- 302 Add SignalPromptGamePassPurchaseFinished
- 302 Add PromptGamePassPurchase
- 301 Remove PromptGamePassPurchaseRequested
- 301 Remove PromptGamePassPurchaseFinished
- 301 Remove SignalPromptGamePassPurchaseFinished
- 301 Remove PromptGamePassPurchase
- 302 Add PromptGamePassPurchaseRequested
- 302 Add PromptGamePassPurchaseFinished
- 302 Add SignalPromptGamePassPurchaseFinished
- 302 Add PromptGamePassPurchase
- 250 Add PlayerCanMakePurchases
- 250 Add PerformPurchase
- 250 Add GetRobuxBalance
- 238 Add ReportAssetSale
- 237 Add ReportRobuxUpsellStarted
- 158 Remove SetProductInfoUrl
- 158 Remove SetPlayerOwnsAssetUrl
- 158 Remove SetDevProductInfoUrl
- 156 Add NativePurchaseFinished
- 156 Add PromptNativePurchase
- 155 Add GetDeveloperProductsAsync
- 150 Add ThirdPartyPurchaseFinished
- 150 Add PromptThirdPartyPurchase
- 139 Change Parameters of ProcessReceipt from (receiptInfo: Variant) to (receiptInfo: Dictionary)
- 139 Change Tags of PromptProductPurchaseFinished from [] to [Deprecated]
- 138 Add ProcessReceipt
- 138 Add ClientLuaDialogRequested
- 138 Add SignalServerLuaDialogClosed
- 131 Add SetDevProductInfoUrl
- 131 Change Parameters of GetProductInfo from (assetId: int) to (assetId: int, infoType: InfoType = Asset)
- 125 Add ServerPurchaseVerification
- 125 Add PromptProductPurchaseRequested
- 125 Add PromptProductPurchaseFinished
- 125 Add ClientPurchaseSuccess
- 125 Add SignalPromptProductPurchaseFinished
- 125 Add SignalClientPurchaseSuccess
- 125 Add PromptProductPurchase
- 101 Change ReturnType of GetProductInfo from string to Dictionary
- 86 Change Security of SetProductInfoUrl from RobloxSecurity to LocalUserSecurity
- 86 Change Security of SetPlayerOwnsAssetUrl from RobloxSecurity to LocalUserSecurity
- 83 Add PromptPurchaseRequested
- 83 Add PromptPurchaseFinished
- 83 Add SignalPromptPurchaseFinished
- 83 Add SetProductInfoUrl
- 83 Add SetPlayerOwnsAssetUrl
- 83 Add PromptPurchase
- 83 Add PlayerOwnsAsset
- 83 Add GetProductInfo
- 83 Add MarketplaceService
Members 85
ClientLuaDialogRequested
Parameters (1) | |
---|---|
arguments | Tuple |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of ClientLuaDialogRequested from to Unsafe
- 138 Add ClientLuaDialogRequested
ClientPurchaseSuccess
Parameters (3) | |
---|---|
ticket | string |
playerId | int64 |
productId | int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 462 Change ThreadSafety of ClientPurchaseSuccess from to Unsafe
- 320 Change Parameters of ClientPurchaseSuccess from (ticket: string, playerId: int, productId: int) to (ticket: string, playerId: int64, productId: int64)
- 125 Add ClientPurchaseSuccess
GetDeveloperProductsAsync
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instance |
Returns a Pages object which contains information for all of the current experience's developer products.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of GetDeveloperProductsAsync from to Unsafe
- 155 Add GetDeveloperProductsAsync
GetDeveloperProductsForExperienceDetailsPageAsync
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instance |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetProductInfo
Parameters (2) | Default | |
---|---|---|
assetId | int64 | |
infoType | InfoType | Asset |
Returns (1) | ||
Dictionary |
This method provides information about an asset, developer product, or pass given its asset ID and the InfoType. If no such item exists with the given ID, this method will throw an error. Information about the queried item is provided in a dictionary with the following keys. Note that not all information is provided or necessarily relevant for the kind of product you're querying.
Key | Type | Description |
---|---|---|
Name | string | The name shown on the asset's page. |
Description | string | The description as shown on the asset's page; can be nil if blank. |
PriceInRobux | number | The cost of purchasing the asset using Robux. |
Created | string | Timestamp of when the asset was created, for example 2022-01-02T10:30:45Z . Formatted using ISO 8601. |
Updated | string | Timestamp of when the asset was last updated by its creator, for example 2022-02-12T11:22:15Z . Formatted using ISO 8601. |
ContentRatingTypeId | number | Indicates whether the item is marked as 13+ in catalog. |
MinimumMembershipLevel | number | The minimum subscription level necessary to purchase the item. |
IsPublicDomain | boolean | Describes whether the asset can be taken for free. |
Creator Information
Key | Type | Description |
---|---|---|
Creator | table | Dictionary table of information describing the creator of the asset (see following lines). |
Creator.CreatorType | string | Either User or Group . |
Creator.CreatorTargetId | number | The ID of the creator user or group. |
Creator.HasVerifiedBadge | boolean | Whether the creator has a verified badge. |
Creator.Name | string | The name/username of the creator. |
Creator.Id | number | Use Creator.CreatorTargetId instead. |
Asset Information
Key | Type | Description |
---|---|---|
AssetId | number | If InfoType was Asset, the ID of the given asset. |
AssetTypeId | number | The type of asset. See AssetType for the asset type ID numbers. |
IsForSale | boolean | Describes whether the asset is purchasable. |
IsLimited | boolean | Describes whether the asset is a Roblox Limited that is no longer (if ever) sold. |
IsLimitedUnique | boolean | Describes whether the asset is a unique Roblox Limited ("Limited U") item that only has a fixed number sold. |
IsNew | boolean | Describes whether the asset is marked as "new" in the catalog. |
Remaining | number | The remaining number of items a limited unique item may be sold. |
Sales | number | The number of items the asset has been sold. |
SaleAvailabilityLocations | table | The item's ProductLocationRestriction or sale location setting. |
CanBeSoldInThisGame | boolean | Describes whether the asset is purchasable in the current experience. |
Developer Products and Passes
Key | Type | Description |
---|---|---|
ProductId | number | If InfoType was Product, the product ID. |
IconImageAssetId | number | The asset ID of the product/pass icon, or 0 if there isn't one. |
Thread safety | Unsafe |
---|
History 5
- 462 Change ThreadSafety of GetProductInfo from to Unsafe
- 320 Change Parameters of GetProductInfo from (assetId: int, infoType: InfoType = Asset) to (assetId: int64, infoType: InfoType = Asset)
- 131 Change Parameters of GetProductInfo from (assetId: int) to (assetId: int, infoType: InfoType = Asset)
- 101 Change ReturnType of GetProductInfo from string to Dictionary
- 83 Add GetProductInfo
GetRobuxBalance
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
int |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of GetRobuxBalance from to Unsafe
- 250 Add GetRobuxBalance
GetSubscriptionProductInfoAsync
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
Dictionary |
Note: Because it returns a localized price, you can only call this method from a Script with RunContext.Client.
Returns the product information of a subscription for the given
subscriptionId
.
Key | Type | Description |
---|---|---|
Name | string | The name of the subscription product. |
Description | string | The description of the subscription product. |
IconImageAssetId | number | The asset ID of the subscription product icon. |
SubscriptionPeriod | SubscriptionPeriod | The duration of the subscription (for example, Month , Year , etc.). |
DisplayPrice | string | Localized price with the appropriate currency symbol for display (for example, $4.99 ). For users in unsupported countries, DisplayPrice returns a string without specific price information. |
DisplaySubscriptionPeriod | string | Localized subscription period text for display (for example, /month ). Can be used together with DisplayPrice . |
SubscriptionProviderName | string | Name of the subscription benefit provider (for example, the name of the associated experience). |
IsForSale | boolean | True if the subscription product is available for sale. |
PriceTier | number | A number that can be used to compare the price of different subscription products. This is not the actual price of the subscription (for example, 499). |
Thread safety | Unsafe |
---|
History 1
GetSubscriptionPurchaseInfoAsync
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetUserSubscriptionDetailsAsync
Parameters (2) | ||
---|---|---|
user | Player | |
subscriptionId | string | |
Returns (1) | ||
Dictionary |
Returns a dictionary table containing the details of the user's
subscription for the given subscriptionId
. The table contains the
following keys:
Key | Type | Description |
---|---|---|
SubscriptionState | SubscriptionState | Current state of this particular subscription. |
NextRenewTime | DateTime | Renewal time for this current subscription. May be in the past if the subscription is in
SubscribedRenewalPaymentPending state. This
field is will be nil if the subscription will not renew, is Expired, or the user never subscribed. |
ExpireTime | DateTime | When this subscription expires. This field will be nil
if the subscription is not cancelled or the user never subscribed. |
ExpirationDetails | table | Table containing the details of the subscription expiration. This
field will be nil if the subscription is not in the
Expired state. If populated, the table contains a ExpirationReason key of type SubscriptionExpirationReason describing why the subscription is expired. |
Note that this method can only be called from a Script with
RunContext of
Server. If you only need to determine the
IsSubscribed
status of a user, it's recommended to use
GetUserSubscriptionStatusAsync()
as it is faster and more efficient for that particular purpose.
Thread safety | Unsafe |
---|
History 1
GetUserSubscriptionDetailsInternalAsync
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetUserSubscriptionPaymentHistoryAsync
Parameters (2) | ||
---|---|---|
user | Player | |
subscriptionId | string | |
Returns (1) | ||
Array |
Note: You can only call this method from a Script with RunContext.Server.
Returns an Array that contains up to one year of the
user's subscription payment history for the given subscriptionId
, sorted
from the most recent status to the least recent.
Each entry in the payment history Array contains the following keys:
Key | Type | Description |
---|---|---|
CycleStartTime | DateTime | DateTime at the start of this particular subscription period. |
CycleEndTime | DateTime | DateTime at the end of this particular subscription period. |
PaymentStatus | SubscriptionPaymentStatus | SubscriptionPaymentStatus.Paid if the user paid for this particular subscription period. SubscriptionPaymentStatus.Refunded if the user refunded this particular subscription period. |
Payment History Length
Only creators affiliated with the subscription product can access up to one year worth of the user's subscription payment history. Non-associated creators can only get the user's current subscription payment status or an empty Array if the user has no active subscription.
Grace Period
Subscription renewal payments can have some processing time. Payment
history doesn't return a table for this period. However, in order to
preserve a user's subscription experience during the processing period,
GetUserSubscriptionStatusAsync()
returns IsSubscribed: true
for the given user. Don't grant durable items
or currency type subscription benefits to the user until after payment has
been confirmed for the current cycle.
For example, on August 31, 2023, User A's Subscription B is up for renewal. On September 1, 2023, the payment has yet to be processed. If you call GetUserSubscriptionPaymentHistoryAsync() on September 1, 2023 on User A for Subscription B, the first entry of the return value is:
Key | Value |
---|---|
CycleStartTime | ... |
CycleEndTime | August 31, 2023 |
PaymentStatus | SubscriptionPaymentStatus.Paid |
Note that since the user is within the grace period, the cycle they have yet to pay for (September 1, 2023) does not appear in the return value at all. This field only populates after the payment has been received and processed.
At the same time, GetUserSubscriptionStatusAsync returns the following result until the renewal payment process fails or the user cancels:
Key | Return |
---|---|
IsSubscribed | True |
IsRenewing | True |
Thread safety | Unsafe |
---|
History 1
GetUserSubscriptionStatusAsync
Parameters (2) | ||
---|---|---|
user | Player | |
subscriptionId | string | |
Returns (1) | ||
Dictionary |
Returns a table that contains the subscription status of the
user for the given subscriptionId
. The table contains the following
keys:
Key | Type | Description |
---|---|---|
IsSubscribed | boolean | True if the user's subscription is active. |
IsRenewing | boolean | True if the user is set to renew this subscription after the current subscription period ends. |
Note that IsSubscribed
will be true
only when a user has purchased the
subscription and the payment has been successfully processed. If the
payment for a user's initial subscription purchase is still processing or
has failed, IsSubscribed
returns false
. To understand when a user's
subscription status has changed, see the
Players.UserSubscriptionStatusChanged event.
Thread safety | Unsafe |
---|
History 1
NativePurchaseFinished
Parameters (3) | |
---|---|
player | Instance |
productId | string |
wasPurchased | bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of NativePurchaseFinished from to Unsafe
- 156 Add NativePurchaseFinished
NativePurchaseFinishedWithLocalPlayer
Parameters (2) | |
---|---|
productId | string |
wasPurchased | bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PerformBulkPurchase
Parameters (2) | ||
---|---|---|
orderRequest | Dictionary | |
options | Dictionary | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PerformCancelSubscription
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PerformPurchase
Parameters (9) | Default | |
---|---|---|
infoType | InfoType | |
productId | int64 | |
expectedPrice | int | |
requestId | string | |
isRobloxPurchase | bool | |
collectibleItemId | string | |
collectibleProductId | string | |
idempotencyKey | string | |
purchaseAuthToken | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 6
- 580 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = ) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = , purchaseAuthToken: string = )
- 570 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool, collectibleItemId: string = , collectibleProductId: string = , idempotencyKey: string = )
- 462 Change ThreadSafety of PerformPurchase from to Unsafe
- 424 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string, isRobloxPurchase: bool)
- 320 Change Parameters of PerformPurchase from (infoType: InfoType, productId: int, expectedPrice: int, requestId: string) to (infoType: InfoType, productId: int64, expectedPrice: int, requestId: string)
- 250 Add PerformPurchase
PerformPurchaseV2
Parameters (6) | ||
---|---|---|
infoType | InfoType | |
productId | int64 | |
expectedPrice | int | |
requestId | string | |
isRobloxPurchase | bool | |
collectiblesProductDetails | Dictionary | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 587 Add PerformPurchaseV2
PerformSubscriptionPurchase
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PerformSubscriptionPurchaseV2
Parameters (2) | ||
---|---|---|
subscriptionId | string | |
paymentProvider | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PlayerCanMakePurchases
Parameters (1) | ||
---|---|---|
player | Instance | |
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of PlayerCanMakePurchases from to Unsafe
- 250 Add PlayerCanMakePurchases
PlayerOwnsAsset
Parameters (2) | ||
---|---|---|
player | Instance | |
assetId | int64 | |
Returns (1) | ||
bool |
Returns whether the inventory of the given player contains an asset, given
its ID. In the case that a query fails, this method will throw an error,
so it's recommended to wrap calls to this method in pcall()
.
- This method should not be used for passes since they use a separate ID system. Legacy passes that still depend on an asset ID should use UserOwnsGamePassAsync() instead of this method.
- This method cannot be used to check for developer products since they can be purchased multiple times but not owned themselves. Instead, use a data store to save when a player has bought a developer product.
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of PlayerOwnsAsset from to Unsafe
- 320 Change Parameters of PlayerOwnsAsset from (player: Instance, assetId: int) to (player: Instance, assetId: int64)
- 83 Add PlayerOwnsAsset
PlayerOwnsBundle
Parameters (2) | ||
---|---|---|
player | Player | |
bundleId | int64 | |
Returns (1) | ||
bool |
Returns whether the inventory of given Player contains a bundle,
given its ID. In the case that a query fails, this method will throw an
error, so it's recommended to wrap calls to this method in pcall()
.
Thread safety | Unsafe |
---|
History 1
- 529 Add PlayerOwnsBundle
PrepareCollectiblesPurchase
Parameters (6) | ||
---|---|---|
player | Instance | |
assetId | int64 | |
collectibleItemId | string | |
collectibleItemInstanceId | string | |
collectibleProductId | string | |
expectedPrice | int | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 588 Change Parameters of PrepareCollectiblesPurchase from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 587 Add PrepareCollectiblesPurchase
PrepareCollectiblesPurchaseRequested
Parameters (6) | |
---|---|
player | Instance |
assetId | int64 |
collectibleItemId | string |
collectibleItemInstanceId | string |
collectibleProductId | string |
expectedPrice | int |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 588 Change Parameters of PrepareCollectiblesPurchaseRequested from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 587 Add PrepareCollectiblesPurchaseRequested
ProcessReceipt
Parameters (1) | ||
---|---|---|
receiptInfo | Dictionary | |
Returns (1) | ||
ProductPurchaseDecision |
A callback to process receipts of developer product purchases. This callback should be set once and only once by a single Script. If you're selling multiple products in your experience, this callback should handle receipts for all of them.
Guarantees
On any given server, the ProcessReceipt callback is called for all of a player's unresolved developer product purchases when:
- The player successfully initiates a product purchase (same product or another product) on this server.
- The player joins the server.
Once a developer product purchase is requested, it is considered "successfully initiated" when processed on Roblox's backend and once the funds have been placed in escrow. Subsequently, the purchase is considered "resolved" if a ProcessReceipt callback returns a ProductPurchaseDecision enum of PurchaseGranted and this is successfully recorded on the backend.
An exception to the above rules is when a callback for the given unresolved purchase has been called on the same server but has not yet returned (it has yielded and not returned). In this case, the callback will not be invoked.
Unresolved Purchases
Unresolved developer product purchases are not removed or refunded after the escrow period has expired. Instead, ProcessReceipt callbacks will indefinitely be invoked for unresolved purchases in the manner described above.
Retries / Timeout
There is no time-based "retry" mechanism, meaning that if a ProductPurchaseDecision enum of NotProcessedYet is returned for a purchase, it will not try again on the same server unless the player successfully initiates another developer product purchase (same product or another product) or re-joins the server. There is also no "timeout" for yielded callbacks; a callback can yield for as long as the server is running and its result will still be accepted when it does return.
Notes
Where there are multiple purchases pending for the player, ProcessReceipt callbacks are called in a non-deterministic order.
The player needs to be in the server for the callback to be invoked, but does not need to be in the server for the result of the callback to be recorded on the backend.
The callback for a given purchase may run on two different servers at the same time, if the player joins another server before the callback in the previous server returns.
Even if a ProductPurchaseDecision enum of PurchaseGranted is returned in the callback function, it's possible that it will fail to be recorded on the backend. In this case, the purchase will remain unresolved and ProcessReceipt will continue to be invoked in the manner described above.
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of ProcessReceipt from to Unsafe
- 139 Change Parameters of ProcessReceipt from (receiptInfo: Variant) to (receiptInfo: Dictionary)
- 138 Add ProcessReceipt
PromptBulkPurchase
Parameters (3) | ||
---|---|---|
player | Player | |
lineItems | Array | |
options | Dictionary | |
Returns (1) | ||
null |
Prompts a user to purchase multiple avatar items with the given assetId/bundleIds. This does not work with non-Avatar items.
MarketplaceService.PromptBulkPurchase() only allows prompting from server scripts.
For limited items, original copies are prompted until they run out, regardless of the price. Once original copies are out, resale copies are prompted.
A maximum of 20 items can be added to a single bulk purchase prompt.
Thread safety | Unsafe |
---|
History 1
PromptBulkPurchaseFinished
Parameters (3) | |
---|---|
player | Instance |
status | MarketplaceBulkPurchasePromptStatus |
results | Dictionary |
Returns when a bulk purchase prompt for avatar items is closed. This fires right as the dialog closes, when the player presses "Cancel" at the prompt or "OK" at the success/error message.
Note: This is not a trusted event from the client. To check if the user owns the items purchased, MarketplaceService.PlayerOwnsAsset or MarketplaceService.PlayerOwnsBundle can be used.
Thread safety | Unsafe |
---|
History 1
PromptBulkPurchaseRequested
Parameters (6) | |
---|---|
player | Instance |
displayData | Array |
orderRequest | Dictionary |
purchaserRobuxBalance | int64 |
orderTotalRobux | int64 |
options | Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PromptBundlePurchase
Parameters (2) | ||
---|---|---|
player | Instance | |
bundleId | int64 | |
Returns (1) | ||
null |
Prompts a user to purchase a bundle with the given bundleId
.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of PromptBundlePurchase from void to null
- 462 Change ThreadSafety of PromptBundlePurchase from to Unsafe
- 455 Change Security of PromptBundlePurchase from RobloxScriptSecurity to None
- 384 Add PromptBundlePurchase
PromptBundlePurchaseFinished
Parameters (3) | |
---|---|
player | Instance |
bundleId | int64 |
wasPurchased | bool |
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of PromptBundlePurchaseFinished from to Unsafe
- 455 Change Security of PromptBundlePurchaseFinished from RobloxScriptSecurity to None
- 394 Add PromptBundlePurchaseFinished
PromptBundlePurchaseRequested
Parameters (2) | |
---|---|
player | Instance |
bundleId | int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of PromptBundlePurchaseRequested from to Unsafe
- 384 Add PromptBundlePurchaseRequested
PromptCancelSubscription
Parameters (2) | ||
---|---|---|
user | Player | |
subscriptionId | string | |
Returns (1) | ||
null |
Prompts a user to cancel a subscription for the given subscriptionId
.
Once the user successfully cancels the subscription, the
Players.UserSubscriptionStatusChanged event fires.
Thread safety | Unsafe |
---|
History 1
PromptCancelSubscriptionRequested
Parameters (1) | |
---|---|
subscriptionId | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PromptCollectibleBundlePurchaseRequested
Parameters (8) | |
---|---|
player | Instance |
bundleId | int64 |
collectibleItemId | string |
collectibleItemInstanceId | string |
collectibleProductId | string |
expectedPrice | int |
idempotencyKey | string |
purchaseAuthToken | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PromptCollectiblesPurchase
Parameters (6) | ||
---|---|---|
player | Instance | |
assetId | int64 | |
collectibleItemId | string | |
collectibleItemInstanceId | string | |
collectibleProductId | string | |
expectedPrice | int | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 588 Change Parameters of PromptCollectiblesPurchase from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int)
- 587 Add PromptCollectiblesPurchase
PromptCollectiblesPurchaseRequested
Parameters (8) | |
---|---|
player | Instance |
assetId | int64 |
collectibleItemId | string |
collectibleItemInstanceId | string |
collectibleProductId | string |
expectedPrice | int |
idempotencyKey | string |
purchaseAuthToken | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 588 Change Parameters of PromptCollectiblesPurchaseRequested from (player: Instance, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int, idempotencyKey: string, purchaseAuthToken: string) to (player: Instance, assetId: int64, collectibleItemId: string, collectibleItemInstanceId: string, collectibleProductId: string, expectedPrice: int, idempotencyKey: string, purchaseAuthToken: string)
- 587 Add PromptCollectiblesPurchaseRequested
PromptGamePassPurchase
Parameters (2) | ||
---|---|---|
player | Instance | |
gamePassId | int64 | |
Returns (1) | ||
null |
Prompts a user to purchase a
pass with the given
gamePassId
.
Thread safety | Unsafe |
---|
History 6
- 573 Change ReturnType of PromptGamePassPurchase from void to null
- 462 Change ThreadSafety of PromptGamePassPurchase from to Unsafe
- 320 Change Parameters of PromptGamePassPurchase from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 302 Add PromptGamePassPurchase
- 301 Remove PromptGamePassPurchase
- 302 Add PromptGamePassPurchase
PromptGamePassPurchaseFinished
Parameters (3) | |
---|---|
player | Instance |
gamePassId | int64 |
wasPurchased | bool |
This event fires when a purchase dialog for a pass is closed. It fires as the dialog closes, when the player presses "Cancel" at the prompt or "OK" at the success/error message.
For repeatable purchases use developer products.
See Also
- For developer product purchase prompts, connect to PromptProductPurchaseFinished.
- For affiliate gear sales or other assets, use PromptPurchaseFinished.
- For guidance on saving and replicating player data, such as purchases and progress, see Implementing Player Data and Purchases.
Thread safety | Unsafe |
---|
History 5
- 462 Change ThreadSafety of PromptGamePassPurchaseFinished from to Unsafe
- 320 Change Parameters of PromptGamePassPurchaseFinished from (player: Instance, gamePassId: int, wasPurchased: bool) to (player: Instance, gamePassId: int64, wasPurchased: bool)
- 302 Add PromptGamePassPurchaseFinished
- 301 Remove PromptGamePassPurchaseFinished
- 302 Add PromptGamePassPurchaseFinished
PromptGamePassPurchaseRequested
Parameters (2) | |
---|---|
player | Instance |
gamePassId | int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 5
- 462 Change ThreadSafety of PromptGamePassPurchaseRequested from to Unsafe
- 320 Change Parameters of PromptGamePassPurchaseRequested from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 302 Add PromptGamePassPurchaseRequested
- 301 Remove PromptGamePassPurchaseRequested
- 302 Add PromptGamePassPurchaseRequested
PromptNativePurchase
Parameters (2) | ||
---|---|---|
player | Instance | |
productId | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of PromptNativePurchase from void to null
- 462 Change ThreadSafety of PromptNativePurchase from to Unsafe
- 156 Add PromptNativePurchase
PromptNativePurchaseWithLocalPlayer
Parameters (1) | ||
---|---|---|
productId | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 573 Change ReturnType of PromptNativePurchaseWithLocalPlayer from void to null
- 546 Add PromptNativePurchaseWithLocalPlayer
PromptPremiumPurchase
Parameters (1) | ||
---|---|---|
player | Instance | |
Returns (1) | ||
null |
Prompts a user to purchase Roblox Premium. To learn more about and incorporating Premium incentives into your experience, see Engagement-Based Payouts.
See Also
- MarketplaceService.PromptPremiumPurchaseFinished which fires when the Premium purchase UI closes.
- Players.PlayerMembershipChanged which fires when the server recognizes that a player's membership has changed.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of PromptPremiumPurchase from void to null
- 462 Change ThreadSafety of PromptPremiumPurchase from to Unsafe
- 416 Add PromptPremiumPurchase
PromptPremiumPurchaseFinished
Parameters (0) | ||
---|---|---|
No parameters. |
This event fires when the Roblox Premium purchase modal closes, specifically when the player presses "Cancel" at the prompt, "OK" at the error message, or after the payment UI closes.
See Also
- PromptPremiumPurchase() to prompt a user to purchase Premium.
- Players.PlayerMembershipChanged which fires when the server recognizes that a player's membership has changed.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of PromptPremiumPurchaseFinished from to Unsafe
- 416 Add PromptPremiumPurchaseFinished
PromptPremiumPurchaseRequested
Parameters (1) | |
---|---|
player | Instance |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of PromptPremiumPurchaseRequested from to Unsafe
- 416 Add PromptPremiumPurchaseRequested
PromptProductPurchase
Parameters (4) | Default | |
---|---|---|
player | Instance | |
productId | int64 | |
equipIfPurchased | bool | true |
currencyType | CurrencyType | Default |
Returns (1) | ||
null |
Prompts a user to purchase a
developer product
with the given productId
.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of PromptProductPurchase from void to null
- 462 Change ThreadSafety of PromptProductPurchase from to Unsafe
- 320 Change Parameters of PromptProductPurchase from (player: Instance, productId: int, equipIfPurchased: bool = true, currencyType: CurrencyType = Default) to (player: Instance, productId: int64, equipIfPurchased: bool = true, currencyType: CurrencyType = Default)
- 125 Add PromptProductPurchase
PromptProductPurchaseFinished
Parameters (3) | |
---|---|
userId | int64 |
productId | int64 |
isPurchased | bool |
Fires when a purchase prompt closes for a developer product, right as the dialog closes when the player presses "Cancel" at the prompt or "OK" at the success/error message. You can use this event to detect when a purchase prompt is closed, but it should not be used to process purchases; instead use MarketplaceService.ProcessReceipt.
Unlike the similarly-named events above, this event fires with a Player.UserId and not a reference to the Player object.
- For passes, use MarketplaceService.PromptGamePassPurchaseFinished.
- For affiliate gear sales or other assets, use MarketplaceService.PromptPurchaseFinished.
- For guidance on saving and replicating player data, such as purchases and progress, see Implementing Player Data and Purchases.
Thread safety | Unsafe |
---|
History 5
- 557 Change Tags of PromptProductPurchaseFinished from [Deprecated] to []
- 462 Change ThreadSafety of PromptProductPurchaseFinished from to Unsafe
- 320 Change Parameters of PromptProductPurchaseFinished from (userId: int, productId: int, isPurchased: bool) to (userId: int64, productId: int64, isPurchased: bool)
- 139 Change Tags of PromptProductPurchaseFinished from [] to [Deprecated]
- 125 Add PromptProductPurchaseFinished
PromptProductPurchaseRequested
Parameters (4) | |
---|---|
player | Instance |
productId | int64 |
equipIfPurchased | bool |
currencyType | CurrencyType |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 462 Change ThreadSafety of PromptProductPurchaseRequested from to Unsafe
- 320 Change Parameters of PromptProductPurchaseRequested from (player: Instance, productId: int, equipIfPurchased: bool, currencyType: CurrencyType) to (player: Instance, productId: int64, equipIfPurchased: bool, currencyType: CurrencyType)
- 125 Add PromptProductPurchaseRequested
PromptPurchase
Parameters (4) | Default | |
---|---|---|
player | Instance | |
assetId | int64 | |
equipIfPurchased | bool | true |
currencyType | CurrencyType | Default |
Returns (1) | ||
null |
Prompts a user to purchase an item with the given assetId
. This does
not work for
USD Creator Store
purchases. If prompting a purchase of a
Limited
item:
Server requests (recommended) prompt original copies until they run out, regardless of the price. Once original copies are out, resale copies are prompted.
Client requests prompt from the lowest resale price even if original copies are available.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of PromptPurchase from void to null
- 462 Change ThreadSafety of PromptPurchase from to Unsafe
- 320 Change Parameters of PromptPurchase from (player: Instance, assetId: int, equipIfPurchased: bool = true, currencyType: CurrencyType = Default) to (player: Instance, assetId: int64, equipIfPurchased: bool = true, currencyType: CurrencyType = Default)
- 83 Add PromptPurchase
PromptPurchaseFinished
Parameters (3) | |
---|---|
player | Instance |
assetId | int64 |
isPurchased | bool |
Fires when a purchase prompt for an affiliate gear sale or other asset is closed. This fires right as the dialog closes, when the player presses "Cancel" at the prompt or "OK" at the success/error message. Does not fire for developer product or pass prompts.
See Also
- For pass prompts, use MarketplaceService.PromptGamePassPurchaseFinished.
- For developer product prompts, connect to MarketplaceService.PromptProductPurchaseFinished.
- For guidance on saving and replicating player data, such as purchases and progress, see Implementing Player Data and Purchases.
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of PromptPurchaseFinished from to Unsafe
- 320 Change Parameters of PromptPurchaseFinished from (player: Instance, assetId: int, isPurchased: bool) to (player: Instance, assetId: int64, isPurchased: bool)
- 83 Add PromptPurchaseFinished
PromptPurchaseRequested
Parameters (4) | |
---|---|
player | Instance |
assetId | int64 |
equipIfPurchased | bool |
currencyType | CurrencyType |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 462 Change ThreadSafety of PromptPurchaseRequested from to Unsafe
- 320 Change Parameters of PromptPurchaseRequested from (player: Instance, assetId: int, equipIfPurchased: bool, currencyType: CurrencyType) to (player: Instance, assetId: int64, equipIfPurchased: bool, currencyType: CurrencyType)
- 83 Add PromptPurchaseRequested
PromptPurchaseRequestedV2
Parameters (6) | |
---|---|
player | Instance |
assetId | int64 |
equipIfPurchased | bool |
currencyType | CurrencyType |
idempotencyKey | string |
purchaseAuthToken | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PromptRobloxPurchase
Parameters (2) | ||
---|---|---|
assetId | int64 | |
equipIfPurchased | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of PromptRobloxPurchase from void to null
- 462 Change ThreadSafety of PromptRobloxPurchase from to Unsafe
- 424 Add PromptRobloxPurchase
PromptRobloxPurchaseRequested
Parameters (2) | |
---|---|
assetId | int64 |
equipIfPurchased | bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of PromptRobloxPurchaseRequested from to Unsafe
- 424 Add PromptRobloxPurchaseRequested
PromptSubscriptionPurchase
Parameters (2) | ||
---|---|---|
user | Player | |
subscriptionId | string | |
Returns (1) | ||
null |
Prompts a user to purchase a subscription for the given subscriptionId
.
Thread safety | Unsafe |
---|
History 6
- 590 Add PromptSubscriptionPurchase
- 589 Remove PromptSubscriptionPurchase
- 587 Change Tags of PromptSubscriptionPurchase from [] to [Deprecated]
- 573 Change ReturnType of PromptSubscriptionPurchase from void to null
- 462 Change ThreadSafety of PromptSubscriptionPurchase from to Unsafe
- 393 Add PromptSubscriptionPurchase
PromptSubscriptionPurchaseFinished
Parameters (3) | |
---|---|
user | Player |
subscriptionId | string |
didTryPurchasing | bool |
This event fires when the subscription purchase modal closes, specifically when the users presses Cancel, OK at the error message, or after the payment UI closes.
See Also
- PromptSubscriptionPurchase() to prompt a user to purchase a subscription.
- Players.UserSubscriptionStatusChanged, which fires when the game server recognizes that the user's status for a certain subscription has changed.
Thread safety | Unsafe |
---|
History 8
- 592 Change Security of PromptSubscriptionPurchaseFinished from RobloxScriptSecurity to None
- 590 Add PromptSubscriptionPurchaseFinished
- 590 Remove PromptSubscriptionPurchaseFinished
- 589 Remove PromptSubscriptionPurchaseFinished
- 589 Add PromptSubscriptionPurchaseFinished
- 587 Change Tags of PromptSubscriptionPurchaseFinished from [] to [Deprecated]
- 462 Change ThreadSafety of PromptSubscriptionPurchaseFinished from to Unsafe
- 393 Add PromptSubscriptionPurchaseFinished
PromptSubscriptionPurchaseRequested
Parameters (1) | |
---|---|
subscriptionId | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 590 Change Parameters of PromptSubscriptionPurchaseRequested from (user: Instance, subscriptionId: string) to (subscriptionId: string)
- 589 Change Parameters of PromptSubscriptionPurchaseRequested from (player: Instance, subscriptionId: int64) to (user: Instance, subscriptionId: string)
- 462 Change ThreadSafety of PromptSubscriptionPurchaseRequested from to Unsafe
- 393 Add PromptSubscriptionPurchaseRequested
PromptThirdPartyPurchase
Parameters (2) | ||
---|---|---|
player | Instance | |
productId | string | |
Returns (1) | ||
null |
Security | LocalUserSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 573 Change ReturnType of PromptThirdPartyPurchase from void to null
- 462 Change ThreadSafety of PromptThirdPartyPurchase from to Unsafe
- 311 Change Security of PromptThirdPartyPurchase from RobloxPlaceSecurity to LocalUserSecurity
- 150 Add PromptThirdPartyPurchase
ReportAssetSale
Parameters (2) | ||
---|---|---|
assetId | string | |
robuxAmount | int | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of ReportAssetSale from void to null
- 462 Change ThreadSafety of ReportAssetSale from to Unsafe
- 238 Add ReportAssetSale
ReportRobuxUpsellStarted
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of ReportRobuxUpsellStarted from void to null
- 462 Change ThreadSafety of ReportRobuxUpsellStarted from to Unsafe
- 237 Add ReportRobuxUpsellStarted
ServerPurchaseVerification
Parameters (1) | |
---|---|
serverResponseTable | Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of ServerPurchaseVerification from to Unsafe
- 125 Add ServerPurchaseVerification
SignalAssetTypePurchased
Parameters (2) | ||
---|---|---|
player | Instance | |
assetType | AssetType | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalAssetTypePurchased from void to null
- 462 Change ThreadSafety of SignalAssetTypePurchased from to Unsafe
- 384 Add SignalAssetTypePurchased
SignalClientPurchaseSuccess
Parameters (3) | ||
---|---|---|
ticket | string | |
playerId | int64 | |
productId | int64 | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 573 Change ReturnType of SignalClientPurchaseSuccess from void to null
- 462 Change ThreadSafety of SignalClientPurchaseSuccess from to Unsafe
- 320 Change Parameters of SignalClientPurchaseSuccess from (ticket: string, playerId: int, productId: int) to (ticket: string, playerId: int64, productId: int64)
- 125 Add SignalClientPurchaseSuccess
SignalMockPurchasePremium
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalMockPurchasePremium from void to null
- 462 Change ThreadSafety of SignalMockPurchasePremium from to Unsafe
- 416 Add SignalMockPurchasePremium
SignalPromptBulkPurchaseFinished
Parameters (2) | ||
---|---|---|
status | MarketplaceBulkPurchasePromptStatus | |
results | Dictionary | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
SignalPromptBundlePurchaseFinished
Parameters (3) | ||
---|---|---|
player | Instance | |
bundleId | int64 | |
success | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalPromptBundlePurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptBundlePurchaseFinished from to Unsafe
- 394 Add SignalPromptBundlePurchaseFinished
SignalPromptGamePassPurchaseFinished
Parameters (3) | ||
---|---|---|
player | Instance | |
gamePassId | int64 | |
success | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 6
- 573 Change ReturnType of SignalPromptGamePassPurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptGamePassPurchaseFinished from to Unsafe
- 320 Change Parameters of SignalPromptGamePassPurchaseFinished from (player: Instance, gamePassId: int, success: bool) to (player: Instance, gamePassId: int64, success: bool)
- 302 Add SignalPromptGamePassPurchaseFinished
- 301 Remove SignalPromptGamePassPurchaseFinished
- 302 Add SignalPromptGamePassPurchaseFinished
SignalPromptPremiumPurchaseFinished
Parameters (1) | ||
---|---|---|
didTryPurchasing | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalPromptPremiumPurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptPremiumPurchaseFinished from to Unsafe
- 416 Add SignalPromptPremiumPurchaseFinished
SignalPromptProductPurchaseFinished
Parameters (3) | ||
---|---|---|
userId | int64 | |
productId | int64 | |
success | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 573 Change ReturnType of SignalPromptProductPurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptProductPurchaseFinished from to Unsafe
- 320 Change Parameters of SignalPromptProductPurchaseFinished from (userId: int, productId: int, success: bool) to (userId: int64, productId: int64, success: bool)
- 125 Add SignalPromptProductPurchaseFinished
SignalPromptPurchaseFinished
Parameters (3) | ||
---|---|---|
player | Instance | |
assetId | int64 | |
success | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 573 Change ReturnType of SignalPromptPurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptPurchaseFinished from to Unsafe
- 320 Change Parameters of SignalPromptPurchaseFinished from (player: Instance, assetId: int, success: bool) to (player: Instance, assetId: int64, success: bool)
- 83 Add SignalPromptPurchaseFinished
SignalPromptSubscriptionPurchaseFinished
Parameters (2) | ||
---|---|---|
subscriptionId | string | |
didTryPurchasing | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 6
- 592 Change Security of SignalPromptSubscriptionPurchaseFinished from None to RobloxScriptSecurity
- 590 Add SignalPromptSubscriptionPurchaseFinished
- 589 Remove SignalPromptSubscriptionPurchaseFinished
- 573 Change ReturnType of SignalPromptSubscriptionPurchaseFinished from void to null
- 462 Change ThreadSafety of SignalPromptSubscriptionPurchaseFinished from to Unsafe
- 393 Add SignalPromptSubscriptionPurchaseFinished
SignalServerLuaDialogClosed
Parameters (1) | ||
---|---|---|
value | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalServerLuaDialogClosed from void to null
- 462 Change ThreadSafety of SignalServerLuaDialogClosed from to Unsafe
- 138 Add SignalServerLuaDialogClosed
SignalUserSubscriptionStatusChanged
Parameters (1) | ||
---|---|---|
subscriptionId | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
ThirdPartyPurchaseFinished
Parameters (4) | |
---|---|
player | Instance |
productId | string |
receipt | string |
wasPurchased | bool |
Security | LocalUserSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 462 Change ThreadSafety of ThirdPartyPurchaseFinished from to Unsafe
- 311 Change Security of ThirdPartyPurchaseFinished from RobloxPlaceSecurity to LocalUserSecurity
- 150 Add ThirdPartyPurchaseFinished
UserOwnsGamePassAsync
Parameters (2) | ||
---|---|---|
userId | int64 | |
gamePassId | int64 | |
Returns (1) | ||
bool |
Returns true if the player with the given UserId
owns the pass with the
given gamePassId
, not to be confused with an asset ID.
Caching Behavior
Results of this function are remembered so that repeated calls will return quicker. This function will always return true if the player owns the pass upon first entering a server after having purchased the pass. If the pass is purchased in-experience through PromptGamePassPurchase(), this function may return false due to the caching behavior. Conversely, if the player deletes the pass from their inventory, this function may return true despite the player not owning the pass.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of UserOwnsGamePassAsync from to Unsafe
- 329 Add UserOwnsGamePassAsync
UserSubscriptionStatusChanged
Parameters (1) | |
---|---|
subscriptionId | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
Removed members 10
GetSubscriptionStatus
Parameters (2) | ||
---|---|---|
player | Instance | |
subscriptionId | int64 | |
Returns (1) | ||
Dictionary |
History 2
- 396 Remove GetSubscriptionStatus
- 393 Add GetSubscriptionStatus
IsPlayerSubscribed
Parameters (2) | ||
---|---|---|
player | Instance | |
subscriptionId | int64 | |
Returns (1) | ||
bool |
Thread safety | Unsafe |
---|
History 4
- 589 Remove IsPlayerSubscribed
- 587 Change Tags of IsPlayerSubscribed from [Yields] to [Yields, Deprecated]
- 462 Change ThreadSafety of IsPlayerSubscribed from to Unsafe
- 396 Add IsPlayerSubscribed
PromptSubscriptionCancellation
Parameters (2) | ||
---|---|---|
player | Instance | |
subscriptionId | int64 | |
Returns (1) | ||
null |
Thread safety | Unsafe |
---|
History 5
- 589 Remove PromptSubscriptionCancellation
- 587 Change Tags of PromptSubscriptionCancellation from [] to [Deprecated]
- 573 Change ReturnType of PromptSubscriptionCancellation from void to null
- 462 Change ThreadSafety of PromptSubscriptionCancellation from to Unsafe
- 393 Add PromptSubscriptionCancellation
PromptSubscriptionCancellationFinished
Parameters (3) | |
---|---|
player | Instance |
subscriptionId | int64 |
wasCanceled | bool |
Thread safety | Unsafe |
---|
History 4
- 589 Remove PromptSubscriptionCancellationFinished
- 587 Change Tags of PromptSubscriptionCancellationFinished from [] to [Deprecated]
- 462 Change ThreadSafety of PromptSubscriptionCancellationFinished from to Unsafe
- 393 Add PromptSubscriptionCancellationFinished
PromptSubscriptionCancellationRequested
Parameters (2) | |
---|---|
player | Instance |
subscriptionId | int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 589 Remove PromptSubscriptionCancellationRequested
- 462 Change ThreadSafety of PromptSubscriptionCancellationRequested from to Unsafe
- 393 Add PromptSubscriptionCancellationRequested
SetDevProductInfoUrl
Parameters (1) | ||
---|---|---|
url | string | |
Returns (1) | ||
void |
Security | LocalUserSecurity |
---|
History 2
- 158 Remove SetDevProductInfoUrl
- 131 Add SetDevProductInfoUrl
SetPlayerOwnsAssetUrl
Parameters (1) | ||
---|---|---|
url | string | |
Returns (1) | ||
void |
Security | LocalUserSecurity |
---|
History 3
- 158 Remove SetPlayerOwnsAssetUrl
- 86 Change Security of SetPlayerOwnsAssetUrl from RobloxSecurity to LocalUserSecurity
- 83 Add SetPlayerOwnsAssetUrl
SetProductInfoUrl
Parameters (1) | ||
---|---|---|
url | string | |
Returns (1) | ||
void |
Security | LocalUserSecurity |
---|
History 3
- 158 Remove SetProductInfoUrl
- 86 Change Security of SetProductInfoUrl from RobloxSecurity to LocalUserSecurity
- 83 Add SetProductInfoUrl
SignalPromptSubscriptionCancellationFinished
Parameters (3) | ||
---|---|---|
player | Instance | |
subscriptionId | int64 | |
wasCanceled | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 4
- 589 Remove SignalPromptSubscriptionCancellationFinished
- 573 Change ReturnType of SignalPromptSubscriptionCancellationFinished from void to null
- 462 Change ThreadSafety of SignalPromptSubscriptionCancellationFinished from to Unsafe
- 393 Add SignalPromptSubscriptionCancellationFinished