IOS
Unfortunately, as I understand it, your design will not be allowed in the Apple App Store.
Disclaimer: I do not work for Apple, so I only provide links to their stated terms of service for in-app purchases and recommendations for approving apps.
As I understand it, in-app purchases for iOS can use third-party payment solutions ( for example, Paypal ) if the user buys real goods (shirt or toy). However, if the user purchases digital goods, such as music, then the application must use the payment technology Apple In-App.
https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf :
What to sell
There are four supported in-app purchase categories that you can sell:
β’ Content
β’ Functionality
β’ Services
β’ Subscriptions
Music will be "Content".
And from the Approval Guide for the iTunes App Store :
11.2 Applications using a system other than the in-app purchase APIs (IAP) to purchase content, features or services in the Application will be rejected.
So, I think that you need your PhoneGap application to use the Apple StoreKit framework (you can try a wrapper like this one for PhoneGap applications ).
Android
It seems to me that your original design is suitable for the Google Play Store :
Paid and free apps
Shopping apps . Developers who charge for apps and downloads from Google Play must do so using the Google Play payment system.
Shopping from the app . Developers offering additional content, services or features in an application downloaded from Google Play should use the Google Play payment system as a payment method, with the exception of:
- when the payment is made mainly for physical goods or services (for example, the purchase of movie tickets; for example, the purchase of a publication, where the price also includes a printed subscription); or
- if payment is made for digital content or goods that can be consumed outside the application itself (for example, buying songs that can be played on other music players)
If you allow them to buy music that can be played outside the application, then I think this corresponds to the second exception mentioned above.