docs.unity3d.com
    Show / Hide Table of Contents

    Initiating Purchases

    When the user wants to buy a product call the InitiatePurchase method of the IStoreController, identifying the product the user wants to buy.

    // Example method called when the user presses a 'buy' button
    // to start the purchase process.
    public void OnPurchaseClicked(string productId) {
        controller.InitiatePurchase(productId);
    }
    

    Your application will be notified asynchronously of the result, either with an invocation of ProcessPurchase for successful purchases or OnPurchaseFailed for failures.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023