In App Purchase

Hi Expo team,

I couldn’t find information about in app billing in the documentation.

Would this work? react-native-in-app-utils - npm
I could not make it work, I tried:

rnpm install react-native-in-app-utils

import { NativeModules} from 'react-native';
const { InAppUtils } = NativeModules;

//result
NativeModules: {}
InAppUtils: null

THX, Rudy

In order to use that library you would need to detach as it makes use of custom native modules that aren’t part of Expo’s SDK currently.

https://docs.expo.io/versions/v15.0.0/guides/detach.html

I know people have asked about in-app purchases/billing and I’m sure it’s in the pipeline, but I’m not sure how far out it will be until the Expo team adds the functionality. Hopefully one of them can expand and give you more details about their plans.

1 Like

Hi - yeah, adamjnav is right. The way to do this for now is to eject and use ExpoKit and then you can use your own native modules.

We want to build this soon – we just haven’t had time yet.

1 Like

Firstly, Expo is amazing! And I know you’re all very busy and giving away work for free-- so this is just meant as constructive feedback, not bitching and moaning.

That said, from expos perspective, it might make sense to push up in-app purchases on the road map. 85%+ of apps will need to monetize somehow. Right now you have ads covered with facebook Ads but the other major business model is of course in app purchases. With in app purchases, you would have 85% of use cases solved (from the business side of app building not the technical side). In some ways, you could argue monetization features should come before technical features, as in many cases monetization is the #1 reason behind building an app in the first place.

In summary, I think there would be a huge return-on-time-investment for Expo to add in app purchases. Otherwise a huge number of app projects have to (1) start an expo app knowing they’ll need to eventually eject anyway, or (2) begin with another non-expo option. Probably way more apps need in app purchase functionality than apps that need, say, a document picker (which is an awesome feature no doubt!). So, just my two cents.

7 Likes

Hi! This is on our roadmap. We don’t have a timeline yet.

It will be tricky since Expo dev happens using the expo client app but IAPs tend to assume the developer of the app is the one getting paid, but we’ll figure something out.

Hope to have something soon!

1 Like

Hi there. Any updates on this?

@ccheever

No timeline yet. Would love to get to this this summer but can’t promise anything.

3 Likes

Hi! The summer is almost over. Any updates?

1 Like

More or less, no :frowning: This is still on the roadmap, but we’re not yet in a place where we can tell you when.

We’re very focused on helping you all succeed and know IAP are an important part of the puzzle, but there still some exploratory work we need to get through before we’ll be ready to promise a timeline.

2 Likes

They say that you can detach the xpo app to use new packages like in-app purchase, my question, what happens after I detach ? Do i have to do ios and android coding if i detach it ?

When you detach you are given a traditional Android project and (if on macOS) a traditional iOS Xcode project. Each project contains ExpoKit, which conceptually is similar to Expo in the form of a library. If you want to add other native code to the Android and iOS projects, you’ll have to add native code.

@ide Guys my app is stuck in the Apple App store, they wont let me publish any new chnages or new updates coz they want me to use the in app purchase thing , so I’ve no choise but to leave expo for now ( which I really dont want to do. ) and create app with CRNA

  1. Can I please get a real timeline when will Expo provide in App purchase functionality?

  2. Also help me with this, If I re build my app with CRNA react native cli, would i be able to use expo’s methods like , google auth, etc all the good stuff, by using import { AppLoading, Asset } from ‘expo’;

We don’t have a timeline for IAPs, partially for technical reasons. I want to set expectations accurately and if you need IAPs and you’re reading this when the Expo docs don’t mention an IAP API then I recommend you detach and use ExpoKit.

To answer your second question, if you use CRNA and eject to ExpoKit you can use most of the Expo APIs except ones that depend on Expo services like push notifications and the auth session helper. If you eject to bare React Native then your app doesn’t contain the native code for Expo SDKs (that’s what ExpoKit is) and Expo APIs won’t be available.

@Ide If you look at the name of this package its called https://github.com/chirag04/react-native-in-app-utils A react-native wrapper for handling in-app payments.

I dont understand how come a majority of other npm packages ( I got like 10+ other packages which works great with expo ) but this one. Why is it ?

That package uses native Obj-C code which you can’t get working with Expo without detaching. More info here: https://docs.expo.io/versions/latest/introduction/faq.html#how-do-i-add-custom-native-code-to-my-expo-project

1 Like

@ide @ccheever Where can I checkout the new feathers that Expo Team is working on for upcoming expo version updates ?

We announce features when they are released. See https://blog.expo.io which is where we post release notes and other announcements.

and you can check out Feature Requests | Expo

checkout below library for supporting both android and ios.

github repo: github.com/dooboolab/react-native-iap

npm repo: react-native-iap - npm

1 Like

@dooboolab Sounds great!
Still need to detach from expo thought?