In-app purchases are supported in HoloLens, but there is some work to set them up.
In order to leverage the in app-purchase functionality, you must:
- Create a XAML 2D view to appear as a slate
- Switch to it to activate placement, which leaves the immersive view
- Call the API: await CurrentApp.RequestProductPurchaseAsync("DurableItemIAPName");
This API will bring up the stock Windows OS popup that shows the in-app purchase name, description, and price. The user can then choose purchase options. Once the action is completed, the app will need to present UI which allows the user to switch back to its immersive view.
For apps targeting desktop-based Windows Mixed Reality immersive headsets, it is not required to manually switch to a XAML view before calling the RequestProductPurchaseAsync API.