Sticky

iOS 'Receipt is invalid' Megathread

  • 8 February 2023
  • 49 replies
  • 2939 views

Userlevel 6
Badge +8
  • RevenueCat Staff
  • 474 replies

If you’re here, it’s probably because you’ve encountered an active issue related to Apple’s receipt verification.

RevenueCat relies upon Apple’s `verifyReceipt` endpoint which is currently facing an outage: https://developer.apple.com/system-status/

This seems to be affecting sandbox and TestFlight purchases only at this time, although Apple’s status page doesn’t mention it explicitly.

Encountering this issue? Post below ⬇️ RevenueCat isn’t able to resolve this at this time from our end, but it may help bring awareness and ease to other developers facing the same issue.

Update 2/8/23 19:20 UTC:

Customers (and me 😃) reporting things are working as expected again - post below if you’re still having trouble, seems like a slow rollout of a fix from Apple.

Update 2/8/23 17:40 UTC:

Apple’s reporting the issue is fixed, but we’re still encountering errors. Will provide another update as soon as possible.


49 replies

Badge +2

Recently started getting “Receipt is not valid” out of nowhere for purchasing a subscription with `"rc_backend_error_code": 7103`, I am using StoreKit 2 for debug configuration so i can use StoreKit Configuration file. Status page is not reporting an outage.

RevenueCat 4.31.6

IOS 17.2.1

I've been facing the same error since yesterday: RevenueCat.ErrorCode Code=8 'The receipt is not valid.' (rc_backend_error_code=7103). Unable to test purchases on the simulator. Everything is configured according to the documentation: https://www.revenuecat.com/docs/apple-app-store#testflight

RevenueCat Version: 4.31.6

iOS Versions: 17.0.1 / 17.2.1

Badge +5

The exact same problem is happening to me @Dylan Thomas

Badge +1

I spoke too soon

 

I forgot the Storekit testing framework. Once I added that and reset my simulator it worked!


Instructions for anyone else who got lost here: 

https://www.revenuecat.com/docs/apple-app-store#testflight

 

 

Badge +3

I’m getting this error aswell. I’m testing on a physical device from Xcode. Purchase seems to go through ok, then I get the the error message ‘Purchase failed: Error 8, the receipt is not valid’ showing up, and purchase does not go through. I’ve tried signing in with a different sandbox account, and also changing the app-specific shared secret, as suggested above, and still get the same error.

 I am using the purchases-capacitor plugin.

I see the below in the logs in Xcode.
 

⚡️  [log] - purchaseProduct function started

⚡️  To Native ->  Purchases getProducts 127052930

⚡️  [log] - the Product is: Premium1988

