Description:
We are developing an iOS app that offers only one auto-renewable subscription.
Recently, a user who had not subscribed for over a year purchased the subscription again through our app. However, when they checked Settings > Subscriptions, the new subscription did not appear. Instead, only their past subscription history was visible, and there was no option to cancel the new subscription. We have verified this issue with a screenshot provided by the user.
Additionally, we checked our app’s logs and confirmed that StoreKit.product.purchase successfully returned .success, indicating that the purchase was processed correctly.
Code used for purchase:
let result = try await product?
.purchase(options: [
.appAccountToken(uuid)
])
switch result {
case .success(let verificationResult):
switch verificationResult {
case .verified(let transaction):
addPurchaseLog("verificationResult.verified.")
case .unverified(_, let verificationError):
addPurchaseLog("verificationResult.unverified.")
case .userCancelled, .pending, .none:
addPurchaseLog("verificationResult.userCancelled or .pending or .none")
@unknown default:
addPurchaseLog("verificationResult.unknown.")
}
Despite the successful purchase, the new subscription does not appear under the user's active subscriptions. Could this be a bug in StoreKit? If there are any known issues or workarounds, we would appreciate any guidance.
Environment:
Xcode: 16.2
iOS version: 16.0+
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Our app introduces monthly subscriptions.
The process is to execute SKProductsRequest.start() from the app, verify the received receipt with our system, and turn on the premium feature.
With the current app design, if you resubscribe from the iPhone settings, the app cannot detect it, so we have introduced a process to retrieve the receipt from Bundle.main.appStoreReceiptURL and verify whether it is the correct receipt.
The expected receipt information is the receipt that includes the "original_transaction_id" and "transaction_id" information as shown below.
"receipt": {
···omission···
},
"auto_renew_product_id": "jp.co.**********.subscription",
"auto_renew_status": 1,
"latest_receipt_info": {
···omission···
"original_transaction_id": "20000**********",
···omission···
"transaction_id": "200013**********",
···omission···
},
"latest_receipt": "Receipt",
"status": 0
However, as shown below, we found many logs (more than a few dozen for 2% of users) where receipts with missing information were retrieved. Considering the number of data items, it is unlikely that the receipt was falsified.
"receipt": {
···omission···
"in_app": []
},
"environment": "Production",
"status": 0
Our system links users based on "original_transaction_id" and "transaction_id," but since we are unable to obtain the necessary information, we are unable to determine whether the user has already purchased a subscription.
Question 1
What are the possible situations in which receipts with missing information like this are obtained?
For example, is it possible for a receipt like this to be generated even though no charges have been made?
Question 2
Is there a way to update such receipts with the correct information?
I searched the Developer forum, but if I do SKReceiptRefreshRequest, will I be able to obtain necessary information such as "original_transaction_id" and "transaction_id"?