Hello all,
I am new to implementing payments in an app, and thus completely at sea here.
I have created a small app that I have set a one-time (non-consumable) payment for a premium version.
In the Xcode simulator (on all platforms) and on any physical test devices I have tried, the payment works as expected. I have a sandbox account and various test accounts, both dummy and actual real accounts (friends and family). Everywhere everything works perfectly fine.
Yet, when I submit for review I get a rejection with this contents:
We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, the app still failed to load the in-app purchase. Please review the details and resources below and complete the next steps.
Review device details:
Device type: iPad Air (5th generation)
OS version: iPadOS 18.6
Next Steps
When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.
Additionally, note that the Account Holder must accept the Paid Apps Agreement in the Business section of App Store Connect before paid in-app purchases will function.
Resources
Learn how to set up and test in-app purchase products in >the sandbox environment.
Learn more about validating receipts with the App Store.
Steps I have done:
I have signed all agreements and all bank account details are in order. Everything in the In-app-purchases section of the AppStoreConnect in an Active state.
I have triple checked that the configuration of the in-app purchases is correct (product IDs, amounts, etc.)
I have created test accounts and tested in sandbox
What I don't understand from the reviewer's response is what receipts validation are they talking about? I have no payment servers (the whole concept of using Apple's in-app-purchases service is to not have to deal with my own payment implementation). The StoreKit documentation specifically reads:
For each transaction that represents a current purchase, your app delivers the purchased products. To validate purchases, you can verify transactions on your server, or rely on StoreKit’s verification.
So now I am confused. The reviewer's response is so vague, and so completely deprived of details that I have no idea what to do...
Does the problem concern the product purchase trigger and the that in production environment it does not trigger?
Is it that I haven't implemented a receipt validation? Do I need to? Although the documentation mentions that it can be done by StoreKit, I couldn't find anything concerning how to do it :(
Can someone give me a hand please?
Cheers,
Alex
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hello, is it allowed to include the action=write-review URL parameter in customer support emails to direct users to the App Store review page?
Example: https://apps.apple.com/app/id[APP_ID]?action=write-review
I want to make it easy for customers to leave feedback after positive support interactions, but only if it's compliant.
Apple review says , my app displayed an error when we attempted to purchase subscriptions. Please review the details and resources below and complete the next steps.
Device type: iPad Air (5th generation)
OS version: iPadOS 26.0.1
Next Steps
When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.
Question: Is it due to Device being used by reviewer or is it really from my code. As my code relies on Apple infrastructure for purchases and all things.
Initially i did had subscription reporting api for receipt handling and all.When i went through with ChatGPT it did say that issue is due to half baked subscription module on my server. So i decided not to send any Subscription related things to backend, now it's Apple only and on App side.
Is it correct fix ? Or do i need to fix backend even though i have no use for it ?
My team did test in sandbox env via internal testing that time we had no issues. And all was tested using Mobile devices, that's why i still have question just to be sure these errors are due to devices or not?
Screenshot shared by Apple team did show they got a error popup saying Something went wrong : Unable to complete request. I am trying to reproduce in development but can't.
Anyone had got same issue before and has information on how to resolve and test for it will be helpful.
Thanks
Shikhar Sahu
我正在通过集成app-store-server-library-java来实现 iap服务端校验。我参照了官网提供的Verification Usage 的代码,运行的时候异常信息如下:
at com.apple.itunes.storekit.verification.ChainVerifier.verifyChainWithoutCaching(ChainVerifier.java:98)
at com.apple.itunes.storekit.verification.ChainVerifier.verifyChain(ChainVerifier.java:71)
at com.apple.itunes.storekit.verification.SignedDataVerifier.decodeSignedObject(SignedDataVerifier.java:186)
at com.apple.itunes.storekit.verification.SignedDataVerifier.verifyAndDecodeTransaction(SignedDataVerifier.java:72)
我的代码如下:
import com.apple.itunes.storekit.model.ResponseBodyV2DecodedPayload;
import com.apple.itunes.storekit.verification.SignedDataVerifier;
import com.apple.itunes.storekit.verification.VerificationException;
import com.auth0.jwt.JWT;
import com.auth0.jwt.interfaces.DecodedJWT;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Base64;
import java.util.Set;
public class ExampleVerification {
public static void main(String[] args) throws FileNotFoundException {
String bundleId = "com.example";
Environment environment = Environment.SANDBOX;
Set<InputStream> rootCAs = Set.of(
new FileInputStream("AppleRootCA-G3.cer"),
new FileInputStream("AppleRootCA-G2.cer")
);
Long appAppleId = null; // appAppleId must be provided for the Production environment
SignedDataVerifier signedPayloadVerifier = new SignedDataVerifier(rootCAs, bundleId, appAppleId, environment, true);
String appTransactionJWS = "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IkFwcGxlX1hjb2RlX0tleSIsIng1YyI6WyJNSUlCeXpDQ0FYR2dBd0lCQWdJQkFUQUtCZ2dxaGtqT1BRUURBakJJTVNJd0lBWURWUVFERXhsVGRHOXlaVXRwZENCVVpYTjBhVzVuSUdsdUlGaGpiMlJsTVNJd0lBWURWUVFLRXhsVGRHOXlaVXRwZENCVVpYTjBhVzVuSUdsdUlGaGpiMlJsTUI0WERUSTFNRFl3TXpFeE1UQXdNRm9YRFRJMk1EWXdNekV4TVRBd01Gb3dTREVpTUNBR0ExVUVBeE1aVTNSdmNtVkxhWFFnVkdWemRHbHVaeUJwYmlCWVkyOWtaVEVpTUNBR0ExVUVDaE1aVTNSdmNtVkxhWFFnVkdWemRHbHVaeUJwYmlCWVkyOWtaVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCTnZZZ3o1MW1CbEMweE5McW9rMUJCcithRWJEb1ZEeVkyaVRsejZsK1JjYVR4QStVY2ptMjBESTNncFFlM280a2doRGxSbGowdEo1enBGUHgyQWR2VCtqVERCS01CSUdBMVVkRXdFQlwvd1FJTUFZQkFmOENBUUF3SkFZRFZSMFJCQjB3RzRFWlUzUnZjbVZMYVhRZ1ZHVnpkR2x1WnlCcGJpQllZMjlrWlRBT0JnTlZIUThCQWY4RUJBTUNCNEF3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUloQU40bUJWTHBoZkpjYjdweHF2b09XcjkyK1czYU5LRG9pazV5Vk9BT0NEVmxBaUFYWVF0czJubWZGMStGYzlSODJHXC96QWhaVU00aDNTXC9VdFE4Q1lPS2p3ZlE9PSJdfQ.eyJhcHBsaWNhdGlvblZlcnNpb24iOiIxIiwib3JpZ2luYWxQdXJjaGFzZURhdGUiOjAsImJ1bmRsZUlkIjoiYnJpZ2h0LnVuaWhhbmQuY24iLCJhcHBUcmFuc2FjdGlvbklkIjoiMCIsImRldmljZVZlcmlmaWNhdGlvbiI6IlRYdGRvMWZtNDhQVDdXUUh5cHU4K2l3TW55YmNoTTNNeG5XUnhOR1JqSFhQQnVqMXdUaldcL05zN3JtUmJlQTd3IiwicmVjZWlwdFR5cGUiOiJYY29kZSIsIm9yaWdpbmFsQXBwbGljYXRpb25WZXJzaW9uIjoiMSIsInJlcXVlc3REYXRlIjoxNzYxMDM1OTMzNTE3LCJvcmlnaW5hbFBsYXRmb3JtIjoiaU9TIiwicmVjZWlwdENyZWF0aW9uRGF0ZSI6MTc2MTAzNTkzMzUxNywiZGV2aWNlVmVyaWZpY2F0aW9uTm9uY2UiOiI1ZDhmNzM5Mi01N2YwLTQyM2YtOTMzNy1hZDQ0YTk5MDM4Y2EifQ.2ZO5xsx-yywP4IyaDz4KQ3mq181ZGwlX2uANSm-kHq50KIdMMUDveMsCrcZmHdzLH2rpfPsXKaIMdM25Hdcuuw";
DecodedJWT unverifiedJWT = JWT.decode(appTransactionJWS);
String header = unverifiedJWT.getHeader();
System.out.println(new String(Base64.getDecoder().decode(header)));
try {
signedPayloadVerifier.verifyAndDecodeTransaction(appTransactionJWS);
} catch (VerificationException e) {
e.printStackTrace();
}
}
}
查看了ChainVerifier.java 源代码,发现
private static final int EXPECTED_CHAIN_LENGTH = 3; // <--- 关键常量
// ...
PublicKey verifyChainWithoutCaching(String[] certificates, boolean performRevocationChecking, Date effectiveDate) throws VerificationException {
// ... 解析证书代码 ...
if (parsedCertificates.size() != EXPECTED_CHAIN_LENGTH) {
throw new VerificationException(VerificationStatus.INVALID_CHAIN_LENGTH); // <--- 抛出异常点
}
// ... 后续验证代码 ...
}
appTransactionJWS是来自客户端的沙盒环境。
我发现沙盒环境的jws总是包含一个证书,而后端验证又必须要求三个证书,请问这个问题如何解决。
Topic:
App & System Services
SubTopic:
StoreKit
Hello,
I’m facing an issue with auto-renewable subscriptions in my React Native iOS app using react-native-iap.
Before App Store approval, everything worked perfectly — I could test in-app purchases and subscriptions locally on my iPhone through Xcode using a development build and sandbox tester.
After the app was approved and released on the App Store, I needed to make some updates. Now, when I build and run the same project again through Xcode (Debug, development-signed) on my iPhone, the subscriptions no longer load.
The same product IDs are approved and live in App Store Connect.
The live version on the App Store works fine (subscriptions load and process successfully).
But on the local Xcode build, getSubscriptions() returns invalid product identifiers or an empty list.
No changes were made to the bundle ID or product IDs
The build is signed with an Apple Development certificate and uses the same team and bundle identifier as the published app.
“In-App Purchase” capability is enabled.
I’ve also tried deleting the app, rebooting the device, and re-logging into a sandbox tester account, but the issue persists.
It looks like the sandbox environment no longer works for the app after its first App Store release.
Has anyone experienced this issue where the same approved app’s IAPs work in production but fail to load in sandbox/dev builds through Xcode after release?
Any guidance on re-enabling sandbox testing for updates would be greatly appreciated.
Environment:
Xcode 26.0.1
React Native with react-native-iap
Auto-renewable subscriptions (3 SKUs)
Thank you!
Hi does anyone have trouble using expo store review package for ios apps. for some reason on our app., the review may show for certain people, but when they submit a review, it doesn't update our review count
Topic:
App & System Services
SubTopic:
StoreKit
We've been approved for the Advanced Commerce API. After receiving the approval, we completed the initial setup requirements (submitted a generic product ID and shared our subscriptions page deep link).
When testing the Migrate Subscription to Advanced Commerce endpoint in the sandbox, we receive a 5000000 error.
What could be the reason/s for it? There is no information, and the API call we make includes all required parameters. Could it be related to the fact that our new generic product ID status is "Missing Metadata"? Is there a way to understand what the issue is on Apple's side?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
App Store Server API
Advanced Commerce API
We got Advanced Commerce API and the generic product identifiers approved. When I was try to migrate a sandbox subscription to ACA enabled subscription I hit an error
Request payload
(Hid some info but the requestReferenceId is the real)
{
"descriptors": {
"description": "Migrated",
"displayName": "Migration"
},
"items": [
{
"sku": "product_1mo_999",
"description": "description",
"displayName": "Product"
}
],
"requestInfo": {
"requestReferenceId": "3b0b8e67-d8a0-45f4-8f6d-06bffa9a2c08"
},
"storefront": "USA",
"targetProductId": "com.company.generic.subscription",
"taxCode": "C003-00-1"
}
Response
{
"errorCode": 5000000,
"errorMessage": "An unknown error occurred."
}
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
App Store Server API
Advanced Commerce API
Starting around October 12, 2025 at 19:51 UTC, we're seeing intermittent failures when verifying StoreKit transaction JWTs. The issue appears to be related to certificate expiration in the x5c chain in the JWT tokens provided by Apple.
What We're Seeing
Some JWTs are being signed with different certificates. Some work, some fail certificate validation.
Old Certificate (Expired - causing failures):
Subject: Prod ECC Mac App Store and iTunes Store Receipt Signing
Issuer: Apple Worldwide Developer Relations Certification Authority (G6)
Serial: 166451396673336810269824643773700992094
Valid From: 2023-09-12 19:51:53 UTC
Valid To: 2025-10-11 19:51:52 UTC ❌ EXPIRED
New Certificate (Valid - working):
Subject: Prod ECC Mac App Store and iTunes Store Receipt Signing
Issuer: Apple Worldwide Developer Relations Certification Authority (G6)
Serial: 95385247725814954943813376527885434295
Valid From: 2025-09-19 19:44:51 UTC
Valid To: 2027-10-13 17:47:23 UTC ✓ VALID
Current Status
Most JWTs use the new valid certificate. Some JWTs still use the expired certificate. This appears inconsistent/random. I don't know if it's an issue with some of Apple's servers, or an issue with StoreKit on-device cache, but seems to me like a bug on Apple's side either way.
Are we missing something? Is this a known issue?
Any guidance or timeline from Apple would be greatly appreciated, as this is blocking legitimate paying users.
After creating a new weekly subscription option, I get inconsistent results for subscriptionPeriod. In local testing with a synced or a un-synced StoreKit file I am getting unit == .week (as expected) whereas in TestFlight I am getting unit == .day. This makes unit.localizedDescriptionsomewhat unusable in the paywall.
Am I missing something? Or is this bug or a limitation of StoreKit and/or TestFlight and/or newly created subscription options?
Affected code (in a custom SubscriptionStoreControlStyle):
private func priceDisplay(for pickerOption: Configuration.PickerOption) -> String {
var result = ""
if pickerOption.introductoryOffer != nil {
result += NSLocalizedString("then", comment: "") + " "
}
result += pickerOption.displayPrice
if let unit = pickerOption.subscriptionPeriod?.unit {
result += " / " + unit.localizedDescription
}
return result
}
private func percentageSaved(for pickerOption: Configuration.PickerOption, allOptions: [Product]) -> Int? {
guard let subscriptionPeriod = pickerOption.subscriptionPeriod, subscriptionPeriod != .weekly else {
return nil
}
let weeklyOption = allOptions.first { otherOption in
otherOption.subscription?.subscriptionPeriod == .weekly
}
guard let weeklyOption, weeklyOption.price > 0 else {
return nil
}
let percentageSaved = 100 - (pickerOption.price / (weeklyOption.price * 52)) * 100
return Int((percentageSaved as NSNumber).doubleValue)
}
In-App Subscriptions Not Fetching in Sandbox or Production (expo-iap / React Native / Bare Workflow)
Hi everyone,
I’m encountering an issue with my in-app subscriptions setup.
When I test using the StoreKit configuration file in Xcode, everything works correctly — the subscriptions are fetched and I can simulate purchases without any issues.
However, when I switch to the Sandbox or Production environment, my app fails to fetch the available products from Apple’s servers. The call to fetchProducts (from the expo-iap library) returns an empty array.
Here’s some context about my setup:
Framework: React Native (Expo Bare Workflow)
Library: expo-iap
Products: Auto-renewable subscriptions
StoreKit Configuration: Synced with App Store Connect
Status: Subscription Plans are approved in App Store Connect
I’ve verified the following:
The product identifiers in code match exactly with those in App Store Connect.
The app is signed with the correct bundle ID.
I’m testing with a Sandbox account (logged in via Settings -> Developer -> Sandbox Tester Account).
Despite this, the response from Apple’s servers still contains an empty array.
Has anyone experienced something similar with expo-iap or in general when moving from StoreKit configuration to Sandbox/Production? Any suggestions on what else I could check or common pitfalls I might be missing?
Thanks in advance!
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
Problem:
I'm implementing StoreKit 2 in my SwiftUI app. Products load successfully when I rebuild in Xcode, but on a fresh install, Product.products(for:) returns an empty array. The paywall shows "Unable to load pricing."
Setup:
Using StoreKit Configuration File (
.storekit
) for testing
Product IDs match exactly between config and code:
com..premium.lifetime (non-consumable)
com..premium.monthly (auto-renewable subscription)
com.****.premium.yearly (auto-renewable subscription)
StoreKitManager is a @MainActor singleton with @Published properties
What I've Tried:
Initial delay before loading - Added 1-second delay in init before calling loadProducts()
Product ID verification - Confirmed IDs match exactly between StoreKitConfig.storekit and code
Retry logic with exponential backoff - Implemented 3 retry attempts with 0.5s/1s/1.5s delays
Multiple calls to updatePurchasedProducts() - Called twice after initial load
Verified StoreKit configuration - File is properly added to project, has valid product definitions
Code Structure:
swift
@MainActor
final class StoreKitManager: ObservableObject {
static let shared = StoreKitManager()
@Published private(set) var products: [Product] = []
private init() {
updateListenerTask = listenForTransactions()
Task {
try? await Task.sleep(nanoseconds: 1_000_000_000)
await loadProducts() // Returns empty on fresh install
await updatePurchasedProducts()
}
}
}
Observations:
✅ Works perfectly after Xcode rebuild
❌ Fails on fresh app install (simulator & device)
❌ Product.products(for:) returns empty array (no error thrown)
✅ StoreKit configuration file is valid and properly configured
Question: Why does StoreKit need a rebuild to recognize products? Is there a proper initialization sequence I'm missing for fresh installs?
Environment:
Xcode [Version 26.0 beta 7]
iOS [IOS +17.0]
Testing with StoreKit Configuration File
We are currently using App Store Server Notifications V2 in a production environment, but occasionally encounter the error "Failed to parse signedTransactionInfo in the notification payload. status=VERIFICATION_FAILURE."
What could be the cause of this error? Also, is there a way to resolve this error?
After the notification from Apple was received on the server side, it was passed to the Apple library and an error occurred in the Apple library when decryption was performed.
I'm developing an app and I think I've implemented what I need to in the swift code. However, when I click the Purchase button in my app, I see "Cannot connect to App Store" when the App Store app opens. Attached are images showing how I've configured the Sandbox user. What am I doing wrong? I expect to be able to do a fake purchase to test subscription activation in the app, but it doesn't work.
Looking to update one of my apps that uses SKStoreReviewController +requestReview (deprecated) to
AppStore.requestReview(in:)
umm...I have a few of questions...
Why is an NSViewController parameter required? It's really not so uncommon for an AppKit app to just use NSWindowController with a window that does not use NSViewController...
It should be possible to present the review request in a standalone alert (attached to a window is preferred IMO but it still should be possible to ask in separate window).
3)...why Swift..(err nevermind)
Ideally:
AppStore requestReview should take a NSWindow parameter but that parameter should be optional. If nil the request should be presented in a standalone window (like an alert). If non nil..present as a sheet on the window.
Why a view controller? Maybe I'm missing something.
Regarding the offer codes in https://developer.apple.com/help/app-store-connect/manage-subscriptions/set-up-offer-codes, I set up some incorrect offer codes by mistake.
Currently, I can only deactivate it but I can't delete it. Is it possible to let me delete the incorrect offer codes due to the below reasons? Thank you.
I can't recreate the offer code due to error message This reference name is or has been used by another offer in this subscription group.
When I use the offer code redemption view in https://developer.apple.com/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:), it shows all the deactivated offer codes. I don't want them to be displayed in the page.
Question:
In the sandbox environment, I attempted to perform an In-App Purchase within an IME (Input Method Extension) using a sandbox test account. The purchase flow completed successfully, and I received the success callback.
However, I encountered an issue: no receipt file is generated. I tried checking with both the main app’s bundle and the IME’s bundle, but the receipt file was not found in either case.
When I attempted to refresh the receipt using SKReceiptRefreshRequest, it failed with an exception (error code: 0).
I would appreciate any guidance on how to resolve this issue.
I tested a subscription with my developer account, it never charges but at the same time I can't cancel it anymore. It does not appear in the list of my official purchsed subscriptions. I tried to login to the sandbox with my developer account, but then when I click on "Manage" I just keep getting the error "Can't connect - retry".
I have already tried to logout from all the services, App store, etc. and re-login, nothing worked.
Is there anything I can do?
Thanks in advance to anyone who can give any tips.
After downloading Backyard Birds and following the steps in the section "Configure the sample code project" (i.e. enabling local StoreKit testing in the scheme).
When I run the macOS app from within XCode, the following error occurs.
Whenever I try to purchase any item from within the app, I am presented with the following error dialogue:
"Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again."
This happens after I click the purchase button (i.e. the button that displays the price).
The Xcode logs show the following errors:
Error handling payment sheet request: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated from this process." UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated from this process.}
Type: Error | Timestamp: 2025-09-26 18:05:36.214491+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.apple.storekit | Category: Default | TID: 0xafed
followed by
Purchase did not return a transaction: Error Domain=ASDErrorDomain Code=5115 "Received failure in response from Xcode" UserInfo={NSDebugDescription=Received failure in response from Xcode, NSUnderlyingError=0x600001545470 {Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated from this process." UserInfo={AMSDescription=Ein unbekannter Fehler ist aufgetreten. Versuche es erneut., AMSURL=http://localhost:49244/WebObjects/MZBuy.woa/wa/inAppBuy, NSDebugDescription=The connection to service created from an endpoint was invalidated from this process., AMSStatusCode=200, AMSServerPayload={
"app-list" = (
);
dialog = {
cancelButtonString = Cancel;
defaultButton = Buy;
explanation = "Do you want to buy one Box of Nutrition Pellets for $3.99?\n\n[Environment: Xcode]";
initialCheckboxValue = 1;
"m-allowed" = 0;
message = "Confirm Your In-App Purchase";
okButtonAction = {
buyParams = "bid=com.example.apple-samplecode.Backyard-BirdsHQN4U5V5MY&bvrs=1.0&offerName=pellet.box&quantity=1&deviceVerification=0aee9116-fef7-5d20-b21b-b28848615717&storekitViewInitiated=true";
itemName = "pellet.box";
kind = Buy;
};
okButtonString = Buy;
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = US;
currency = USD;
designVersion = 2;
displayPrice = "$3.99";
flexList = (
{
value = (
{
style = priceMain;
value = "$3.99";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
header = "$null";
value = "For testing purposes only. You will not be charged for confirming this purchase.";
}
);
price = "3.99";
requestor = AppStore;
salableIcon = "http://localhost:49244/StoreKit/AppIcon?bid=com.example.apple-samplecode.Backyard-BirdsHQN4U5V5MY";
salableIconType = app;
salableInfo = (
"Box of Nutrition Pellets %%image_0%%",
"Backyard Birds",
"In-App Purchase"
);
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
bold = true;
name = priceMainSpaceBefore;
size = large;
spacingBefore = medium;
}
);
title = {
type = text;
value = Xcode;
};
};
};
"download-queue-item-count" = 0;
dsid = 17322632127;
failureType = 5115;
jingleAction = inAppBuy;
jingleDocType = inAppSuccess;
pings = (
);
}}}}
Type: Error | Timestamp: 2025-09-26 18:05:36.346918+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.apple.storekit | Category: Default | TID: 0xafea
I am running
Xcode Version 26.0.1 (17A400)
macOS Sequia 15.7
What I have tried so far:
created a new admin user, logged in as that user, installed Xcode and ran the Backyard Bird sample from there. Same error.
This also happens with my own app, when I am trying to test purchasing.
How can I further debug this problem?
Topic:
App & System Services
SubTopic:
StoreKit
Description of the Issue
We are encountering issues with App Store Server Notifications, where the notification type received does not align with our expectations for subscription changes. Specifically, we receive DID_RENEW notifications in scenarios involving downgrades or intra-tier upgrades, which disrupts our backend subscription management logic and may lead to incorrect user subscription states and billing errors. Below are two reproducible scenarios with associated transaction data.
Scenario 1: Downgrade from Premium Yearly (with 7-Day Trial) to Standard Yearly
Steps to Reproduce:
A user purchases the Premium Yearly subscription with a 7-day free trial (initial transaction ID: 700002116066502).
On the day before the trial ends, the user downgrades to the Standard Yearly subscription via the App Store’s subscription management interface.
Expected Behavior:
We expect to receive a DID_CHANGE_RENEWAL_STATUS or a similar downgrade notification (e.g., DID_CHANGE_RENEWAL_PREF) to indicate the subscription plan has been downgraded, enabling immediate updates to the user’s subscription status.
Actual Behavior:
Upon downgrade, our server receives a DID_RENEW notification instead of a downgrade-specific notification. This causes our system to incorrectly interpret the action as a renewal of the Premium subscription rather than a downgrade to Standard, with no subsequent downgrade confirmation received.
Relevant Transaction Data:
New Transaction ID: 700002122810952
Notification Type: DID_RENEW
Notification UUID: 26de9b0e-5d61-4893-b679-0bd18ae3d208
Original Transaction ID (Trial): 700002116066502
Scenario 2: Intra-Tier Upgrade from Standard Monthly to Standard Yearly
Steps to Reproduce:
A user purchases the Standard Monthly subscription.
On the day before the monthly subscription expires, the user switches to the Standard Yearly subscription via the App Store’s subscription management interface.
Expected Behavior:
The original Monthly subscription expires normally, with a DID_EXPIRE notification received.
Upon expiration, we expect a DID_RENEW or SUBSCRIBED notification for the new Yearly subscription to confirm its activation, allowing seamless transition of the user’s subscription plan.
Actual Behavior:
Immediately after the upgrade, our server receives a DID_RENEW notification for the new Yearly plan.
No further notifications are received, including no DID_EXPIRE for the original Monthly subscription. This leaves our system unable to confirm the expiration of the Monthly plan, potentially resulting in duplicate active subscriptions in our records.
Relevant Transaction Data:
Transaction ID: 70002902074491
Notification Type: DID_RENEW
Notification UUID: 3d35bc2f-e769-4549-bf50-d84d41b10342
Impact
These notification discrepancies disrupt our subscription lifecycle management, potentially causing incorrect user entitlements, over-billing, and a degraded user experience.
Requested Assistance
Please confirm the correct notification types for these scenarios as per Apple’s documentation (e.g., App Store Server Notifications V2).
Provide guidance on handling these edge cases, including any recent changes to notification logic.
If this is a backend issue, please investigate the provided transaction IDs and Notification UUIDs.
Thank you for your prompt assistance. We look forward to your response to help resolve this issue for our users.
问题描述:
我们在处理 App Store 订阅变更通知时发现,服务器接收到的通知类型与预期不符,具体表现为降级或同级升级场景下错误接收到 DID_RENEW 通知。这影响了我们后端订阅管理的逻辑,可能导致用户订阅状态和计费出现偏差。以下是两个可重现的场景及相关交易数据。
场景 1:高级年费(含 7 天试用)降级至标准年费
重现步骤:
用户购买高级年费订阅并开启 7 天免费试用(初始交易 ID:700002116066502)。
在试用期结束前一天,用户通过 App Store 的订阅管理界面降级至标准年费订阅。
预期行为:
我们预期会收到 DID_CHANGE_RENEWAL_STATUS 或类似的降级通知(如 DID_CHANGE_RENEWAL_PREF),以表明订阅计划已降级,从而允许我们立即更新用户订阅状态。
实际行为:
降级后,服务器立即收到 DID_RENEW 通知,而非降级相关通知。这导致系统误认为高级订阅仍在续订,而非降级为标准订阅,且后续未收到任何降级确认通知。
相关交易数据:
新交易 ID:700002122810952
通知类型:DID_RENEW
通知 UUID:26de9b0e-5d61-4893-b679-0bd18ae3d208
原始交易 ID(试用):700002116066502
场景 2:标准月费订阅升级为标准年费订阅
重现步骤:
用户购买标准月费订阅。
在月费订阅到期前一天,用户通过 App Store 的订阅管理界面切换至标准年费订阅。
预期行为:
原月费订阅正常到期,预期收到 DID_EXPIRE 通知。
月费到期后,预期收到新年费订阅的 DID_RENEW 或 SUBSCRIBED 通知,以确认年费订阅开始,方便我们无缝切换用户订阅计划。
实际行为:
升级后,服务器立即收到新年费订阅的 DID_RENEW 通知。
后续未收到任何通知,包括原月费订阅的 DID_EXPIRE 通知。这导致我们无法确认月费订阅的到期状态,可能在记录中出现重复的活跃订阅。
相关交易数据:
交易 ID:70002902074491
通知类型:DID_RENEW
通知 UUID:3d35bc2f-e769-4549-bf50-d84d41b10342
影响:
这些通知异常干扰了我们的订阅生命周期管理,可能导致用户权益错误、潜在的重复计费以及用户体验下降。
请求协助:
请确认根据 Apple 文档(例如 App Store Server Notifications V2)在上述场景中应返回的正确通知类型。
请提供处理此类边缘场景的指导,包括通知逻辑的任何最新变更。
如果这是后端问题,请调查提供的交易 ID 和通知 UUID。
感谢您的及时协助,期待您的回复以帮助我们为用户解决问题。