Hello everyone,
I'm having trouble testing custom offer codes for my auto-renewable subscription in the Sandbox environment.
I am using the modern StoreKit 2 API to display the redemption sheet:
try await StoreKit.AppStore.presentOfferCodeRedeemSheet(in: windowScene)
When I enter a valid custom code that I created in App Store Connect, the system sheet immediately returns the following error:
"Cannot Redeem Code. The code entered is not valid. [environment: sandbox]"
To be clear, I am manually typing the custom code string itself into the redemption sheet's text field, not using a one-time code link or URL.
I believe my configuration is correct, and I've already spent a significant amount of time troubleshooting. Here is a list of everything I have checked and tried so far:
App Store Connect Configuration:
The Offer Code is marked as "Active".
The parent subscription product is approved and its status is "Ready for Sale".
The offer's eligibility is set correctly
The start and end dates for the offer are valid.
Despite all these steps, the error persists. At this point, I suspect this might be a temporary issue with the Sandbox environment itself, but I want to make sure I haven't missed any crucial configuration steps.
Has anyone else encountered this issue recently? Is there anything else I should be checking?
Any help would be greatly appreciated.
Thank you.
App Store Connect API
RSS for tagThe App Store Connect API helps you automate tasks usually done on the Apple Developer website and App Store Connect.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am contacting you to clarify a technical issue regarding the behavior of App Store Server Notifications (V2), as we have observed differences depending on the subscription plan.
Currently, we have noticed the following behavior when a refund occurs for an auto-renewable subscription:
Observed Behavior:
Monthly Plan:When a refund occurs, we receive a REFUND notification, followed by an EXPIRED notification indicating the subscription has ended.
Annual Plan:When a refund occurs, we receive the REFUND notification, but the expected EXPIRED notification does not arrive.
Questions:
Are there any differences in the conditions for sending EXPIRED notifications after a REFUND, depending on the subscription plan (monthly vs. annual)?
Is the absence of the EXPIRED notification for annual plans an intended behavior by Apple, or could it be a possible issue?
I would appreciate your guidance on this matter.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Server Notifications
I know 500 means an issue on the server. But the system status page is all green and I think the App Store Connect API has a history of incorrectly returning 500 instead of 4xx statuses, e.g. here. So I'm sharing this in the hope of getting some more information.
I am following the steps here:
https://developer.apple.com/documentation/appstoreconnectapi/uploading-assets-to-app-store-connect
My PNG data is successfully uploaded to the URL contained in the Upload Operation for the screenshot.
The next step is to confirm the upload with its MD5 checksum, which fails.
[15:59:27.289] DEBUG (74920): AppleUploadService: PUT https://northamerica-1.object-storage.apple.com/itmspod11-assets-massilia-200001/PurpleSource211/v4/d8/8d/4b/d88d4b7c-ef96-e3a0-bfab-b793903bf2db/taiz5B2iCIVeTQQlGZFfx4f2jMPAbVruq7JKHmykh7M_U003d-1768937158953?...
[15:59:28.727] DEBUG (74920): AppleUploadService: 200 OK
[15:59:33.735] DEBUG (74920): AppStoreConnectApiClient: PATCH https://api.appstoreconnect.apple.com/v1/appScreenshots/08e7802f-5a52-49a8-91c5-f4040721607a
{
"data": {
"type": "appScreenshots",
"id": "08e7802f-5a52-49a8-91c5-f4040721607a",
"attributes": {
"uploaded": true,
"sourceFileChecksum": "714d426fc4fb39f732dca9f481c7039b"
}
}
}
[15:59:34.359] DEBUG (74920): AppStoreConnectApiClient: 500 Internal Server Error
I can't see anything wrong with my request body.
Has anyone else encountered something similar or is this truly an outage?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Hello,
I am using the App Store Connect Finance Reports API to export monthly financial statements.
API endpoint:
https://api.appstoreconnect.apple.com/v1/financeReports
Request parameters:
reportDate: 2026-01
reportType: FINANCE_DETAIL
However, the returned report shows an unexpected date range:
Start Date: 09/29/2025
End Date: 11/01/2025
This does not match the requested month January 2026, and instead seems to cover a different settlement period.
I would like to confirm:
Is the Finance Reports API returning data based on Apple’s settlement cycle rather than the requested calendar month?
How should we correctly map reportDate to the actual statement period?
Is there a recommended way to reliably retrieve the financial report for a specific month (e.g. Jan 2026)?
This behavior makes automated reconciliation difficult, so any clarification or guidance would be appreciated.
Thank you very much for your help.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
we have 80 users occur error,when use aca pay
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
我们仅有一个订阅组,一个用户收到了订阅续费消息,我们不知道发生了什么, 续费消息中的originTransactionId没有发生变化,但是userAccountToken却变化了,指向了另一个用户,此时旧的用户不会收到续费在哪的任何消息。
哪位技术大佬可以帮助解答问题,什么情况下会出现这样的情况
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
问题:一个用户升级后,苹果的通知消息中 userAccountToken 不变,但是 originTransactionId变了。此时升级前的originTransactionId还会进行周期扣款,升级后的originTransactionId也会进行周期扣款。
注意,订阅的配置是在同一个组中
哪位技术大佬可以帮助解答问题,什么情况下会出现这样的情况
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Hey there,
We've been using App Store Connect API to manage (create/update) Advanced App Clip Experiences via App Store Connect API.
Everything has worked fine, we've been able to successfully manage hundreds of app clips but all of a sudden starting on December 15th the API started returning the following error:
"id" => "1e15b36b-5347-4af0-9bab-7f6626ffec65"
"status" => "409"
"code" => "ENTITY_ERROR.INCLUDED.INVALID_ID"
"title" => "The provided entity id is invalid"
"detail" => "The provided included entity id 'EN' has invalid format"
"source" => array:1 [▼
"pointer" => "/included/0/id"
]
It does seem to be an API bug considering it has always worked fine and we didn't change anything on our side, the /included/0/id value has always been EN and never changed.
Moreover, EN still seems to be a valid value according to the API docs and there are no changes reported of that field in the API release notes.
Here's the request ID: 1e15b36b-5347-4af0-9bab-7f6626ffec65
I've tried using different values through trial and error (en, EN, EN-US, ...) and none of them worked.
When uploading an iOS IPA via App Store Connect API or altool, App Store Connect validates the IPA against the wrong existing app record, even though the IPA is correctly signed and provisioned.
The exact same IPA uploads successfully via Apple Transporter, which correctly routes it to the intended app.
This appears to be an App Store Connect upload-resolution issue specific to API-based delivery.
Environment
Account: App Store Connect (Admin access)
Authentication: App Store Connect API Key (Issuer ID + Key ID)
Apps in Account:
com.dailyaudiobible.dabapp
Apple ID: 121xxxx266
com.dailyaudiobible.dabapp2
Apple ID: 645xxxx428
iOS / SDK Details
Platform: iOS
Build Artifact: Single signed IPA used for all tests
Target SDK: iOS 18.5
Xcode: 16.4
.NET iOS SDK: 18.5.9227
Minimum iOS Version: 18.5
Architecture: ios-arm64
Build Type: App Store distribution (Release)
This SDK/Xcode combination previously worked for TestFlight uploads of this app.
Expected Behavior
When uploading an IPA with:
CFBundleIdentifier = com.dailyaudiobible.dabapp
Provisioning profile for com.dailyaudiobible.dabapp
Embedded provisioning profile matching com.dailyaudiobible.dabapp
App Store Connect should validate and associate the build with the dabapp app record.
Actual Behavior
When uploading the IPA using API-based tools, App Store Connect validates the upload against dabapp2 and rejects it with:
Validation failed (409): This bundle is invalid. The bundle identifier cannot be changed from the current value, com.dailyaudiobible.dabapp2.
No references to dabapp2 exist in the codebase, build configuration, or signing assets.
Delivery Methods Tested (Same IPA)
App Store Connect API (automation / CI)
Upload accepted
Validation fails
Error references com.dailyaudiobible.dabapp2
altool (Apple CLI, API key authentication)
Same behavior as API
Same validation error
altool logs confirm API key has access to multiple apps but validation resolves to the wrong app
Apple Transporter (manual)
Automatically detects com.dailyaudiobible.dabapp
Upload succeeds
Build appears correctly under the dabapp record in App Store Connect
This confirms the IPA itself is valid and correctly signed.
Verification Performed
From the built IPA:
Info.plist
CFBundleIdentifier = com.dailyaudiobible.dabapp
Embedded provisioning profile
Application identifier resolves to com.dailyaudiobible.dabapp
Provisioning profile used at build time: Explicitly configured for com.dailyaudiobible.dabapp
All values are verified by extracting the IPA contents locally.
Questions for Apple Engineering
Why do API-based uploads (App Store Connect API / altool) resolve this IPA to the wrong existing app record, while Transporter resolves it correctly, and how can that association be corrected or reset?
If this is expected behavior when multiple related apps exist under one provider, is this documented, and are there required parameters or constraints for API-based uploads in this scenario?
Additional Notes
This is reproducible using only Apple-provided tools and APIs.
CI/CD tooling itself is not required to reproduce the issue.
Manual Transporter uploads are not a viable long-term solution for automated releases.
Any guidance or confirmation from App Store Connect engineering or other developers would be appreciated.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
What am I missing here? 😐
Prepare all required actions
Run ./.github/actions/verify-copyright
Run echo "📋 Checking copyright file..."
📋 Checking copyright file...
✅ Copyright file exists at: fastlane/metadata/en-US/copyright.txt
📝 Copyright value: © 2025 Enterprise Support
✅ Copyright format valid: © 2025 Enterprise Support
✅ Copyright metadata validation passed
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
I am in a process to change ASSN-V2 url, However i am still receiving Subscription notifications on old URL.
Changed to new URL from Appstore connect --> --> App Information.
Old URL is pointing to aws lambda.
New URL is pointing to a third party provider (confirmed not received notification.)
Any pointers ?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
Subscriptions
App Store Server API
Hello,
I'm trying to upload an asset pack that has the same identifier as an asset pack that I've archived.
I understand this isn't likely a common scenario, but I'd expect that uploading an archived Asset Pack to become un-archived. Reverting to the next newest version available for the Asset Pack.
Further, this restriction is not clear that you won't be able to reuse the assetPackID on the archive asset pack alert
Archive Asset Pack?
Are you sure you want to archive "[NAME]" asset pack? All versions of this asset will no longer be accessible by your app.
Errors:
Failed to create a new background asset pack version for '[NAME]'. (-19243)
operation not allowed (409)
Cannot create version for an archived background asset. (ID: 2cc6499a-83fa-4bbb-bc1f-0bb67d2a873d)
httpBody: {
"errors" : [ {
"id" : "2cc6499a-83fa-4bbb-bc1f-0bb67d2a873d",
"status" : "409",
"code" : "STATE_ERROR.ARCHIVED_BACKGROUND_ASSET",
"title" : "operation not allowed",
"detail" : "Cannot create version for an archived background asset."
} ]
Hey there,
I'm building a service that requires receiving accurate sales/proceeds data along with the campaign name. From reading the documentation it looks to be fairly understandable, but in practice it is not.
I have been testing this for almost a week, and I never got "Detailed Report" for "App Store Purchases Detailed" analytics report. The same report for "App Downloads Detailed" is arriving normally, but not to for the purchases. I tested for two different apps where I have around 200 daily installs and 30 purchases on each.
I would love to get any thoughts on this from an Apple engineer!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect API
Analytics & Reporting
Hey all,
It's been now a few weeks since we started to help clients connect to their App Store Analytics API.
I'm starting to notice that very often we'll see things like:
Small data gaps. Eg. I have data on June 1, no data on June 2-4, and then data from June 5 to now
Big data gaps. Eg. I'd have data on Jan 2024, but not on Feb-Mar 2024, then there's data again from April 2024 onwards.
The actual files from Apple are like that we're not doing any treatments whatsoever. That's happening on both ONGOING and ONE_TIME_SNAPSHOT
I also opened a Customer Support case and sent the files over 10 days ago, but no definitive answer so far.
Are you also seeing gaps like this on your data? Any tips/recommendations?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
Marketing
App Store Connect API
Analytics & Reporting
Hey there,
I'm building a service that requires receiving accurate app downloads and sales/proceeds data along with the campaign name. From reading the documentation it looks to be fairly understandable, but in practice it is not that straightforward.
For example, I received the first one-time-snapshot detailed report for the App Store Purchases, and it contains partial data for several days. Shouldn't that be a full report of everything in analytics for like last year or so? Should I expect it to be updated and extended in the coming days?
For the ongoing detailed report, I have not received anything yet, but I'm afraid it might have partial data as well. I will report here as well.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect API
Analytics & Reporting
I am planning to build a service that automatically pulls Apple reports and stores them in my database.
I was able to successfully retrieve the APP_USAGE report from the Analytics API; however, while it initially generated daily reports for a couple of days, the daily report generation subsequently stopped.
The weekly and monthly reports are generated normally.
I also checked the readReportRequest response, and the StoppedDueToInactivity field is returned as false.
And also, when I compared the monthly reports between the API and the web console, the data does not match.
Does anyone have a solution to this issue, or is there a recommended or updated approach for handling this?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect API
Analytics & Reporting
I am planning to build a service that automatically pulls Apple reports and stores them in my database.
I was able to successfully retrieve the APP_USAGE report from the Analytics API. It initially generated daily reports for a couple of days, but then the daily report generation stopped.
The weekly and monthly reports continue to generate normally.
I also checked the readReportRequest response, and the StoppedDueToInactivity field is returned as false.
And also, when I compared the monthly reports between the API and the web console, the data does not match.
Does anyone have a solution to this issue, or is there a recommended or updated approach for handling this?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect API
Analytics & Reporting
Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000
Attempting to submit a new build continually failing and I suspect this is due to some issues on Apple's servers (Status code: 502, Bad Gateway)
Anyone else seeing this issue? Apple's status page doesn't show any open incidents.
[logs] Creating authorization token for App Store Connect API
[logs] Ready to upload new build to TestFlight (App: 6746477612)...
[logs] Going to upload updated app to App Store Connect
[logs] This might take a few minutes. Please don't interrupt the script.
[logs] [altool] 2025-12-10 12:04:00.993 *** Error: Unable to upload archive. Failed to authenticate for session: (
[logs] [altool] "Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 \"The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 502 (bad gateway)\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <style>\n body {\n font-family: \"Helvetica Neue\", \"HelveticaNeue\", Helvetica, Arial, sans-serif;\n font-size: 15px;\n font-weight: 200;\n line-height: 20px;\n color: #4c4c4c;\n text-align: center;\n }\n\n .section {\n margin-top: 50px;\n }\n </style>\n</head>\n<body>\n<div class=\"section\">\n <h1></h1>\n\n <h3>Bad Gateway</h3>\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\n</div>\n</body>\n</html>\n\n\" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 502 (bad gateway)\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <style>\n body {\n font-family: \"Helvetica Neue\", \"HelveticaNeue\", Helvetica, Arial, sans-serif;\n font-size: 15px;\n font-weight: 200;\n line-height: 20px;\n color: #4c4c4c;\n text-align: center;\n }\n\n .section {\n margin-top: 50px;\n }\n </style>\n</head>\n<body>\n<div class=\"section\">\n <h1></h1>\n\n <h3>Bad Gateway</h3>\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\n</div>\n</body>\n</html>\n\n, NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 502 (bad gateway)\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <style>\n body {\n font-family: \"Helvetica Neue\", \"HelveticaNeue\", Helvetica, Arial, sans-serif;\n font-size: 15px;\n font-weight: 200;\n line-height: 20px;\n color: #4c4c4c;\n text-align: center;\n }\n\n .section {\n margin-top: 50px;\n }\n </style>\n</head>\n<body>\n<div class=\"section\">\n <h1></h1>\n\n <h3>Bad Gateway</h3>\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\n</div>\n</body>\n</html>\n\n, NSLocalizedFailureReason=App Store operation failed.}"
[logs]
[logs] [altool] ) (-1011)
[logs]
[logs] [altool] {
[logs]
[logs] [altool] NSLocalizedDescription = "Unable to upload archive.";
[logs] [altool] NSLocalizedFailureReason = "Failed to authenticate for session: (\n \"Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 \\\"The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\\nStatus Code: 502 (bad gateway)\\n\\n\\n<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n <style>\\n body {\\n font-family: \\\"Helvetica Neue\\\", \\\"HelveticaNeue\\\", Helvetica, Arial, sans-serif;\\n font-size: 15px;\\n font-weight: 200;\\n line-height: 20px;\\n color: #4c4c4c;\\n text-align: center;\\n }\\n\\n .section {\\n margin-top: 50px;\\n }\\n </style>\\n</head>\\n<body>\\n<div class=\\\"section\\\">\\n <h1></h1>\\n\\n <h3>Bad Gateway</h3>\\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\\n</div>\\n</body>\\n</html>\\n\\n\\\" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\\nStatus Code: 502 (bad gateway)\\n\\n\\n<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n <style>\\n body {\\n font-family: \\\"Helvetica Neue\\\", \\\"HelveticaNeue\\\", Helvetica, Arial, sans-serif;\\n font-size: 15px;\\n font-weight: 200;\\n line-height: 20px;\\n color: #4c4c4c;\\n text-align: center;\\n }\\n\\n .section {\\n margin-top: 50px;\\n }\\n </style>\\n</head>\\n<body>\\n<div class=\\\"section\\\">\\n <h1></h1>\\n\\n <h3>Bad Gateway</h3>\\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\\n</div>\\n</body>\\n</html>\\n\\n, NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\\nStatus Code: 502 (bad gateway)\\n\\n\\n<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n <style>\\n body {\\n font-family: \\\"Helvetica Neue\\\", \\\"HelveticaNeue\\\", Helvetica, Arial, sans-serif;\\n font-size: 15px;\\n font-weight: 200;\\n line-height: 20px;\\n color: #4c4c4c;\\n text-align: center;\\n }\\n\\n .section {\\n margin-top: 50px;\\n }\\n </style>\\n</head>\\n<body>\\n<div class=\\\"section\\\">\\n <h1></h1>\\n\\n <h3>Bad Gateway</h3>\\n <p>Correlation Key: TGHKWJKO2LITS2DSDATRZZJAPE</p>\\n</div>\\n</body>\\n</html>\\n\\n, NSLocalizedFailureReason=App Store operation failed.}\"\n)";
[logs]
[logs] [altool] }
[logs] Application Loader output above ^
[logs] The server returned an invalid MIME type: text/html
[logs] Error uploading '/var/folders/m1/8_w9962s3b79dqm00nnlm85m0000gn/T/97c174a3-8844-4f85-8fd5-78df1906d170.ipa'.
[logs] Unable to upload archive. Failed to authenticate for session: (
[logs] The call to the altool completed with a non-zero exit status: 1. This indicates a failure.
[logs] Could not download/upload from App Store Connect!
[logs] [!] Error uploading ipa file:
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Hello,
I have a question about when are asset packs actually updated?
For Essential Asset Packs, this only during the keys included in the pack? As in, only when the app is installed for
firstInstallation. And only when there's an app update for subsequentUpdate?
For On Demand Asset Packs, is this only when AssetPackManager.shared.checkForUpdates() is called?
Also, are any asset packs ever actually updated in the background? For example, if an On Demand Asset Pack has an update pushed, can the device automatically fetch and download the pack overnight?
Or is updating limited to only when the app is active?
I was using the Download Sales and Trends Reports API (GET https://api.appstoreconnect.apple.com/v1/salesReports), but at some point, the results started not displaying properly.
(The reason for this is that all the +sales values aren't showing up in the CSV file.)
Below, I'll show you how to use the API in Python with a screenshot.
(***** elements are hidden.)
If anyone knows why, please let me know.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect API
Analytics & Reporting