# Sell items inside my ionic 3 app

**URL:** <https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524>\
**Category:** ionic-v3\
**Created:** [September 24, 2017, 9:17am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524 "2017-09-24T09:17:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 24, 2017, 9:17am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/1 "2017-09-24T09:17:10Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Kopertone](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kopertone](https://forum.ionicframework.com/u/Kopertone)\
**Post date:** [September 24, 2017, 3:54pm UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/2 "2017-09-24T15:54:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 25, 2017, 8:59am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/3 "2017-09-25T08:59:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chungtheng](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chungtheng/32/116877_2.png) [@Chungtheng](https://forum.ionicframework.com/u/Chungtheng)\
**Post date:** [September 25, 2017, 9:01am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/4 "2017-09-25T09:01:09Z")

</div>

you can sell coins, by using “Consumable”

---

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 25, 2017, 9:12am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/5 "2017-09-25T09:12:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chungtheng](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chungtheng/32/116877_2.png) [@Chungtheng](https://forum.ionicframework.com/u/Chungtheng)\
**Post date:** [September 25, 2017, 9:15am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/6 "2017-09-25T09:15:42Z")

</div>

I use this [plugin](https://github.com/AlexDisler/cordova-plugin-inapppurchase)  
you can check document [here](https://alexdisler.com/2016/02/29/in-app-purchases-ionic-cordova/)

---

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 25, 2017, 9:20am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/7 "2017-09-25T09:20:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chungtheng](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chungtheng/32/116877_2.png) [@Chungtheng](https://forum.ionicframework.com/u/Chungtheng)\
**Post date:** [September 25, 2017, 9:22am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/8 "2017-09-25T09:22:37Z")

</div>

lolz, that for ionic 3 , you can check official ionic site [here](http://ionicframework.com/docs/native/in-app-purchase/) too

---

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 25, 2017, 9:51am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/9 "2017-09-25T09:51:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chungtheng](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chungtheng/32/116877_2.png) [@Chungtheng](https://forum.ionicframework.com/u/Chungtheng)\
**Post date:** [September 25, 2017, 10:03am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/10 "2017-09-25T10:03:05Z")

</div>

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

```auto
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

 ![50 PM](https://global.discourse-cdn.com/ionicframework/original/3X/4/5/4587838b4b95853c1af5354ab04601b1c5be7ac9.png)  
 ![ituneconn](https://global.discourse-cdn.com/ionicframework/original/3X/4/b/4b6eb808e52b63949ef66cfd6e66f8d1ec663d2d.png)

and this what it look like on android phone

 ![screenshot_20170925-165853_1024](https://global.discourse-cdn.com/ionicframework/original/3X/b/d/bd7b2eafad6496e50a184571d673fff1363200da.png)

---

<div class="post-metadata">

**Author:** ![mfouash](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mfouash/32/112535_2.png) [@mfouash](https://forum.ionicframework.com/u/mfouash)\
**Post date:** [September 25, 2017, 10:18am UTC](https://forum.ionicframework.com/t/sell-items-inside-my-ionic-3-app/106524/11 "2017-09-25T10:18:55Z")

</div>

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