What you’re looking for is Spotify’s API ( application programming interface), which is what allows third party tools to interface with Spotify. You can find all the required documentation on Spotify:
But a lot depend on which language/technology you’ll be using to create your application — which OS(s) and architectures should it run on? Are you going to target a single OS or is it going to be a cross-platform application?
Depending on these questions, you’ll have to decide which languages/tools to chose for developing your app, and then you’ll need to interface it to Spotify’s API.
I can’t advise you on the money-making aspect because I don’t use neither Spotify nor Appstore, but if Spotify allows you to earn money through some sort of affiliation program, then you’ll find it documented in Spotify’s API too. The same goes for the Appstore: you’ll have to consult its API documentation in order to learn how to interface your app with it.
This holds true for any similar online service: the public API is what allows end users to create custom applications that can communicate with the service. The freedom of actions granted by these services will vary from service to service, so you’ll need to read the official docs.
Usually, to handle sales you’ll be dealing with personal user tokens which you exchange with the service in order to acknowledge transactions, and probably you’ll be implementing something similar in your app to, in order to register its users.