Apple's guidelines are very strict. Relevant points include:
- Apps utilizing a system other than the In-App Purchase API (IAP) to purchase content, functionality, or services in an App will be
- Apps offering subscriptions must do so using IAP, Apple will share the same 70/30 revenue split with developers for these purchases, as
set forth in the Program License Agreement
- Apps that link to external mechanisms for purchases or subscriptions to be used in the App, such as a "buy" button that goes to a web site
to purchase a digital book, will be rejected
For Android, it may matter which store you sell through; you didn't specify. Google Play's content policy says, of in-app purchases:
- Developers offering virtual goods or currencies within a game downloaded from Google Play must use Google Play's in-app billing
service as the method of payment.
- Developers offering additional content, services or functionality within another category of app downloaded from Google Play must use
Google Play's in-app billing service as the method of payment, except:
- where payment is primarily for physical goods or services (e.g., buying movie tickets, or buying a publication where the price also
includes a hard copy subscription); or
- where payment is for digital content or goods that may be consumed outside of the app itself (e.g., buying songs that can be played on
other music players).
So basically, For iOS the answer is definitely no. For Android in the Play store, the answer is also no. In both cases, you can't charge users directly via your own payment portal. You'll have to use the in-ecosystem IAP mechanisms available to you and convert that into appropriate tokens for representing purchases on your back-end.
I'm having a harder time finding the relevant guidelines for other potentially-applicable Android stores, such as the Kindle store (the guidelines are here, but they don't seem to explicitly call out that you must use the Amazon API for purchasing -- only that Google's API will not work).