Qt Purchasing is an add-on library that enables Qt applications to support in-app purchases. It is a cross-platform library that currently supports purchases made to the Mac App Store on OS X, App Store on iOS, and Google Play on Android.
In-app purchases are a way to monetize an application. These purchases are made from inside the application and can include anything from unlocking content to virtual items. The Qt Purchasing API is built on the system APIs for in-app purchases, which means the purchase process is more familiar to the user, and the information already stored by the platform (such as credit card information) can be employed to simplify the purchase process.
Qt Purchasing provides C++ classes and QML types to access information about in-app products registered in the external store on the current platform, as well as to request purchases for those products.
The in-app products must be registered in the target stores, before they could be queried or purchased in an application. Using same identifiers for the products in each of the stores is recommended, as it makes the code to query and purchase the products simpler.
Writing the Code
Depending on what fits best with the application, you can choose to use either C++ or QML to support in-app purchasing. If the majority of the user interface is written in QML, it is recommended that you use the QML types, which provide a simple and declarative point of access for the products in the store.
Take a look at the Qt Purchasing Examples for a demonstration on how the APIs can be used in applications.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.