Forum Xamarin Xamarin.iOS

Storekit In-App purchases: Re-purchasing a renewable subscription returning "Purchased" transaction.

Our application uses in-app renewing subscriptions to reference titles (essentially books) with linked user customization. In the sandbox, we are finding that when a user attempts to purchase a subscription that is already active on the iTunes account the transaction that is produced and entered in the queue is in the transaction state of "purchased".

The docs indicate:
"If the user attempts to purchase a product that’s already been purchased, rather than using your app’s restoration interface, the App Store creates a regular transaction instead of a restore transaction. The user isn’t charged again for the product. Treat these transactions the exact same way you treated the original transactions."

Is this behavior expected/is a "normal transaction" meant to be "Purchased" or does production use a different state in this scenario? In the event of this is there any way for the App to detect that this purchase was already subscribed and react to it differently say to avoid associating a purchase twice? Some forums indicate that this occurrence should return a state of "Failed" but we have not seen this.

We are having this problem because according to Apple guidelines we are not allowed to ask a user for an email/password account creation before allowing them to make purchases so it has been difficult to associate purchases on our servers adequately without this common key and there are no ways to associate the purchase to our server's user tables as there isn't necessarily a user that exists at that point in the flow. Re-purchasing a subscription giving a seemingly valid purchase is one of these cases where the app has no key to link to an account. (Any tips on that association of purchase to 3rd party user would be great too!)

In summary, does anyone have extra info on if re-purchased subscriptions that are active are supposed to show the "Purchased" state, and if so, is there a way to associate this new generated purchase to an iTunes/our server user without calling RestorePurchases on launch and without breaking guidelines in order to avoid re-attributing the purchase to other remote server users?

Any help is much appreciated!

Sign In or Register to comment.