Question

I am using using in App purchase in my app. In sandbox mode validity of product reduced http://dev-ios.blogspot.in/2011/05/validity-time-auto-renewables-in.html So how can I check whether the product is renewed or not? and renewed according to correct renewable time?

Was it helpful?

Solution

When ever your app is open you want to post the receipt-data and password to the apple server.

It returns with a STATUS :

  • if status is 0 subscription is auto renewed.

  • if status is 21000 The App Store could not read the JSON object you provided.

  • if status is 21002 The data in the receipt-data property was malformed.

  • if Status is 21003 The receipt could not be authenticated.

  • if status is 21004 The shared secret you provided does not match the shared secret on file for your account.

  • if Status is 21005 The receipt server is not currently available.

  • if status is 21006 This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response.

  • if status is 21007 This receipt is a sandbox receipt, but it was sent to the production service for verification.

  • if status is 21008 This receipt is a production receipt, but it was sent to the sandbox service for verification.

Refer this link for auto renewable subscriptions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top