You can add In App Purchases to your games using the extensions available from the Marketplace and following the setup guides listed below (each extension comes with its own "mini-manual" that explains how to use it and lists all of the functions it contains):
Previous versions of GameMaker had the In App Purchase functions built into the runner, however these functions have now been deprecated and will no longer work: