iOS应用内购买:如何获取用户购买信息及排查未到账问题
Hey there, let's walk through how to troubleshoot this frustrating issue where some users show as having purchased your non-consumable in-app product, but you can't find their records in Apple's developer tools. I've worked through similar cases before, so here's a step-by-step breakdown:
1. First, rule out data delays and display glitches
- Apple's Sales and Trends and App Analytics data typically have a 24-48 hour delay for new purchase records. Double-check if the user's purchase falls within this window before diving into more complex troubleshooting.
- Try refreshing the Sales and Trends page (click the refresh button in the top-right corner) or switch to a custom date range that exactly covers the user's purchase time. Sometimes partial data loads can cause records to go missing.
- In App Analytics, make sure you've selected the correct app version and region—if the user purchased from a region you haven't filtered for, their record won't show up.
2. Verify purchase details with the user
- Ask the user to share screenshots of two things: their App Store "Purchased" tab (showing the product) and the in-app screen that confirms they've bought it. Pay close attention to the product name and ID—sometimes users might have purchased a similar product from a different region, or you might have duplicate product IDs that are causing confusion.
- Guide them to check their full purchase history via
Settings > [Their Name] > Media & Purchases > View Account > Purchase History. This will show the exact order number, purchase date, and product name. You can use this order number to search directly in Sales and Trends (use the "Order Number" filter) to locate the record. - If the user is part of a Family Sharing group, remind them that non-consumable purchases are tied to the family organizer's account. The record will show up under the organizer's purchase history, not the user's own account.
3. Double-check your in-app purchase configuration in App Store Connect
- Log into App Store Connect, navigate to your app's "In-App Purchases" section, and confirm the problematic non-consumable product is approved and active (not hidden or removed). If the product was recently updated or had status changes, it might take time for records to sync correctly.
- Verify that the Product ID for the product matches exactly what's used in your app's code—even a single typo (like uppercase vs lowercase, or a missing hyphen) can break the link between the purchase and your analytics.
4. Audit your server-side purchase validation (if applicable)
- If you're using your own server to validate purchase receipts, check your server logs for errors during the validation process. Common issues include:
- Incorrect use of Apple's sandbox vs production endpoints (using sandbox for live purchases will fail validation)
- Missing logic to store the validated purchase record alongside the user's ID
- Filters that accidentally exclude valid receipts (e.g., checking for expired subscriptions when dealing with non-consumables)
- Test the flow with a test user account: make a purchase, then trace the receipt from the app to your server to ensure it's validated and stored correctly.
5. Reach out to Apple Developer Support if all else fails
- If you've gone through all the above steps and still can't locate the record, gather as much detail as possible: the user's order number, product ID, purchase date, and the user's Apple ID (with their permission). Submit a request to Apple Developer Support, asking them to investigate the discrepancy between the user's purchase status and your developer tool records. Apple's internal systems can often flag issues like failed syncs or hidden order statuses that aren't visible to you.
内容的提问来源于stack exchange,提问作者kalpesh