⚡️  TO JS {"products":[{"currencyCode":"USD","price":0.99,"productType":"NON_CONSUMABLE","description":"This is description for the premium version.","discounts":[],"productCategory":"NON_SUBSCRIPTION","introPrice":null,"title":"PremiumVersion","identifier":"Premium

⚡️  To Native ->  Purchases purchaseStoreProduct 127052931

DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["Premium1988"]

DEBUG: ℹ️ No existing products cached, starting store products request for: ["androidpremium"]

DEBUG: 😻 Store products request received response

DEBUG: 😻 Store products request finished

DEBUG: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.

DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["Premium1988"]

INFO: 💰 Purchasing Product 'Premium1988'

DEBUG: ℹ️ Adding payment for product 'Premium1988'. 0 transactions already in the queue.

DEBUG: ℹ️ StoreKit1Wrapper (0x0000000283350600) updatedTransaction: Premium1988 0

DEBUG: ℹ️ StoreKit1Wrapper (0x0000000283350600) updatedTransaction: Premium1988 12 0 1

DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:9af31d5ea54f4b768b3012653d462185

DEBUG: ℹ️ TransactionPoster: handling transaction '12' for product 'Premium1988' (date: 2023-12-30 13:27:46 +0000)

DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.

DEBUG: ℹ️ SKReceiptRefreshRequest started

DEBUG: ℹ️ SKReceiptRefreshRequest finished

DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/1914C4BD-915A-4276-AB8C-5B54CD44060E/StoreKit/sandboxReceipt

DEBUG: ℹ️ Skipping products request for these products because they were already cached: ["Premium1988"]

DEBUG: ℹ️ PostReceiptDataOperation: Started

INFO: ℹ️ Parsing receipt

INFO: ℹ️ Receipt parsed successfully

DEBUG: ℹ️ PostReceiptDataOperation: Posting receipt (source: 'purchase') (note: the contents might not be up-to-date, but it will be refreshed with Apple's servers):

{"in_app_purchases":[{"quantity":1,"product_type":-1,"product_id":"Premium1988","purchase_date":"2023-12-29T01:22:23Z","transaction_id":"0"}],"application_version":"1","expiration_date":"4001-01-01T00:00:00Z","bundle_id":"com.slangire.app","opaque_value":"Ozl95wgAAAA=","sha1_hash":"V5S+9DWG1tiFczk7LYfvOP\/xjgM=","creation_date":"2023-12-30T13:27:48Z"}

DEBUG: ℹ️ There are no requests currently running, starting request POST /v1/receipts

DEBUG: ℹ️ API request started: POST '/v1/receipts'

ERROR MESSAGE:  {"code":"8","message":"Error 8, The receipt is not valid.","errorMessage":"Error 8, The receipt is not valid."}

ERROR: 😿‼️ The receipt is not valid.

DEBUG: ℹ️ API request failed: POST '/v1/receipts' (400): The receipt is not valid.

Request-ID: '85ee1921-bee1-49b8-a7e2-87d6fc5816e4'; Amzn-Trace-ID: 'Root=1-65901ad4-2842f7a638e73de25262105e'

DEBUG: ℹ️ PostReceiptDataOperation: Finished

INFO: 💰 Finishing transaction '12' for product 'Premium1988'

DEBUG: ℹ️ Serial request done: POST /v1/receipts, 0 requests left in the queue

DEBUG: ℹ️ StoreKit1Wrapper (0x0000000283350600) removedTransaction: Premium1988 12 0 1

ERROR: 😿‼️ The receipt is not valid.

ERROR: 💰 Product purchase for 'Premium1988' failed with error: Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={rc_response_status_code=400, NSLocalizedDescription=The receipt is not valid., rc_backend_error_code=7103, readable_error_code=INVALID_RECEIPT, NSUnderlyingError=0x2819deb50 {Error Domain=RevenueCat.BackendErrorCode Code=7103 "The receipt is not valid." UserInfo={rc_backend_error_code=7103, NSLocalizedDescription=The receipt is not valid.}}, source_file=RevenueCat/HTTPClient.swift:650, source_function=parseUnsuccessfulResponse()}

⚡️  [error] - {"code":"8","message":"Error 8, The receipt is not valid.","errorMessage":"Error 8, The receipt is not valid."}

⚡️  [log] - the attempted product is: Premium1988

⚡️  [error] - Error making purchase: {"code":"8","errorMessage":"Error 8, The receipt is not valid."}

Badge

Started seeing this today. Across two different projects. Was brought to my attention by App Review in the form of app rejections. Both submissions were app updaets.

Badge +1

I’m facing the same error.
Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={NSLocalizedDescription=The receipt is not valid.

I haven’t made any changes to my RevenueCat config. Please can someone confirm this only happens on dev sandbox/testflight?

Badge

 

 

I am having this issue right this moment 

with SandBox tester 

Xcode 15.0 , real device iOS 15.0 using subscription . 

Badge +1

Still having this issue in West US when testing using a sandbox user on a device. I am getting an Apple purchases success modal for the purchase first, then getting the “receipt not valid” error. If I wait to click “Ok” on the Apple success modal it appears to work, but if clicking “Ok” quickly it throw “receipt not valid”.

 

Could be a race condition issue on Apple’s end? Hopefully it’s actually only affecting sandbox.

Badge +2

Same here in Europe. Not resolved! Still not working. Expo with Revenuecat eas development build:

{"code":"8","message":"The receipt is not valid.","domain":"RevenueCat.ErrorCode","userInfo":{"NSUnderlyingError":{"code":"7103","message":"underlying error","domain":"RevenueCat.BackendErrorCode","userInfo":{"NSLocalizedDescription":"The receipt is not valid."},"nativeStackIOS" blablabla

Userlevel 2
Badge +4

Those of you still having trouble try signing out of your sandbox account and back in again.  On my iPad I just tried a sub purchase and it was failing repeatedly.  After sign out/in it worked on the first attempt.

Userlevel 1
Badge +5

I just got this today. Is it still a thing?

Userlevel 1
Badge +5

I copied the example code that had usesStoreKit2IfAvailable set to true. I changed it false, and I see the error much less, but I have to release the app again.

I’m having this same problem.

App review won’t validate my app because they can’t make purchases in the sandbox environment.

Region: Australia

Platform: iOS SwiftUI with TestFlight

Badge +2

Issue started again today

Badge

I encountered this issue in Sandbox yesterday and still see it today. Not sure if I can start review submission because reviewers will probably see the same. I tried on two different devices and accounts. Everything was working fine before yesterday’s evening…

ERROR: 😿‼️ The receipt is not valid.

 

Started working today but after adding (re-adding) the App Store Connect App-Specific Shared Secret in the app’s dashboard. I was convinced that the secret was added earlier, but today it turned out that it was not. It seems that RevenueCat by some strange coincidence did not save the changes, the field was empty. I then deleted the key again to make sure that was the cause, and indeed it stopped working again (invalid receipt). After adding the key again, today it works...

Badge +1

Same issue here, the one-time purchase was working, when we migrate it to subscription we started getting this error.. 

Badge +1

I’m facing the same error.
Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={NSLocalizedDescription=The receipt is not valid.

I haven’t made any changes to my RevenueCat config. Please can someone confirm this only happens on dev sandbox/testflight?

This issue has just start arising for me as well.. it only seems to affect the simulator for me. I have been able to successfully make a purchase on a test device that has previously not been subscribed, I also have not had any issues with my beta testers through TestFlight 

Badge +1

I’m facing the same error.
Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={NSLocalizedDescription=The receipt is not valid.

I haven’t made any changes to my RevenueCat config. Please can someone confirm this only happens on dev sandbox/testflight?

This issue has just start arising for me as well.. it only seems to affect the simulator for me. I have been able to successfully make a purchase on a test device that has previously not been subscribed, I also have not had any issues with my beta testers through TestFlight 

Thanks, I checked subscribing with my device and works, as long as I’m not running the storekit test environment. So I guess it’s just a dev. thing.

Badge

One thing that helped me 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

Userlevel 1
Badge +2

Hope they will resolve it soon ! :) 

Userlevel 6
Badge +8

Update: Apple’s reporting the issue is fixed, but we’re still encountering errors. Will provide another update as soon as possible.

Userlevel 1
Badge +2

Update: Apple’s reporting the issue is fixed, but we’re still encountering errors. Will provide another update as soon as possible.

For me, it is working 😍

Userlevel 1
Badge +3

Update: Apple’s reporting the issue is fixed, but we’re still encountering errors. Will provide another update as soon as possible.

For me, it is working 😍

im still facing this error untill now  , are you happy now ?😂

Badge +3

I’m located in the US. Not fixed for me yet. 

Reply