How to handle In-app purchases from Ionic & nodeJS?

Viewed 23

I am using Capacitor In app purchase plugin to handle subscriptions in my Ionic App.

Are the products linked to the iCloud account or the user's app account ? The API should tell the app, if a user has already subscribed to a plan or check if a product is owned by the IPA2 plugin ?

Here's the workflow that could be problematic:

User A creates an account on mobile A

  1. Subscribe to a plan
  2. Receipt informations are saved to my backend server
  3. User navigates to a view that payment is required
  4. API know's that the user has already payed, he could access the view.
  5. IAP2 plugin detects that the product is owned
  6. User can access the view from the app

User B creates an account on mobile B

  1. User does not subscribe to any plan

User B connects his app's account to the mobile of user A

  1. User navigates to a view that payment is required
  2. The API knows that user B has no active subscriptions
  3. Subscription plan is displaying on the app (with the store event handler)
  4. When product is updated, the IAP2 plugin detects that the product is owned [THIS IS PROBLEMATIC] how is itt possible ?

Thank you for your advice and your answer.

0 Answers
Related