Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I verify IOS In-App Purchasing Receipts in Bulk?

I'm working on an iOS app that will use Apple's in-app purchasing framework to let the user create auto-renewing subscriptions.

I want my server to check periodically that none of the subscriptions have expired. Apple's Receipt Validation Programming Guide describes a verifyReceipt web service that appears to validate a single receipt.

However, if I want to bulk-verify my entire database every few days, is there a better way to do that than a storm of individual verifyReceipt calls?

like image 812
Bill Avatar asked May 13 '14 21:05

Bill


2 Answers

You don't need to need to bulk-verify your entire database. A subscription is valid for a fixed duration. If the user cancels their subscription then this takes effect at the next renewal period, not immediately.

Apple customer service can refund a subscription if a user has a case (wrong product purchase is one example they give) but this would be a pretty low figure - and your app should also check for a valid subscription when it starts.

So you should only need to verify subscriptions that are known to be expiring "today".

like image 65
Paulw11 Avatar answered Nov 07 '22 06:11

Paulw11


To my knowledge there's no way to send multiple receipts in one bulk request to validate them in the iTunes servers... You have to send one by one. (Multiple requests)...

I don't know if how you are planing to solve this is the best approach. Apple has extended documentation on how to handle auto renewal subscriptions, most of the times you check the validity of the subscription in the app itself.

Check the in-app purchase documentation. It's a very good read if you plan to depend on in-app subscriptions for your business model: https://developer.apple.com/library/ios/technotes/tn2259/_index.html

like image 40
Kiko Lobo Avatar answered Nov 07 '22 08:11

Kiko Lobo