Still encountring this issue.
Its very hard to move forward without testing the In-App-Purchase functionality in my App.
A lot of funcitonalities depends on what happens after the purchase is successful, and there is no way I will move to production without testing the whole flow of the purchase.
Any one figured out a work-around this ?
Region: Middle East
Platform: React-Native, Expo CLI
I can also see this. I’m in process of evaluating Revenuecat on iOS and after successful transaction in sandbox I get error:
PlatformException(8, The receipt is not valid., {readable_error_code: INVALID_RECEIPT, message: The receipt is not valid., userCancelled: false, underlyingErrorMessage: The receipt is not valid., readableErrorCode: INVALID_RECEIPT, code: 8}, null)
I’m wondering if there is some issue in my setup or it’s sandbox/Apple fault.
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
ulog] - the Product is: Premium1988
TO JS {"products":8{"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: e"Premium1988"]
DEBUG: No existing products cached, starting store products request for: c"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: s"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: e"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()}
rerror] - {"code":"8","message":"Error 8, The receipt is not valid.","errorMessage":"Error 8, The receipt is not valid."}
elog] - the attempted product is: Premium1988
"error] - Error making purchase: {"code":"8","errorMessage":"Error 8, The receipt is not valid."}
I’ve set everything up correctly (and no different to previous projects), but am having this error now. Am I alone?
When I try to make a purchase, it appears to go through fine, but then alerts me I have already made the purchase (even though on startup, my entitlements return empty). Once I press okay to restore my previous purchase, I get the receipt invalid prompt. And nothing seems to happen then. No customer purchase shows on the RC sandbox purchases screen.
This is happening to me too, as described above.
ERROR: Product purchase for '#####' failed with error: Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={NSUnderlyingError=0x600003718e70 {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:699, readable_error_code=INVALID_RECEIPT, source_function=parseUnsuccessfulResponse(), rc_response_status_code=400, rc_backend_error_code=7103, NSLocalizedDescription=The receipt is not valid.}