title: iOS In-App Purchase - Authentication Failed - There was a problem with the app store
body: <p>Everything working fine using <code>RevenueCat</code> in Google purchasing and Apple sandbox. But in production mode (iOS 14 and Xcode 12) I got the below error on trying to make a purchase.</p>
  <pre><code>[Purchases] - DEBUG: PaymentQueue removedTransaction: agfpro3m (null) ((null) Error Domain=SKErrorDomain Code=0 &quot;An unknown error occurred&quot; UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x282604db0 {Error Domain=ASDErrorDomain Code=500 &quot;Unhandled exception&quot; UserInfo={NSUnderlyingError=0x282604c60 {Error Domain=AMSErrorDomain Code=100 &quot;Authentication Failed&quot; UserInfo={NSLocalizedFailureReason=The verify credentials call failed., NSLocalizedDescription=Authentication Failed, NSUnderlyingError=0x2826048a0 {Error Domain=AMSErrorDomain Code=0 &quot;Authentication Failed&quot; UserInfo=0x283c84380 (not displayed)}}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}) {
      NSLocalizedDescription = &quot;An unknown error occurred&quot;;
      NSUnderlyingError = &quot;Error Domain=ASDErrorDomain Code=500 \&quot;Unhandled exception\&quot; UserInfo={NSUnderlyingError=0x282604c60 {Error Domain=AMSErrorDomain Code=100 \&quot;Authentication Failed\&quot; UserInfo={NSLocalizedFailureReaso
  2020-10-15 09:36:10.504 [info][tid:com.facebook.react.JavaScript] [Error: There was a problem with the App Store.]
  </code></pre>
  <p>My app was rejected and they say the following.</p>
  <p>We found that your in-app purchase products exhibited one or more bugs when reviewed on iPad running iOS 14.0.1 on Wi-Fi.</p>
  <p>Specifically, there was an issue with the In app Purchase. We could not complete the purchase as we encountered a bug.</p>
  <p>Next Steps</p>
  <p>When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code &quot;Sandbox receipt used in production,&quot; you should validate against the test environment instead.</p>
  <p>Anyone already faced this issue?</p>
  <p>Thanks!!!!</p>