in-app purchase failed on Testflight

Problem:

We are experiencing an in-app purchase issue since last Friday. Everything works fine on sandbox environment with sandbox test account. But when it comes to Testflight, all services related to in-app purchase failed, including refreshing receipts, restoring purchase, and making new purchase. They all have the same error msg which is Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store"



What I did:

I searched across the forum and found forks posting the same issue. Following their guide, I checked the the banking and tax info, which is all clear. I also tried clearing and recreating test flight users, which did not work.



Environment:

OS Version: 13.3.1

Xcode Version: 11.3.1

Same here, Sandbox restore and purchase works, Testflight not.

Same here. ZERO success with TestFlight external users.

Same here. Testers who installed the app from TestFlight failed to make IAP.

This is happening for my testers too. It clearly can connect to the App Store, because it downloads the list of available IAP and prices. I think it's failing in the authentication process when they try to buy an item.


I've had some occasional success with some testers, but 80% of them fail with that "Cannot connect" error.


If it's any use to you, I created a single "Consumable" IAP called "Tip the Developer." Because it's consumable, your testers can keep testing IAP over and over again, which means you don't need extra sandbox testers, or any (but this one) fake IAP items to test with.

Tried a test:


1. I had an external user/TestFlight beta tester log out of iTunes on their iPad and I entered my own iTunes account info (used as an iTunes Connect Internal user). Now the in-app purchases DO work on the device. (I also notice this email address gets automatically entered into the sandbox account field on the device.)


2. Deleted app and logged out of iTunes on the iPad.


3. Had TestFlight user re-enter their own iTunes account info on the iPad.


4. Had TestFlight user re-download app and try IAP. Now IAP does NOT work again. (Same "Cannot connect to iTunes Store" message.)


I can only surmise that something is seriously messed-up with TestFlight and iTunes Connect in regards to external user accounts.


Sigh.

Same here on consumable IAP when testing on TestFlight with the exact same error "Cannot connect to iTunes Store". However, testing with Sandbox users went smoothly (100% of the purchases succeeded with no error whatsoever). To investigate the issue further I installed the StoreKit Profile which displayed the following error :


"StoreKitClient: Buy failed with error: Error Domain=SSErrorDomain Code=13 "This Apple ID temporarily cannot be used in the iTunes Store because it could not be found. Try again later."


I really cannot see what I can do to solve this problem!

I am also experiencing this problem. IAP works great in local sandbox, but no external beta testers can make a purchase due to this error:


Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store"


It looks like some Connect users can make testflight purchases but others cannot.


This is stalling our work.

Today I have added new internal tester for auto-renewable in-app testing but it doesn't work. I'm getting this Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" while in-app purchase.


It's working fine for Sandbox tester.


It took my whole day.


Thank you.

Make sure you're using an SKProduct that has been retrieved via a StoreKit query immediately prior to making the purchase. Do not cache SKProducts, otherwise some users will get this error.
Has anyone solved this issue yet? Unfortunately Aidano's solution did not work. I also have tested and learned that it is a user-specific issue, and not a device specific issue.

I have been in contact with a (very helpful, thank you!) Apple engineer through a code-level support ticket and they said that sometimes testflight user accounts will get corrupted. However, this issue also affected the app review process and was the reason for my app's rejection from the app store, and I doubt they would be using corrupted accounts.
Can anyone solve this problem now?

I ran into this problem as well, and Apple was rejected the app.
in-app purchase failed on Testflight
 
 
Q