React-native-iap: How to check subscription auto renewed or not on iOS ?

Created on 10 Jun 2019  路  7Comments  路  Source: dooboolab/react-native-iap

馃摫 iOS 馃檹 help wanted

Most helpful comment

@Stafox Thanks for providing this information. As you said, apple and google recommend us to use your own backend server to do any receipt validation but for some ease of use or some other MVP apps, I've provided offline receipt validation.
I might have to look on your link someday to support this in offline.

All 7 comments

We need community support for this since I've not yet tested this feature

Apple Docs on this subject

Below a few ways that i'm currently aware of:

  1. When validating a receipt with the Apple Servers, and the receipt validates, check if there's a new transaction after the last known expirationDate. If there is, its renewed.

  2. Subscribe to status update notifications on your own server to receive RENEWAL notification types. Setup the Subscription Status URL in App Store Connect.

Currently got 1 working, but that only works when "polling" randomly or when the user opens/uses the app. Now implementing 2 to have a complete history of subscription status changes without any polling or user action within the app.

@hyochan what about adding possibility to decode transactionReceipt like it was made there: https://github.com/robotmedia/RMStore/blob/master/RMStore/Optional/RMAppReceipt.m

It allows also to resolve current issue. I know that I able to verify receipt using Apple Server, but I don't like the way to call Apple server twice (when make a purchase, and to verify).

What you think about that?

@Stafox Thanks for providing this information. As you said, apple and google recommend us to use your own backend server to do any receipt validation but for some ease of use or some other MVP apps, I've provided offline receipt validation.
I might have to look on your link someday to support this in offline.

Similar to #532 could #275 help this?

I'll close this for now since this is already solved issue.

@hyochan Thanks for pointed out the issue, and @Stafox Thanks for the information you provided. I think that the best way to handle it.

Was this page helpful?
0 / 5 - 0 ratings