Local receipt doesn't get updated after (automatically) renewing a subscription
Asked Answered
S

0

6

I have an app that uses in-app purchases (IAP), specifically auto-renewable subscriptions.

Occasionally it seems that, when a subscription automatically get renewed, the local receipt doesn't get updated automatically. As a result, checking locally if an active subscription is available results false. Performing the same validation remotely (using Apple servers) returns true.

How and when is the local stored receipt updated or is this something that can only be triggered manually? If so, does this need to happen using SKReceiptRefreshRequest or SKPaymentQueue's restoreCompletedTransactions? Based on Apple's documentation the former seems to be the way to go:

A request to refresh the receipt, which represents the user's transactions with your app.

Unfortunately, this fails, perhaps because it thinks there's noting to update? However there is: as the local receipt is outdated as it doesn't contain the renewed subscription status.

I want to ensure I'm doing things correctly and this behavior (that again happens occasionally) is not something on Apple's end.

Thanks for any feedback.

Scald answered 16/8, 2018 at 7:58 Comment(2)
From reading the documentation it seems that SKReceiptRefreshRequest should work. If that doesn't work have you tried sending the receipt up to the AppleStore to verify instead? The API should also send back the updated receipt. Validating Receipts With the App StoreHypoxanthine
When I send it to the Apple for validation, the subscription is considered active as the automatic renewed status is present. However, local validation results in an inactive subscription as the automatic renewed status isn't (yet) available in the local receipt. I would like to know when this local receipt gets refreshed, and how I can do this manually (e.g. using the two mentioned APIs).Scald

© 2022 - 2024 — McMap. All rights reserved.