Cancelled In App Subscriptions

one of my app users cancelled the subscription from settings. After that, she tried to buy the subscription from app which she could not as I receive same transaction id and previous exp date.

Use can renew only from settings ? or user can buy same subsctiption again from my app ?

What happens if she deletes the app and then tries purchasing a subscription plan again?

Based on the information shared it looks like the user disabled the renewal of the subscription, but the subscription may still be valid.

Your app should be checking all the current active subscriptions from your users to determine the access level to your app's content. Following this documentation you can see different ways to access the user's transaction history and current entitlements to determine their subscription status: https://developer.apple.com/documentation/storekit/transaction#Access-transaction-history-and-current-entitlements

After understanding the subscriber state using the prior documentation, if you see a user that has an active subscription but won't be renewing based on the info provided by RenewalInfo, they can renew the subscription using showManageSubscriptions right inside your app, or a regular Product.purchase as long as the user still has access to the content until expiration.

Also, I highly recommend you to check out this WWDC Video around proactive restore, as this may give you great guidance on how to manage these situations.

Cancelled In App Subscriptions
 
 
Q