0

I am using In-app purchases in my app. After a user pays for a video, they can view it.

  1. The problem is that I will have a huge list of videos on my server and price will vary for each video. So, every time when I post a video, do I need to add the video in iTunes Connect or is there an easier way?

  2. A user can watch a video only a limited number of times (say 5 times) then the user needs to pay for the video again. How do I achieve this functionality? Use consumable and restore it after 5 times? Or, is there an approach for this?

zooropa
  • 3,929
  • 8
  • 39
  • 61
iVignesh
  • 37
  • 6

2 Answers2

3

Yes, you will have to create one product per consumable that you want to sell. After the user purchases the product, send the receipt to your backend and verify and store the purchase. Then notify your client and finish the transaction. You need to make sure you keep track of the consumables that your user purchased, this might be easier if you have a login system, otherwise, things get more complicated and you might need to create a restore and alias system with random user IDs. You can read more about how the system works here

Every time you start the app you would ask your server for the purchases that the specific user has made. That way you can programmatically figure out if the user can buy to watch the same video again and let it purchase another view.

It looks to me that what you are trying to achieve is not really scalable with the way the App Store IAPs are structured right now and I would really consider a subscription model rather than a consumable based app.

Cesar
  • 682
  • 3
  • 15
0

There's four types of In-App purchases and only Consumable fits your requirements.

You'd have to implement the logic to keep track of how many times a user can watch a given video and update this data whenever a user makes a purchase or watches a video. Ideally, you'd use a database (local or remote) to keep track of this data.

With this implementation, you would only need to register a new SKU when you want a new combination of price and number of views.

Here's an example of possible SKUs:

  1. com.yourorganization.5dollars5views which lets a user view the selected video 5 times for $5
  2. com.yourorganization.5dollars10views which lets a user view the selected video 10 times for $5
  3. com.yourorganization.10dollars5views which lets a user view the selected video 5 times for $10
Francesco Puglisi
  • 2,140
  • 2
  • 18
  • 26