Skip to main content
Solved

"The receipt is not valid" Error with on device sandbox testing

  • 1 December 2021
  • 5 replies
  • 3128 views

Forum|alt.badge.img+1

Hello!

 

Enjoying using RevenueCat so far but I’ve hit a head dead with iOS integration. I’ve made sure my single product is “Ready to Submit” state on App Store Connect. I’ve made several sandbox apple accounts. My Bundle ID is set up correctly on the RX dashboard. When I go through the purchase flow it all looks successful (including Apple success dialog) but at the final step I get the following RC error:

 

2021-11-30 21:20:34.384306-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: pawp_membership_monthly 1000000921455600 ((null)) (null) - 1
2021-11-30 21:20:34.389609-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/63B42ADB-A483-438C-87A1-B35A40640015/StoreKit/sandboxReceipt
2021-11-30 21:20:34.389793-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: 87214
2021-11-30 21:20:34.391632-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST /receipts
2021-11-30 21:20:34.391739-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts
2021-11-30 21:20:34.578941-0500 Pawp[372:8670] [Purchases] - DEBUG: ℹ️ applicationDidBecomeActive
2021-11-30 21:20:35.097159-0500 Pawp[372:10490] [Purchases] - DEBUG: ℹ️ API request completed with status: POST /v1/receipts 400
2021-11-30 21:20:35.100485-0500 Pawp[372:10490] [Purchases] - ERROR: 😿‼️ The receipt is not valid.
2021-11-30 21:20:35.100798-0500 Pawp[372:10490] [Purchases] - DEBUG: ℹ️ Serial request done: POST /receipts, 0 requests left in the queue
2021-11-30 21:20:35.105653-0500 Pawp[372:8670] [Purchases] - DEBUG: 💰 Finishing transaction pawp_membership_monthly 1000000921455600 ((null))
received action:
  UpsellAction.purchaseResult(
    Result.failure(
      NSError(
        domain: "RCPurchasesErrorDomain",
        code: 8,
        userInfo: [
          "NSLocalizedDescription": "The receipt is not valid.",
          "NSUnderlyingError": NSError(
            domain: "RCBackendErrorDomain",
            code: 7103,
            userInfo: [
              "NSLocalizedDescription": "The receipt is not valid."
            ]
          ),
          "finishable": 1,
          "rc_successfullySynced": 1,
          "readable_error_code": "INVALID_RECEIPT"
        ]
      )
    )
  )

Any idea what else I could be doing wrong? 

Thanks!

Danny

Best answer by Danny Hertz

Figured it out, I needed to upload my App-Specific Shared Secret. 

View original
Did this post help you find an answer to your question?

5 replies

Forum|alt.badge.img+1
  • Author
  • Helper
  • 1 reply
  • Answer
  • December 1, 2021

Figured it out, I needed to upload my App-Specific Shared Secret. 


Forum|alt.badge.img
  • New Member
  • 1 reply
  • April 19, 2022

I am facing exactly the same issue and I am a bit confused regarding the solution mentioned in the above answer. Where do I need to upload App-specific shared secret?


Forum|alt.badge.img+2

Forum|alt.badge.img+2
  • Member
  • 5 replies
  • December 16, 2023

Unlike y’all, I’m an idiot so it was this TODO… needed the actual API key

 

 


Forum|alt.badge.img+1

One thing that helped me (should anyone else stumble in here) was to set up the StoreKit Testing Framework section in RevenueCat.

The description implies that this section is only used for automating Xcode testing, however it is also required for any manual sandbox testing too!

See this guide:

https://www.revenuecat.com/docs/apple-app-store#ios-14-only-testing-on-the-simulator


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings