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.}"
In-App Purchase
RSS for tagOffer extra content, digital goods, and features directly within your app using in-app purchases.
Posts under In-App Purchase tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
在沙盒环境下或者TestFlight 测试消费型项目会提示此项目将免费恢复
While using react-native-iap and being successfully connected with initConnection() I'm not receiving information on subscriptions with requestSubscription(). Attaching the code here, if anyone could assist asap please would be really grateful thanks! Been at it all day and just can't figure.
const handleBuySubscription = async (productId) => { try { await requestSubscription({ sku: productId, }); setLoading(false); } catch (error) { setLoading(false); if (error instanceof PurchaseError) { errorLog({ message: [${error.code}]: ${error.message}, error }); } else { errorLog({ message: "handleBuySubscription", error }); } } }; but the requestSubscription({ sku: productId, })
I am handling the buy subscription with this function
const handleBuySubscription = async (productId) => {
try {
await requestSubscription({
sku: productId,
});
setLoading(false);
} catch (error) {
setLoading(false);
if (error instanceof PurchaseError) {
errorLog({ message: [${error.code}]: ${error.message}, error });
} else {
errorLog({ message: "handleBuySubscription", error });
}
}
};
but the
requestSubscription({
sku: productId,
})
does not return anything, and it is stuck at await
Hello,
I’m facing an issue with in-app purchases after my app was approved on the App Store. I’ve created 100 consumable products, all of which have been approved by Apple. The purchases work correctly in both TestFlight and debug mode, but once the app is live on the App Store, I receive an “Invalid Product ID” error.
I reached out to Apple Support, but they directed me to ask this question on the forum instead.
Could someone please help me resolve this issue?
Its been week now, I am losing my customers.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Subscriptions
StoreKit
In-App Purchase
Guideline 3.1.1 - Business - Payments - In-App Purchase, as my app currently allows users to purchase digital content (courses) using an external payment system. I am working to comply with Apple’s requirements by integrating In-App Purchase for all digital content within the app.
My app contains approximately 100,000 individual courses, and I am seeking guidance on how to effectively implement In-App Purchase for such a large number of items. Creating 100,000 separate In-App Purchase products in App Store Connect seems impractical due to the scale and potential limitations. I would like to explore feasible solutions, such as:
Using a subscription model to provide access to all courses.
Creating category-based bundles (e.g., Programming, Design) to group courses.
Implementing a dynamic purchase system where users can select specific courses after a single In-App Purchase transaction, managed server-side.
Could you please advise on the best approach to manage In-App Purchase for 100,000 individual courses? I am happy to provide additional details about my app’s functionality or work with your team to ensure compliance. Please let me know if a consultation or further documentation is needed to proceed.
Looking forward to your guidance.
Best regards,
Shuvajit Maitra
Topic:
App Store Distribution & Marketing
SubTopic:
App Review
Tags:
Subscriptions
App Review
App Store Connect
In-App Purchase
If I have a subscription based app that's available on iOS, Android, and the web.I use the appropriate billing systems for each platform (Apple IAP for iOS, Google Play Billing for Android, and my own system for web) What happens when a user subscribes on Android or the web, then logs into the same account on the iOS app? Am I allowed to honor that existing subscription on iOS, or am I required to have them purchase a separate subscription through Apple’s in app purchase system in order to access premium features on the iOS app?
If I have an app available on IOS/Android/Web and offer subscriptions in each (Obviously using apple IAP / Google Play Billing when in those contexts) and a user creates an account on Android / Web and pays for that subscription and then logs in with the same account on the App Store, do I need to charge them again for a new subscription, or can I use their account subscription?
问题描述:
创建苹果商品的促销优惠功能异常,查询官方接口文档,发现接口协议没有变更(协议文档:https://api.appstoreconnect.apple.com/v1/subscriptionPromotionalOffers) ,有人了解id字段的格式是什么?应该如何传值?
请求参数:
{"data":{"attributes":{"duration":"ONE_WEEK","name":"20250817_test_2055","numberOfPeriods":1,"offerCode":"20250817_test_2055","offerMode":"FREE_TRIAL"},"relationships":{"prices":{"data":[{"id":"e467f67b-3d75-4319-aa6a-adebfc9f80da","type":"subscriptionPromotionalOfferPrices"}]},"subscription":{"data":{"id":"6673898723","type":"subscriptions"}}},"type":"subscriptionPromotionalOffers"},"included":[{"id":"e467f67b-3d75-4319-aa6a-adebfc9f80da","type":"subscriptionPromotionalOfferPrices","relationships":{"territory":{"data":{"id":"AUS","type":"territories"}}}}]}
响应参数:
{
"errors" : [ {
"id" : "49d94648-0a8a-4aba-8856-72e69ac56aca",
"status" : "409",
"code" : "ENTITY_ERROR.INCLUDED.INVALID_ID",
"title" : "The provided entity id is invalid",
"detail" : "The provided included entity id 'e467f67b-3d75-4319-aa6a-adebfc9f80da' has invalid format",
"source" : {
"pointer" : "/included/0/id"
}
} ]
}
Hi, I have a .NET MAUI app which I've added subscriptions to using the Plugin.InAppBilling nuget package. When I tested on TestFlight I got an almost immediate crash. After doing some research I followed advice to add an Entitlements.plist file to Platforms > iOS with the following entry:
com.apple.developer.in-app-purchase
The distribution provisioning profile I'm using to sign my app has the App ID set to an Identifier which has "In-App Purchase" ticked, but greyed out in it's "Capabilities" section on https://developer.apple.com/. I'm not sure why it's ticked and greyed out, but I assume that means that "In-App Purchase" is enabled.
The app runs file locally but when I create an IPA file and add it to Transporter for upload to App Store Connect I get the following error:
"Validation failed (409)
Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, key 'com.apple.developer.in-app-purchase' in 'Payload/[Removed].app/[Removed]' is not supported. (ID: [Removed])".
Here is the structure of my csproj code for creating a IPA file for iOS:
The command I use:
dotnet publish [Removed]/app.csproj -f:net9.0-ios -c:Release ^
/p:PlatformTarget=Arm64 ^
/p:RuntimeIdentifier=ios-arm64 ^
/p:ServerAddress=[Removed] ^
/p:ServerUser=[Removed] ^
/p:ServerPassword=[Removed] ^
/p:ArchiveOnBuild=true ^
/p:BuildIpa=true
I'm stuck trying to figure this out. If you could please point out any issues with what I'm doing or if you have any suggestions to resolve the problem I would very much appreciate it.
Thanks,
Ben
When redeeming a custom offer code, I'm not able to see the actual offer code ID in the Subscriber report - only the subscription offer name is present.
I'm going off of the documentation for the Promotional Offer ID column:
A code that you create for customers to enter and redeem the subscription offer.
https://developer.apple.com/help/app-store-connect/reference/subscriber-report
Is the documentation wrong? How are we supposed to measure the performance of our offer codes beyond the initial redemption?
For example, with the offer name I can see how my "Holiday Promos" offer is doing but can't see the actual performance of "BLACKFRIDAY30" vs "MOTHERSDAY30".
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
In-App Purchase
Analytics & Reporting
I have implemented IAP. The purchases are successful. The refresh receipt is working fine, which then calls the requestDidFinish(_ request: SKRequest) delegate. I'm fetching the receipt url through 'Bundle.main.appStoreReceiptURL'. When I convert the receipt data in base64 string and send it to app store's sandbox api and try to validate the receipt, it fails giving status code : 21002.
I just created my first in-app purchase. I got this message:
Your first in-app purchase must be submitted with a new app version. Create your in-app purchase, then select it from the app’s In-App Purchases and Subscriptions section on the version page before submitting the version to App Review.
Once your binary has been uploaded and your first-in app purchase has been submitted for review, additional in-app purchases can be submitted from the In-App Purchases section. Learn More
However when I go to the new version of the app I am preparing to send for review. There is NO section to attach the in app purchase to that version. Its supposed to be underneath the screenshots and such but its not there no matter what
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
StoreKit
App Store Connect
In-App Purchase
I have three questions about verify receipt
I use this api (https://buy.itunes.apple.com/verifyReceipt)to verify receipt is success or not. But since last month, this interface has started to return an error(21002).
I see this document (https://developer.apple.com/documentation/appstorereceipts/verifyreceipt) say its Deprecated.
My question is, is the error suddenly returned recently because the interface has been deprecated or for some other reason? (I haven't modified my code about this recently)
2. I can not understand this document: (https://developer.apple.com/documentation/appstorereceipts/validating_receipts_on_the_device)
Does this mean that in the new version, as long as the app returns a payment success (purchaseDetails.status == PurchaseStatus.purchased), the payment is guaranteed to be successful, and my server does not need to request payment result verification from Apple's server?
3. I try to use this (https://github.com/apple/app-store-server-library-java) to get TransactionInfo, but I dont konw to get Transaction status to know is success or not.
my java server code :
AppStoreServerAPIClient client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment);
TransactionInfoResponse response = client.getTransactionInfo(transactionId);
(bug i can note get transaction status, how do i konw this Transaction is success or not)
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
Hello Apple Developer Team,
We're experiencing consistent IAP approval rejections under Guideline 2.1, despite successful TestFlight verification. Here's our detailed situation:
Environment
StoreKit 1 implementation
Tested on iOS 18.5 or 18.6 devices
Sandbox environment works perfectly
Verification Steps Taken
✅ Confirmed all Product IDs match App Store Connect exactly
✅ Validated 10+ successful TestFlight transactions (attached screenshot samples)
✅ Verified banking/tax agreements are active
Objective-C Code (StoreKit1 Implementation)
- (void)buyProductId:(NSString *)pid AndSetGameOrderID:(NSString *)orderID{
if([SKPaymentQueue canMakePayments]){
if (!hasAddObserver) {
[[SKPaymentQueue defaultQueue] addTransactionObserver:_neo];
hasAddObserver = YES;
}
self.neoOrderID = orderID;
[[NSUserDefaults standardUserDefaults] setValue:orderID forKey:Pay_OrderId_Key];
self.productID = pid;
NSArray * product = [[NSArray alloc]initWithObjects:self.productID, nil];
NSSet * nsset = [NSSet setWithArray:product];
SKProductsRequest * request = [[SKProductsRequest alloc]initWithProductIdentifiers:nsset];
request.delegate = self;
[request start];
}else{
NSString * Err = @"Pembelian tidak diizinkan. Silakan aktifkan perizinan di pengaturan";
// UnitySendMessage("GameManager", "IAPPurchaseFailed", [Err UTF8String]);
return;
}
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray * product = response.products;
if ([product count] == 0)
{
[[SKPaymentQueue defaultQueue]removeTransactionObserver:_neo];
hasAddObserver = NO;
NSString * Err = [NSString stringWithFormat:@"Err = 01, Item tidak ditemukan %@",self.productID];
// UnitySendMessage("GameManager", "IAPPurchaseFailed", [Err UTF8String]);
return;
}
SKProduct * p = nil;
for (SKProduct * pro in product)
{
if ([pro.productIdentifier isEqualToString:self.productID]){
p = pro;
}else{
[request cancel];
[[SKPaymentQueue defaultQueue]removeTransactionObserver:_neo];
hasAddObserver = NO;
NSString * Err = [NSString stringWithFormat:@"Err = 02, %@",self.productID];
// UnitySendMessage("GameManager", "IAPPurchaseFailed", [Err UTF8String]);
return;
}
}
SKMutablePayment * mPayment = [SKMutablePayment paymentWithProduct:p];
mPayment.applicationUsername = [NSString stringWithFormat:@"%@",self.neoOrderID];
if(!hasAddObserver){
[[SKPaymentQueue defaultQueue] addTransactionObserver:_neo];
hasAddObserver = YES;
}
[[SKPaymentQueue defaultQueue] addPayment:mPayment];
}
- (void)request:(SKRequest *)request didFailWithError:(NSError *)error{
[[SKPaymentQueue defaultQueue]removeTransactionObserver:_neo];
hasAddObserver = NO;
NSString * Err = [NSString stringWithFormat:@"Err = 0%ld %@", (long)error.code, self.productID];
// UnitySendMessage("GameManager", "IAPPurchaseFailed", [Err UTF8String]);
}
- (void)requestDidFinish:(SKRequest *)request{
}
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transaction{
for(SKPaymentTransaction *tran in transaction){
if (SKPaymentTransactionStatePurchased == tran.transactionState){
[self completeTransaction:tran];
}else if(SKPaymentTransactionStateFailed == tran.transactionState){
[self failedTransaction:tran];
}
}
}
- (void)failedTransaction: (SKPaymentTransaction *)transaction
{
NSString * detail = [NSString stringWithFormat:@"%ld",(long)transaction.error.code];
// UnitySendMessage("GameManager", "IAPPurchaseFailed", [detail UTF8String]);
[[SKPaymentQueue defaultQueue]removeTransactionObserver:_neo];
hasAddObserver = NO;
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
}
- (void)completeTransaction:(SKPaymentTransaction *)transaction{
NSMutableDictionary * mdic = [NSMutableDictionary dictionary];
NSString * productIdentifier = transaction.payment.productIdentifier;
NSData * _recep = nil;
NSString * _receipt = @"";
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
_recep = transaction.transactionReceipt;
_receipt = [[NSString alloc]initWithData:_recep encoding:NSUTF8StringEncoding];
} else {
_recep = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
_receipt = [_recep base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
}
NSString * gameOrderid = [transaction payment].applicationUsername;
if (gameOrderid == nil) {
gameOrderid = [[NSUserDefaults standardUserDefaults] objectForKey:Pay_OrderId_Key];
}
if(_receipt != nil && gameOrderid != nil){
mdic[@"orderid"] = gameOrderid;
mdic[@"productid"] = productIdentifier;
mdic[@"receipt"] = _receipt;
}else{
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
return;
}
NSData * data = [NSJSONSerialization dataWithJSONObject:mdic options:kNilOptions error:nil];
NSString * jsonString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
if (hasAddObserver) {
[[SKPaymentQueue defaultQueue] removeTransactionObserver:_neo];
hasAddObserver = NO;
}
// UnitySendMessage("GameManager", "IAPPurchaseSuecess", [jsonString UTF8String]);
[self verifyReceipt:_recep completion:^(BOOL success, NSDictionary *response) {
if (success) {
NSLog(@"verify success");
// [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
[self verifySuecessDelTransactions];
}
}];
}
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue {
for(SKPaymentTransaction *tran in queue.transactions){
if (SKPaymentTransactionStatePurchased == tran.transactionState){
[self completeTransaction:tran];
}
}
}
- (void)verifySuecessDelTransactions{
SKPaymentQueue *paymentQueue = [SKPaymentQueue defaultQueue];
NSArray<SKPaymentTransaction *> *transactions = paymentQueue.transactions;
if (transactions.count == 0) {
return;
}
for (SKPaymentTransaction *transaction in transactions) {
if (transaction.transactionState == SKPaymentTransactionStatePurchased ||
transaction.transactionState == SKPaymentTransactionStateRestored) {
[paymentQueue finishTransaction:transaction];
}
}
}
Hey everyone,
I'm currently preparing an older iOS app for App Store release that includes a non-consumable In‑App Purchase using StoreKit 2. Everything works perfectly in the StoreKitTest environment inside Xcode – the product loads, the purchase flow runs, the transaction verifies.
However, when I run the same app through TestFlight, I always get the error:
❌ Product not available - mapped to
Here’s what I’ve already checked:
✅ The product ID is correct and matches what’s in App Store Connect (case-sensitive).
✅ The IAP is created in App Store Connect and includes:
Title
Product ID
Price Tier
Screenshot for review
✅ The App Store "Paid Applications" agreement is active.
✅ The app is using the correct bundle ID.
✅ I'm using Product.products(for: [productID]) from StoreKit 2.
✅ I’ve implemented fallback and retry logic (e.g. reload after delay).
✅ All IAP logic is wrapped in @MainActor and async-safe.
As the App got Rejected on Review, the IAP is also now in the Rejected Status.
Now the IAP shows status:
🟠 "Developer Action Required"
And App Review rejected the IAP with the message:
"Your first In‑App Purchase must be submitted together with a new app version."
But if I add the App to the Test again and therefore the IAP, then the app will get Rejected again for App Completeness, IAP does not work...
What am I doing wrong here? :)
Thanks a lot in advance
Cheers,
Niklas
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
StoreKit Test
App Review
StoreKit
In-App Purchase
Hi,
My app has an IAP and the view that let user to purchase is simply a ProductView. The purchase flow should be handled by the ProductView itself. I have tested the app with xcode storekit configuration, xcode run with sandbox account and also TestFlight environment as well. The purchase is triggered and the app feature is unlocked after purchase. However, I keep getting app review team feedback with the following problem:
Bug description: the purchase button is greyed out after we tapped on it, however, there's no purchase flow popped up
I have tried multiple things. Building with xcode cloud, removing the storekit configuration from the build scheme. But none can get the app review team to get through the problem.
The IAP is not available in certain region. In that case, the app will show a message. However, the app review attached an screenshot which shows the product view.
The view that allow users to purchase
if let product = store.products.first(where: { $0.id == "com.xxx.xxxxxxx" }) {
// If the product is available, show the ProductView
ProductView(id: product.id)
.productViewStyle(.compact)
} else {
// If the product is not available, show a message
Text("In-app purchase is not available in your region.")
}
The store class
@Published private(set) var products: [Product] = []
...
init() {
//To handle the parental approval flow
getUpdateTransaction()
}
func getUpdateTransaction() {
updates = Task {
for await update in StoreKit.Transaction.updates {
if let transaction = try? update.payloadValue {
await fetchActiveTransactions()
await transaction.finish()
}
}
}
}
Does anyone what can go wrong with ProductView? As this is part of the StoreKit API, I don't know what can go wrong. At least the purchase flow should be covered by it.
Also, is sandbox and TestFlight a good way to test IAP?
Thanks!
<SKPaymentQueue: 0x10629d1b0>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={client-environment-type=Sandbox, storefront-country-code=USA, NSUnderlyingError=0x108f15c80 {Error Domain=AMSErrorDomain Code=305 "Purchase Failed Server canceled the purchase" UserInfo={AMSFailureReason=Server canceled the purchase, AMSURL=https://sandbox.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?guid=00008030-001E19361A12202E, AMSDescription=Purchase Failed, AMSStatusCode=200, AMSServerPayload={
"cancel-purchase-batch" = 1;
customerMessage = "Unable to process your request.";
dialog = {
defaultButton = ok;
explanation = "Please try again later.\n\n[Environment: Sandbox]";
initialCheckboxValue = 1;
isFree = 1;
"m-allowed" = 0;
message = "Unable to process your request.";
okButtonString = OK;
};
failureType = "";
"m-allowed" = 0;
metrics = {
actionUrl = "sandbox.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy";
asnState = 0;
dialogId = "MZCommerce.SystemError";
eventType = dialog;
message = "Unable to process your re";
mtEventTime = "2025-07-30 07:08:24 Etc/GMT";
mtTopic = "xp_its_main";
options = (
OK
);
};
pings = (
);
}, NSDebugDescription=Purchase Failed Server canceled the purchase}}}
Hi!
My product SKU has been approved for Advanced Commerce API. I successfully receive a purchase pop-up with the correct information.
However, I am still having issues with completing the purchase. I always receive Unauthorize error when I confirm the purchase (subscription in my case; see the screenshot). I am using the node.js server library to sign the request. I made sure that the account is a valid account enabled for Sandbox.
Logs unfortunately don't indicate any further detail.
Thanks for your advice! We've been stuck on this for a while now and would appreciate your help.
Marek