How to know auto renewable Product renews in sandbox mode

1.3k views Asked by At

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?

1

There are 1 answers

2
MANCHIKANTI KRISHNAKISHORE On BEST ANSWER

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.