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?

有帮助吗?

解决方案

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".

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top