We are facing an issue where some users send receipts with an empty 'in_app' attribute during server validation.
We are using the API described here:
https://developer.apple.com/documentation/appstorereceipts/verifyreceipt
After a purchase, we validate the receipt on the server and call finishTransaction in the app.
Most receipts are fine, but this issue affects some users.
The documentation states that an empty 'in_app' attribute means no valid purchases:
https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt/in_app#discussion
Our questions are:
When is a receipt with an empty 'in_app' attribute generated?
How should we handle such receipts?
Thank you for your help.
Best regards,
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
Activity
Hello,
We have received three CONSUMPTION_REQUEST notifications for the same transactionId.
We sent a response to each CONSUMPTION_REQUEST notification to the API and received a 202 Accepted response.
Why do we receive multiple CONSUMPTION_REQUEST notifications even though we have sent a ConsumptionRequest to the Apple Store Server API? Do we need to respond to each CONSUMPTION_REQUEST for the same transactionId?
Thanks
Yesterday I noticed that if I purchase a free trial subscription in my app using a sandbox account, when the subscription expires I see a “Billing Problem” message every time I open the app.
”allow purchases & renewals“ setting is ON so this shouldn’t happen.
has anyone else seen this or knows how to resolve?
observed on iOS 18.3.2 & 16.7.10
thanks
I am working on a paywall, and SubscriptionStoreView seems to work just fine when using the XCode environment but goes bonkers when using Sandbox. Specfically, after making a subscription, I don't get the "Your plan" flag, and the subscription buttons fail to do anything. Hitting one of those the app just sits there....mocking me with its silence.
"Clear purchase history" does nothing when done either the iPhone or the Sandbox account page on the website. Nor does the subscription seem to expire after the expiration time of 3 minutes that I am using.
Anyone else see this? is this similar to the TestFlight issues people had a year ago?
Topic:
App & System Services
SubTopic:
StoreKit
The sample code provided in https://developer.apple.com/wwdc21/10114 doesn't appear to call finish() on unverified transactions, and I haven't been able to find any documentation regarding what to do with unfinished transactions. However, Apple has always emphasized the importance of finishing transactions, and since a transaction object is provided even with the unverified state, I'd love some guidance!
I’m trying to get approval for an update to my app to transition from paid model to IAP subscription. This is my first time submitting an app with IAP. This is my current state:
App submission shows rejected
IAP subscriptions show "Development action needed"
Localization (for all subscription plans) was showing "Rejected"; I updated (only) the review notes for each subscription plan, and now the status for the localization of each subscription is "Prepare for submission" (the status for each subscription is still "Development action needed")
I'm at a loss for what needs to be done, and in what order. Sandbox testing has been working fine all along.
1 - I noticed my submitted binary was missing the "In-App Purchase" capability in Xcode (under target capabilities). Could this be the reason? Is this even needed? I am surprised that weeks of sandbox testing without the IAP capability added in Xcode has been working fine.
2- I seem to be in a chicken and egg situation,
Do I need to submit localizations first for review and how? Do I need to submit the subscriptions first for review and how?
It seems modified/new localizations need approved subscriptions, and new/modified subscriptions need an approved app with IAP support first, is this correct understanding?
As I mentioned, in the current state, I can see the app working fine with sandbox testing
Appreciate any help with step-by-step instructions to get past the review.
Topic:
App & System Services
SubTopic:
StoreKit
Hello,
I am encountering an issue where I receive an App Store Server Notification V2 upon the purchase of a consumable item.
I have configured the App Store Server Notification V2 endpoint to handle notifications related to subscription products.
However, I did not expect to receive notifications for consumable purchases.
The notification includes the following signedPayload decoded into the ResponseBodyV2DecodedPayload object with the following values:
notificationUUID: 3cd6410b-0c89-4247-aba5-20710e79895e
notificationType: null
subtype: null
The transaction information decoded from the ResponseBodyV2DecodedPayload object is as follows:
transactionId: 2000000633622618
webOrderLineItemId: null
productId: heart_2
To debug, I called the Get Notification History API of the App Store Server API, and the mentioned notification for the consumable product purchase is not included in the history. Only notifications related to subscription product purchases are retrieved.
According to the notification type documentation, there is no explanation for cases where both notificationType and subtype are null, nor is there any mention of receiving notifications for consumable purchases. Therefore, I am uncertain how to interpret and handle this notification.
Could you please provide an explanation or guidance on this issue?
Thank you.
References:
https://developer.apple.com/forums/thread/737592
https://developer.apple.com/documentation/appstoreservernotifications/notificationtype
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
App Store Server Notifications
App Store Server API
The development subscription management screen for managing your sandbox account subscriptions is today showing products that belong to other apps.
Is there a known issue right now?
Created a FB with screenshots
FB FB20199893
Topic:
App & System Services
SubTopic:
StoreKit
I am currently exploring the implementation of win-back offer in my app to encourage lapsed subscribers to re-subscribe. I plan to use the automatic win-back offer sheet that display to eligible customers upon app launch, as described in the documentation. However, I am unclear about the specific iOS version requirements needed to support this feature effectively.
Could someone clarify the minimum iOS, iPadOS, and macOS versions required for these automatic win-back offer sheet?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
App Store Connect
Subscriptions
In-App Purchase
Hello folks.
Hope you have a great day.
I have a question on your Get Notification History API.
Reference : https://developer.apple.com/documentation/appstoreserverapi/get_notification_history
According to NotificationHistoryRequest document( https://developer.apple.com/documentation/appstoreserverapi/notificationhistoryrequest )
startDate parameter allows past 180 days from current date.
However my test result is little bit different.
Could you help me this case?
I'll give detailed request/response during testing.
Request body
{"startDate":1714364482159,"endDate":1729048882326,"notificationType":"REFUND","notificationSubtype":null,"transactionId":null,"onlyFailures":null}
Response
Header
server: daiquiri/5
date: Wed, 16 Oct 2024 03:21:38 GMT
content-type: application/json
content-length: 110
x-apple-jingle-correlation-key: SBDV5UOM7YGOJCYS2M4S2X67IE
x-apple-request-uuid: 90475ed1-ccfe-0ce4-8b12-d3392d5fdf41
b3: 90475ed1ccfe0ce48b12d3392d5fdf41-06ee3a4acafcff41
x-b3-traceid: 90475ed1ccfe0ce48b12d3392d5fdf41
x-b3-spanid: 06ee3a4acafcff41
apple-seq: 0.0
apple-tk: false
apple-originating-system: CommerceGateway
x-responding-instance: CommerceGateway:20104:::
apple-timing-app: 8 ms
strict-transport-security: max-age=31536000; includeSubDomains
x-daiquiri-instance: daiquiri:47578001:st44p00it-hyhk15014801:7987:24RELEASE221:daiquiri-amp-commerce-clients-ext-002-st
body
{"errorCode":4000012,"errorMessage":"Invalid request. The start date is earlier than the allowed start date."}
As you see, request sent at Wed, 16 Oct 2024 03:21:38 GMT,
and start date is 1714364482159 which is Mon, 29 April 2024 04:21:22 (milli second).
The difference between the two dates is 170 days.
Could you help me this this case?
If I misunderstood on your API, please let me know.
Thank you.
i m integrate App Store Server Notifications for External Purchase Server API
The documentation says:
For external purchase tokens that are unreported after 10 days, Apple sends a server notification to your server
https://developer.apple.com/documentation/externalpurchaseserverapi#Receive-notifications-for-unreported-tokens
I have a doubt.
After I'm generating an external purchase token (sandbox), apple notify me 4 times in next 2-3h, even they say, they will notify me after 10 days for unreported tokens.
Mention: Response for notification call was 200
token_create: 13:18
notification_1: 13:58
notification_2: 14:38
notification_3: 15:08
notificaiton_4: 15:38
"notificationType": "EXTERNAL_PURCHASE_TOKEN",
"subtype": "UNREPORTED",
I have no clue what's happening
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
App Store Server Notifications
App Store Server API
I have an iOS app with a main target and an app extension. I want the app extension to write data to the SwiftData in App Groups, while the main target reads the data. However, currently, the app extension only has permission to read data, not to write it.Is the issue due to my incorrect configuration or an Apple-imposed restriction?
hello,
I have an app with In-App purchase set up, it works fine in TestFlight on an iOS device but the download from the App Store gives me a transaction failed message.
I tried to replicate in the simulator but from what I've read is that you can't do in-app purchase testing in the simulator. Perhaps I'm wrong here but I've tried multiple sandbox accounts, etc.. and still get an unusual "...password can't be reused..." error (pasted below) in the debug description.
I'm curious if anyone else has dealt with this scenario and if so how did you go about researching/identifying the issue and/or resolving it.
Partial error message:
<SKPaymentQueue: 0x60000000e370>: Payment completed with error: Error Domain=ASDErrorDomain Code=530 "(null)" UserInfo={NSUnderlyingError=0x600000c74750 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed The authentication failed." UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=AMSErrorDomain Code=2 "Password reuse not available for account The account state does not support password reuse." UserInfo={NSDebugDescription=Password reuse not available for account The account state does not support password reuse., AMSDescription=Password reuse not available for account, AMSFailureReason=The account state does not support password reuse.}"
Hi,
I've been unable to successfully test in the sandbox environment for a StoreKit 2 subscription group and can't seem to find the missing piece.
I am calling the following line of code:
let products = try await Product.products(for: [subscriptionID])
Expected behavior: The product is returned in the products array.
Actual result: The array is empty
I have done the following:
Successfully tested our logic using a storekit configuration file locally in Xcode.
Created the Subscription group in App Store Connect. The subscription product is currently "Waiting for Review", but it is our first so will not be approved without being attached to a distribution build review.
Created a Sandbox user account in App Store Connect -> Users -> Sandbox
Signed into the sandbox user account in Settings -> Developer -> Sandbox Apple Account
Signed the Paid Apps Agreement for our organization
A few debugging notes:
I deleted all apps before installing from Xcode
I've tried both locally and in TestFlight builds
Restarted my device
Verified productID matches the productID in App Store Connect
I'm not sure if I'm missing something, but any help would be appreciated.
Thanks
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
It seems that beta 3 broke StoreKit Testing when running against an iOS 26 simulator device. Specifically, when validating product IDs, the debug console displays messages like the following:
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
[492a4cfa_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
In addition, the SKProductsResponse (I am using the original StoreKit API), lists all requested product IDs in invalidProductIdentifiers. The products array is empty.
StoreKit Testing behaves as expected when Xcode 26 beta 3 is run against an iOS 18.4 simulator device.
I'm encountering a crash on app launch. The crash is observed in iOS version 17.6 but not in iOS version 18.5. The only new notable thing I added to this app version was migrate to store kit 2.
Below is the error message from Xcode:
Referenced from: <DCC68597-D1F6-32AA-8635-FB975BD853FE> /private/var/containers/Bundle/Application/6FB3DDE4-6AD5-4778-AD8A-896F99E744E8/callbreak.app/callbreak
Expected in: <A0C8B407-0ABF-3C28-A54C-FE8B1D3FA7AC> /usr/lib/swift/libswift_Concurrency.dylib
Symbol not found: _$sScIsE4next9isolation7ElementQzSgScA_pSgYi_tYa7FailureQzYKFTu
Referenced from: <DCC68597-D1F6-32AA-8635-FB975BD853FE> /private/var/containers/Bundle/Application/6FB3DDE4-6AD5-4778-AD8A-896F99E744E8/callbreak.app/callbreak
Expected in: <A0C8B407-0ABF-3C28-A54C-FE8B1D3FA7AC> /usr/lib/swift/libswift_Concurrency.dylib
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libLogRedirect.dylib:/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/System/Library/PrivateFrameworks/GPUToolsCapture.framework/GPUToolsCapture:/usr/lib/libViewDebuggerSupport.dylib```
and Stack Trace:
```* thread #1, stop reason = signal SIGABRT
* frame #0: 0x00000001c73716f8 dyld`__abort_with_payload + 8
frame #1: 0x00000001c737ce34 dyld`abort_with_payload_wrapper_internal + 104
frame #2: 0x00000001c737ce68 dyld`abort_with_payload + 16
frame #3: 0x00000001c7309dd4 dyld`dyld4::halt(char const*, dyld4::StructuredError const*) + 304
frame #4: 0x00000001c73176a8 dyld`dyld4::prepare(...) + 4088
frame #5: 0x00000001c733bef4 dyld`start + 1748```
Note: My app is a Godot App and uses objc static libraries. I am using swift with bridging headers for interoperability. This issue wasn't observed until my last version in which the migration to storekit2 was the only notable change.
Issue:
Streamlined purchasing cannot be turned off because your latest approved binary doesn’t include the required StoreKit APIs.
For this, I tried selecting the option "Turn Off Streamlined Purchasing" in App Store Connect, and I received this error.
What I’ve Done So Far:
I have added the StoreKit file in Xcode.
Still, I get the error when submitting my app binary.
In app capability added in xcode
My Setup:
React Native
Xcode version
StoreKit2 integration using React Native IAP sdk (react-native-iap)
Code:
Here is the code I am using to set up the in-app purchase system:
RNIap.setup({ storekitMode: 'STOREKIT_HYBRID_MODE' });
const connection = await RNIap.initConnection();
if (connection) {
if (isAndroid) {
await RNIap.flushFailedPurchasesCachedAsPendingAndroid();
} else {
await RNIap.clearTransactionIOS();
}
if (isIos) {
await RNIap.IapIosSk2.sync()
.then(() => {})
.catch((error) => {
console.log('Error IapIosSk2 IAP:', error);
});
}
await getAllSubscriptionList();
await getPlanStructure();
//For Subscription
await RNIap.requestSubscription({
sku: sku,
subscriptionOffers: [{ sku, offerToken }],
});
//For Consumable Products
await RNIap.requestPurchase({
sku: sku,
andDangerouslyFinishTransactionAutomaticallyIOS: false,
});
}
Steps I’ve Taken to Troubleshoot:
Cleaned and rebuilt the project.
Checked App Store Connect settings for in-app purchases.
Question:
How can I resolve this error? Are there additional steps required to correctly enable StoreKit2 in a React Native project?
Additional Info:
Any advice or guidance on this issue would be greatly appreciated.
My app has a couple of consumable IAP items. I have tested this extensively and it works in all test scenarios including loads of beta testers using testflight. However, Apple's production reviewer reports that loading of the products hangs in their setup.
This is very frustrating as I have no means of recreating the problem.
My first product was tested ok an all my IAP items are approved for release. However, I did not explicitly assign them to my build. I read somewhere that you need to do that but could not find in App Store Connect after my first product was approved.
Below is the relevant code section. What am I missing?
class DonationManager: NSObject, ObservableObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {
@Published var products: [SKProduct] = [] // This is observed by a view. But apparently that view never gets populated in Apple's production review setup
@Published var isPurchasing: Bool = false
@Published var purchaseMessage: String? = nil
let productIDs: Set<String> = ["Donation_5", "Donation_10", "Donation_25", "Donation_50"]
override init() {
super.init()
SKPaymentQueue.default().add(self)
fetchProducts()
}
deinit {
SKPaymentQueue.default().remove(self)
}
func fetchProducts() {
print("Attempting to fetch products with IDs: \(productIDs)")
let request = SKProductsRequest(productIdentifiers: productIDs)
request.delegate = self
request.start()
}
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
DispatchQueue.main.async {
self.products = response.products.sorted { $0.price.compare($1.price) == .orderedAscending }
print("Successfully fetched \(self.products.count) products.")
if !response.invalidProductIdentifiers.isEmpty {
print("Invalid Product Identifiers: \(response.invalidProductIdentifiers)")
self.purchaseMessage = NSLocalizedString("Some products could not be loaded. Please check App Store Connect.", comment: "")
} else if self.products.isEmpty {
print("No products were fetched. This could indicate a problem with App Store Connect configuration or network.")
self.purchaseMessage = NSLocalizedString("No products available. Please try again later.", comment: "")
}
}
}
...and the view showing the items:
@StateObject private var donationManager = DonationManager()
var body: some View {
VStack(spacing: 24) {
Spacer()
// Donation options -------------------
if donationManager.products.isEmpty {
ProgressView(NSLocalizedString("Loading donation options...", comment: ""))
.foregroundColor(DARK_BROWN)
.italic()
.font(.title3)
.padding(.top, 16)
} else {
ForEach(donationManager.products, id: \.self) { product in
Button(action: {
donationManager.buy(product: product)
}) {
HStack {
Image(systemName: "cup.and.saucer.fill")
.foregroundColor(.pink)
Text("\(product.localizedTitle) \(product.priceLocale.currencySymbol ?? "$")\(product.price)")
}
.buttonStyle()
}
.disabled(donationManager.isPurchasing)
}
}
Hello all!
My application written with C++ and using StoreKit1. For now my application using bridge C++/Objective-CPP/Objective-C/Swift. Since StoreKit1 declared "deprecated" got a question of how to implement correctly StoreKit2 in C++ application, mostly everything about Renewable Subscriptions. StoreKit2 have no direct API in Objective-C, it's available only in Swift. Which is the way the best and correct way:
-- for on-device writing C library and in it implement Swift? In this case how to add correctly StoreKit2 into library itself?
-- for on-device somehow write kind of wrapper for Swift StoreKit 2 within translation of all of objects in Objective-C and implement it with C++/Objective-CPP bridge? In this case how to add correctly StoreKit2 in C++ project written with CMake? Here https://github.com/compnerd/swift-cmake-examples/tree/main the one of the examples of interoperability C++/Swift with CMake. But how to use exactly with StoreKit2?
-- only using server side solution?
Hello,
I am currently integrating with the iTunes Sandbox environment, specifically with APIs like:
https://sandbox.itunes.apple.com/inApps/v1/subscriptions/12345
However, I consistently receive a 503 - Http/1.1 Service Unavailable error in response. Below is the typical response I get:
<html><body><b>Http/1.1 Service Unavailable</b></body></html>
I've tried sending requests from different IP addresses and servers, but all attempts result in the same 503 error. Could anyone provide guidance on whether this is a temporary issue with the sandbox environment or if there is something I need to adjust in my setup?
Any help would be greatly appreciated!
Thank you.
Topic:
App & System Services
SubTopic:
StoreKit