Getting started with in app purchases React Native (iOS)

Getting started with in app purchases React Native (iOS)

In this video I’ll show and explain how to setup in app purchases in React Native for iOS.

To setup in app purchases there are a series of steps that need to happen before you import the library and get going:
– Sign banking and tax agreements
– Setup subscriptions/consumables (known as products) in app store connect
– Set bundle ID In Xcode and enable in app purchase capability

After this you can write the code as shown in this video. Remember when you do the actual requestPurchase/requestSubscription that you use a device!!! and not a simulator since you need to log in with an Apple account to confirm the purchase.

Remember when developing, you’ll be running in Sandbox mode so no money is involved when testing!

verifyReceipt using apple’s API on your own backend:


apple app store connect:


Xem thêm:

21 thoughts on “Getting started with in app purchases React Native (iOS)”

  1. Hello i am using product id same in code & app store connect but getting empty response

  2. It kinda looked like I was learning Javascript. It didn't show me anything on the setups on Apple end. Creating Subscriptions, Sandbox testers , what is the product id, etc.
    It basically showed me javascript syntax and told me things already on the documentation of IAP

  3. Empty array? How do we set Subscriptions? Example not giving expected result Array

  4. Hi, I have a doubt about IAP,can we make the prices dynamic, I have an app that sells digital contents and the apple rejected the app since I was using a third party payment and instructed me to buy using inapp purchases but since my products price is dynamic and products can be added in future also and cart is also included, I have no idea how to implement that with in-app purchases..can you kindly guide me here..thanks in advance

  5. Thanks for the video. You can also use `useIAP` hooks from version 6 which makes code much simpler ?

  6. I am stuck inside the purchaseUpdateListener function. What I want is to active a view depending on a state variable but whenever I tried to execute something or update the state variable inside the listener it's not updating. Please help me. I followed every step exactly you have explained here.(Though the finishTransaction has been called successfully)

  7. Another question when talking about the Receipt, is a request made to apple to check if that receipt is still valid?
    I already have my backend. But how do I implement that every month that receipt is saved in my back-end?

    the first time if it is saved, but if the subscription of 1 month is about to expire, how do I keep that receipt in my back?

  8. Thank you, that was so informative! I just have few questions… what database/server did you use for storing/validating the receipts? Do we need to store the receipt, product id & user id for each corresponding user in the back-end?

  9. Hi @Jonas How do you integrate it with an actual App Store account? Suppose I have a product registered in my App Store with Product ID "com.example.premium.monthly". Even after using this in the SKUs list it still shows the DUMMY products. How to get this work in actual project with actual products?

  10. Great video! Keep up the good work! My purchaseUpdatedListener is not triggered :C You know any solution? Thanks

  11. How to restore subscriptions? Tried using getpurchasHistory and getavailablepurchases to get previous purchase history , so that i can validate it from the backend, but sometimes these 2 functions gives error, or it makes the request subscription freeze. Any idea why?

  12. hi, Thanks so much for video, one question please… when you say "Sign banking and tax agreements" you mean i have to enroll my application to appstore by 99$ for year before do this video? ,thanks to response 🙂

Comments are closed.