Use of the App Store Server API in a production environment.

When submitting an app, reviewers are aware that they are using the In App Purchase in Sandbox environment. Therefore, we recognize that when processing an app to run the App Store Server API from the app, the production App Store Server API must be run, and if it is a failure, the Snadbox API must be run. As follows. https://developer.apple.com/documentation/appstoreserverapi#3820693

This would result in two http communications, so is there any more efficient way to do this?

Answered by App Store Commerce Engineer in 802077022

The recommendation is to always send the expected environment along with the signed JWS or other information sent to your server. Using production then Sandbox is only necessary if dealing with an app version that was not programmed to send up that information. On device, you can access https://developer.apple.com/documentation/storekit/transaction/3963920-environment to see the environment and send that to the server directly

Accepted Answer

The recommendation is to always send the expected environment along with the signed JWS or other information sent to your server. Using production then Sandbox is only necessary if dealing with an app version that was not programmed to send up that information. On device, you can access https://developer.apple.com/documentation/storekit/transaction/3963920-environment to see the environment and send that to the server directly

Use of the App Store Server API in a production environment.
 
 
Q