mixed-reality

In-app purchases

HoloLens supports in-app purchases (IAPs), but there’s some work to set them up.

To use the in app-purchase functionality:

  1. Create a XAML 2D view to appear as a slate.
  2. Switch to the XAML view to activate placement, which leaves the immersive view.
  3. Call the RequestProductPurchaseAsync API:

    await CurrentApp.RequestProductPurchaseAsync("DurableItemIAPName");

    The RequestProductPurchaseAsync API brings up the stock Windows OS popup that shows the in-app purchase name, description, and price. The user can then choose purchase options.

  4. Once the user completes the purchase, present UI that lets the user switch back to the app’s immersive view.

Apps that target desktop-based Windows Mixed Reality immersive headsets don’t need to manually switch to a XAML view before they call the RequestProductPurchaseAsync API.