Questions on App Store Server API behaviors: Production accounts in Sandbox, and Cleared Sandbox data

Hello,

I would like to clarify the exact technical behavior of the App Store Server API (V2) and StoreKit under the following two specific scenarios:

  • Case A (Production Account on Sandbox Endpoint):

If a user with a production Apple Account attempts to purchase through a build pointing to the Apple Sandbox environment (or Sandbox API), how does the Apple server handle this transaction and its data lifecycle? (Does StoreKit block this at the client-side, or does the API return a specific error code?)

  • Case B (Restoring Cleared Sandbox Data):

If a Sandbox tester's purchase history is cleared/deleted on the Apple server, and the app subsequently requests a "Restore Purchase" or queries the App Store Server API using a previously valid transactionID from that account, what specific error code (such as 4040010 TransactionNotFound) or empty response does the Apple server return?

I would highly appreciate your confirmation or any technical insights on these behaviors.

Thank you!

Questions on App Store Server API behaviors: Production accounts in Sandbox, and Cleared Sandbox data
 
 
Q