TestFlight App uses wrong sandbox account for payment

I'm using TestFlight to test an app with payment/subscription functionality. I created sandbox accounts in AppStore Connect accordingly to be able to test the subscriptions. I'm logged in with the sandbox account.

When I try to subscribe in the App the wrong account (this is my actual real AppleID) is used for the subscription although it is recognized that this is just a sandbox subscription. I tried: logging off/on into the sandbox account creating a totally new sandbox account trying to trigger the payment with no logged in sandbox account The result is always: in the payment popup it is stated that the purchase account will be my original AppleID and not a sandbox account. How can I switch the accounts? Is this a bug at Apple's side somehow?

Replies

I also noticed strange behaviour with sandbox env regarding payment and subscriptions at all... Available products request (SKProductsRequest) firstly returns products and then causes stuck of app store and test flight app downloading (even installed apps shows as not installed yet). Also it stops returning subscriptions products at all. Device should be rebooted to be returned in normal state.

Please, somebody can clarify what is going on? @apple

TestFlight does not use Sandbox Apple ID’s created in App Store Connect, those are only used for apps locally distributed/signed. While TestFlight effectively uses sandbox behind the scenes, it just uses your regular Apple ID. Your production Apple ID is not charged nor will you see these transactions in your purchase history, invoices, etc. - prod and TestFlight are fully independent.

As for your other issue, I’m not entirely clear but if you can provide more info such as steps to reproduce, screenshots and a sysdiagnose then please file a ticket at: FeedbackAssistant.Apple.com

welcome to followup with a FB# here in this thread.

  • As @johnny12 said, if TestFlight doesn't use sandbox test accounts from App Store Connect, how do you clear purchase history for your main account to test?

Add a Comment

@apple Since TestFlight purchase uses regular Apple ID, is it possible to clear purchase history for that specific Apple ID in TestFlight Sandbox?

I'm facing exact same problem. When making purchases on the TestFlight environment, it always makes purchases against my real Apple ID. But the doc says we can test on TestFlight using Sandbox. https://developer.apple.com/documentation/storekit/in-app_purchase/testing_at_all_stages_of_development_with_xcode_and_sandbox