Sell items inside my ionic 3 app

i have my ionic 3 app
how to implement in app billing OR How to sell items or coins inside my app

i don’t need in app purchase as i tray with in app purchase plugin is used to sell apps inside my app
but i need to sell items not other apps (coins for example)

https://ionicframework.com/docs/native/in-app-purchase/ is for selling in-app items (coins)

i think in app purchase for selling apps not for selling custom items for example coins for users
if you have example how to use in app purchase to sell coins please give me linke
thanks for your time

you can sell coins, by using “Consumable”

1 Like

any example please ? i need other examples i read the one in ionic document but i need more or video how to apply in android ,ios app

I use this plugin
you can check document here

this plugin for ionic 1 i need for ionic 3
thanks for your time and your help

lolz, that for ionic 3 , you can check official ionic site here too

Say I have this products array
Products = [{title:'100 coin',Price:1},{title:'200 coin',Price:1.5},{title:'500 coin',Price:2},{title:'1000 coin',Price:3},{title:'5000 coin',Price:4},{title:'10000 coin',Price:5}];
this array appears in my in purchase page in my app and i have *ngFor to repeat each item with button PURCHASE
how to pass the price value to in app purchase plugin and where this amount go ON (On my credit card or in my google play earning balance)
thanks my friend for helping me and for your pationt

Your product missing “id” for connect to iTuneconnect and Playstore console.
you need to get product before you purchase

this.iap.getProducts(["com.50movesapp.product11"]) .then(function (products) { 
              _me.iap .buy(products[0].productId).then(function (data) {
                console.log(data);   
                let receipt = JSON.parse(data.receipt)  
               // 
                  //Here what your validate your backend
               //  
              return _me.iap.consume(data.productType, data.receipt, data.signature);
            }).then(function () {
              console.log('consume done!');
            }).catch(function (err) {
              console.log(err);
            }); 
          });

you see my product id is “com.50movesapp.product11”
so it will get data from apple or google


and this what it look like on android phone

1 Like

awesome my friend this is what i want
thanks very match for your help and for your time and for your patient :slight_smile: