How to detect expired auto renewable subscriptions?
See original GitHub issueI’m currently using react-native-iap 4.5.0 and fetching my subscriptions with RNIap.getAvailablePurchases()
Also on my back-end server I’m requesting to https://sandbox.itunes.apple.com/verifyReceipt Apple endpoint for receipts.
That endpoint returns all receipts with this data. With some logic I can handle subscription status of my users at back-end. But it is more complicated in some situations.
{
"quantity": "1",
"product_id": "XXX",
"transaction_id": "1000000694388870",
"original_transaction_id": "1000000692806652",
"purchase_date": "2020-07-14 15:06:37 Etc/GMT",
"purchase_date_ms": "1594739197000",
"purchase_date_pst": "2020-07-14 08:06:37 America/Los_Angeles",
"original_purchase_date": "2020-07-17 10:42:15 Etc/GMT",
"original_purchase_date_ms": "1594982535000",
"original_purchase_date_pst": "2020-07-17 03:42:15 America/Los_Angeles",
"expires_date": "2020-07-14 15:11:37 Etc/GMT",
"expires_date_ms": "1594739497000",
"expires_date_pst": "2020-07-14 08:11:37 America/Los_Angeles",
"web_order_line_item_id": "1000000054037348",
"is_trial_period": "false",
"is_in_intro_offer_period": "false"
},
My questions is; How can I use only my app to check subscription’s expire status without back-end service?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
checking if an auto-rewew subscription expired
1) If the app detect that the subscription has expired it adds a transaction observer and awaits a call to updatedTransactions with a...
Read more >Checking auto-renewable subscriptions for expiration
According to Apple's Validate App Store Receipt, you should use expires_date . This key is only present for auto-renewable subscription ...
Read more >The Ultimate Handbook On App-Store Receipt Validation
Indicates whether an auto-renewable subscription will renew at the end of the current subscription period. “1” illustrates that it will and “0” shows...
Read more >Microsoft 365 Developer Program subscription expiration and ...
You can determine whether you have a renewable or non-renewable subscription by viewing your Microsoft 365 Developer Program dashboard.
Read more >Swift tutorial: Auto-renewable subscriptions in iOS - Apphud
How often you should validate a receipt to get the latest subscription info? Probably the good way is to call once during the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess you could validate a subscription with the following code:
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.