These kinds of apps pair with retailers and earn money from those retailers in exchange for encouraging users to shop there. The retailers pay the app, and the app gives users a percentage of what they bring in. It’s sort of like a complicated affiliate program.