Supports real-world purchases that you can bundle with digital benefits.
Instances of this class cannot be created with Instance.new.
It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]
History Member 649 GetCommerceProductInfoAsync ( commerceProductId: string ) : Dictionary 649 PrepareCommerceProductPurchase ( commerceProductId: string ) : Dictionary 649 PromptCommerceProductPurchase ( user: Player , commerceProductId: string ) : null 620 PromptRealWorldCommerceBrowser ( player: Player , url: string ) : null 649 SignalPromptCommerceProductPurchaseFinished ( productId: string , didTryPurchase: bool , checkoutSessionId: string = ) : null 620 UserEligibleForRealWorldCommerceAsync ( ) : bool 649 BenefitStatusReceived ( isGranted: bool ) 649 FetchReceipt ( ) 620 InExperienceBrowserRequested ( url: string ) 649 PromptCommerceProductPurchaseFinished ( user: Player , productId: string ) 649 PromptCommerceProductPurchaseRequested ( commerceProductId: string ) 649 PurchaseBrowserClosed ( ) 68 members inherited from Instance731 Archivable : bool 731 Attributes : string 731 AttributesReplicate : string 731 AttributesSerialize : BinaryString 731 Capabilities : SecurityCapabilities 731 DataCost : int 731 DefinesCapabilities : bool 731 HistoryId : UniqueId 731 IsInSandbox : bool 731 Name : string 731 Parent : Instance 731 PredictionMode : PredictionMode 731 PropertyStatusStudio : PropertyStatus 731 RobloxLocked : bool 731 Sandboxed : bool 731 SourceAssetId : int64 731 Tags : SharedString 731 UniqueId : UniqueId 731 archivable : bool 731 numExpectedDirectChildren : int 576 AddTag ( tag: string ) : null 573 ClearAllChildren ( ) : null 462 Clone ( ) : Instance 573 Destroy ( ) : null 486 FindFirstAncestor ( name: string ) : Instance 486 FindFirstAncestorOfClass ( className: string ) : Instance 486 FindFirstAncestorWhichIsA ( className: string ) : Instance 486 FindFirstChild ( name: string , recursive: bool = false ) : Instance 486 FindFirstChildOfClass ( className: string ) : Instance 486 FindFirstChildWhichIsA ( className: string , recursive: bool = false ) : Instance 486 FindFirstDescendant ( name: string ) : Instance 563 GetActor ( ) : Actor 486 GetAttribute ( attribute: string ) : Variant 462 GetAttributeChangedSignal ( attribute: string ) : RBXScriptSignal 631 GetAttributes ( ) : Dictionary 648 GetChildren ( ) : Instances 462 GetDebugId ( scopeLength: int = 4 ) : string 707 GetDescendants ( ) : Instances 486 GetFullName ( ) : string 706 GetStyled ( name: string , selector: string? ) : Variant 657 GetStyledPropertyChangedSignal ( property: string ) : RBXScriptSignal 576 GetTags ( ) : Array 576 HasTag ( tag: string ) : bool 486 IsAncestorOf ( descendant: Instance ) : bool 486 IsDescendantOf ( ancestor: Instance ) : bool 664 IsPropertyModified ( property: string ) : bool 698 QueryDescendants ( selector: string ) : Instances 573 Remove ( ) : null 576 RemoveTag ( tag: string ) : null 664 ResetPropertyToDefault ( property: string ) : null 573 SetAttribute ( attribute: string , value: Variant ) : null 462 WaitForChild ( childName: string , timeOut: double ) : Instance 731 children ( ) : Instances 731 clone ( ) : Instance 731 destroy ( ) : null 731 findFirstChild ( name: string , recursive: bool = false ) : Instance 731 getChildren ( ) : Instances 731 isDescendantOf ( ancestor: Instance ) : bool 731 remove ( ) : null 462 AncestryChanged ( child: Instance , parent: Instance ) 462 AttributeChanged ( attribute: string ) 462 ChildAdded ( child: Instance ) 462 ChildRemoved ( child: Instance ) 462 DescendantAdded ( descendant: Instance ) 462 DescendantRemoving ( descendant: Instance ) 500 Destroying ( ) 657 StyledPropertiesChanged ( ) 731 childAdded ( child: Instance ) 6 members inherited from Object731 ClassName : string 731 className : string 647 GetPropertyChangedSignal ( property: string ) : RBXScriptSignal 647 IsA ( className: string ) : bool 731 isA ( className: string ) : bool 647 Changed ( property: string )
CommerceService is a service that supports real-world purchases that
you can bundle with virtual items. For information on eligibility and
implementation, see
Commerce products .
Parameters (1 ) isGranted bool
History 1 Parameters (0 ) No parameters.
History 1 GetCommerceProductInfoAsyncRetrieves information about the products that you are selling and surface
them within your experience. How you surface products to your users is
entirely up to you.
Name string Localized name of of the physical item Description string Localized description of the physical item IconImageAssetId number The image asset ID of main default image of the physical item DisplayPrice string Localized price string with currency symbol of the physical item. e.g. “$4.99“ IsPurchasable bool If the item can be added to a merchant checkout session, i.e. item is in stock, or can be backordered
It will block the calling thread until completion.
History 2 Tags: [Yields]
InExperienceBrowserRequested
History 1 PrepareCommerceProductPurchase
It will block the calling thread until completion.
History 1 Tags: [Yields]
PromptCommerceProductPurchasePrompts a user to purchase a commerce product using the provided
commerceProductId. Opens a webview that guides the user through the
purchasing flow.
History 2 PromptCommerceProductPurchaseFinishedUse this signal to detect when a user has completed the purchasing flow
and the webview has closed to resume gameplay within the experience.
This signal does not indicate a successful purchase , so do not grant
virtual items solely from this signal.
While optional, it is recommended to use this signal to reorient your
users on Android, as the commerce purchasing flow will have forced them
into portrait mode.
History 2 PromptCommerceProductPurchaseRequestedParameters (1 ) commerceProductId string
History 4 PromptRealWorldCommerceBrowserHistory 1 Parameters (0 ) No parameters.
History 1 SignalPromptCommerceProductPurchaseFinished
History 1 UserEligibleForRealWorldCommerceAsyncParameters (0 ) No parameters. Returns (1 ) bool
It will block the calling thread until completion.
History 1 Tags: [Yields]