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 ( ) 65 members inherited from Instance553 Archivable : bool 553 Attributes : string 553 AttributesReplicate : string 553 AttributesSerialize : BinaryString 670 Capabilities : SecurityCapabilities 553 DataCost : int 619 DefinesCapabilities : bool 553 HistoryId : UniqueId 553 Name : string 553 Parent : Instance 553 PropertyStatusStudio : PropertyStatus 553 RobloxLocked : bool 670 Sandboxed : bool 616 SourceAssetId : int64 553 Tags : BinaryString 616 UniqueId : UniqueId 553 archivable : bool 553 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 486 GetDescendants ( ) : Array 486 GetFullName ( ) : string 641 GetStyled ( name: 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 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 648 children ( ) : Instances 553 clone ( ) : Instance 573 destroy ( ) : null 553 findFirstChild ( name: string , recursive: bool = false ) : Instance 648 getChildren ( ) : Instances 553 isDescendantOf ( ancestor: Instance ) : bool 573 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 ( ) 553 childAdded ( child: Instance ) 6 members inherited from Object647 ClassName : string 647 className : string 647 GetPropertyChangedSignal ( property: string ) : RBXScriptSignal 647 IsA ( className: string ) : bool 650 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]