# Has anyone gotten In App Billing on Android to work?

**URL:** <https://forum.ionicframework.com/t/has-anyone-gotten-in-app-billing-on-android-to-work/9116>\
**Category:** ionic-v1\
**Created:** [September 3, 2014, 2:37pm UTC](https://forum.ionicframework.com/t/has-anyone-gotten-in-app-billing-on-android-to-work/9116 "2014-09-03T14:37:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubs](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@shubs](https://forum.ionicframework.com/u/shubs)\
**Post date:** [September 3, 2014, 2:37pm UTC](https://forum.ionicframework.com/t/has-anyone-gotten-in-app-billing-on-android-to-work/9116/1 "2014-09-03T14:37:59Z")

</div>

Hey All,

I’m having problems with Ionic and the In App Billing library for Cordova ([https://github.com/poiuytrez/AndroidInAppBilling/tree/master/v3](https://github.com/poiuytrez/AndroidInAppBilling/tree/master/v3)). Every time after a purchase, my app will crash instantly. I’ve attached trace logs.

I am wondering if anyone has gotten In App Purchases to work with their Ionic project, and if so, how so?

I have tried using this tutorial: [http://blog.nraboy.com/2014/08/making-android-app-purchases-ionicframework/](http://blog.nraboy.com/2014/08/making-android-app-purchases-ionicframework/) without luck.

Any suggestions?

```auto
D/CORDOVA_BILLING(27986): Purchase successful.
D/AndroidRuntime(27986): Shutting down VM
W/dalvikvm(27986): threadid=1: thread exiting with uncaught exception (group=0x415fbd40)
E/AndroidRuntime(27986): FATAL EXCEPTION: main
E/AndroidRuntime(27986): Process: com.bostes.hscmchoice, PID: 27986
E/AndroidRuntime(27986): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=10001, result=-1, data=Intent { (has extras) }} to activity {com.bostes.hscmchoice/com.bostes.hscmchoice.HSCMultipleChoice}: java.lang.NullPointerException
E/AndroidRuntime(27986): at android.app.ActivityThread.deliverResults(ActivityThread.java:3351)
E/AndroidRuntime(27986): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3394)
E/AndroidRuntime(27986): at android.app.ActivityThread.access$1300(ActivityThread.java:135)
E/AndroidRuntime(27986): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
E/AndroidRuntime(27986): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(27986): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(27986): at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime(27986): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(27986): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(27986): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime(27986): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime(27986): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
E/AndroidRuntime(27986): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(27986): Caused by: java.lang.NullPointerException
E/AndroidRuntime(27986): at com.smartmobilesoftware.inappbilling.InAppBillingPlugin$4.onIabPurchaseFinished(InAppBillingPlugin.java:357)
E/AndroidRuntime(27986): at com.smartmobilesoftware.util.IabHelper.handleActivityResult(IabHelper.java:496)
E/AndroidRuntime(27986): at com.smartmobilesoftware.inappbilling.InAppBillingPlugin.onActivityResult(InAppBillingPlugin.java:399)
E/AndroidRuntime(27986): at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:897)
E/AndroidRuntime(27986): at android.app.Activity.dispatchActivityResult(Activity.java:5423)
E/AndroidRuntime(27986): at android.app.ActivityThread.deliverResults(ActivityThread.java:3347)
E/AndroidRuntime(27986): ... 12 more
W/ActivityManager( 694): Force finishing activity com.bostes.hscmchoice/.HSCMultipleChoice

```

---

<div class="post-metadata">

**Author:** ![nicraboy](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nicraboy/32/6917_2.png) [@nicraboy](https://forum.ionicframework.com/u/nicraboy)\
**Post date:** [September 21, 2014, 6:02pm UTC](https://forum.ionicframework.com/t/has-anyone-gotten-in-app-billing-on-android-to-work/9116/2 "2014-09-21T18:02:01Z")

</div>

Hi @shubs,

Are you by chance trying to test your in-app purchases using your developer account? Google does not allow testing of IAB using the developers account. You must create a separate account for this.

Let me know if this was the reason. If not, let’s continue to troubleshoot.
