Solved

Receipt is not valid when purchasing package in Sandbox

  • 11 October 2022
  • 1 reply
  • 741 views

Badge +1

Trying to purchase package in the Sandbox (with no products in Appstore, only in StoreKit), everything seems to be set up fine. It results in success message “Your purchase was successful”

But after tapping okay an error happens which says “The receipt is not valid”

2022-10-11 17:42:27.282308+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ Vending Offerings from cache

2022-10-11 17:42:27.282698+0300 lumio[79672:5449989] [Purchases] - INFO: 💰 Purchasing Product 'monthly_sub' from package in Offering 'default'

2022-10-11 17:42:27.286050+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: monthly_sub 0

2022-10-11 17:42:27.286381+0300 lumio[79672:5449989] [Purchases] - WARN: 🍎‼️ There is a problem with the SKPaymentTransaction missing a transaction date - this is an issue with the App Store. Unix Epoch will be used instead.

2022-10-11 17:42:27.286621+0300 lumio[79672:5449989] [Purchases] - WARN: 🍎‼️ There is a problem with the SKPaymentTransaction missing a transaction identifier - this is an issue with the App Store.Transactions in the backend and in webhooks are unaffected and will have the correct identifier. This is a bug in StoreKit 1. To prevent running into this issue on devices running iOS 15+, watchOS 8+, macOS 12+, and tvOS 15+, you can set `usesStoreKit2IfAvailable` to true when calling `configure`.

2022-10-11 17:42:33.504420+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ applicationDidBecomeActive

2022-10-11 17:42:51.295690+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: monthly_sub 0 1

2022-10-11 17:42:51.297408+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.

2022-10-11 17:42:51.341548+0300 lumio[79672:5466521] [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///Users/mk/Library/Developer/CoreSimulator/Devices/D680CDA1-BD2B-4801-BD11-CCD62B03737D/data/Containers/Data/Application/CD3692A9-753B-46EC-A1D8-337F7826507A/StoreKit/receipt

2022-10-11 17:42:51.342249+0300 lumio[79672:5466521] [Purchases] - DEBUG: ℹ️ Skipping products request because products were already cached. products: ["monthly_sub"]

2022-10-11 17:42:51.342732+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: mykola.kovtun+09083@itjet.io

2022-10-11 17:42:51.363078+0300 lumio[79672:5466126] [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Started

2022-10-11 17:42:51.363279+0300 lumio[79672:5466126] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST receipts

2022-10-11 17:42:51.365908+0300 lumio[79672:5466126] [Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts

2022-10-11 17:42:51.693074+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ applicationDidBecomeActive

2022-10-11 17:42:52.954428+0300 lumio[79672:5466521] [Purchases] - DEBUG: ℹ️ API request completed: POST /v1/receipts 400

2022-10-11 17:42:52.957802+0300 lumio[79672:5466521] [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Finished

2022-10-11 17:42:52.958009+0300 lumio[79672:5466521] [Purchases] - DEBUG: ℹ️ Serial request done: POST receipts, 0 requests left in the queue

2022-10-11 17:42:52.960332+0300 lumio[79672:5449989] [Purchases] - ERROR: 😿‼️ The receipt is not valid.

2022-10-11 17:42:52.961317+0300 lumio[79672:5449989] [Purchases] - ERROR: 💰 Product purchase for 'monthly_sub' failed with error: Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid." UserInfo={NSLocalizedDescription=The receipt is not valid., source_file=RevenueCat/HTTPClient.swift:367, readable_error_code=INVALID_RECEIPT, source_function=convertUnsuccessfulResponseToError(), NSUnderlyingError=0x60000250a6d0 {Error Domain=RevenueCat.BackendErrorCode Code=7103 "The receipt is not valid." UserInfo={NSLocalizedDescription=The receipt is not valid.}}, rc_response_status_code=400}

2022-10-11 17:42:52.981474+0300 lumio[79672:5449989] [Purchases] - INFO: 💰 Finishing transaction monthly_sub 0 ()

2022-10-11 17:42:53.017409+0300 lumio[79672:5449989] [Purchases] - DEBUG: ℹ️ PaymentQueue removedTransaction: monthly_sub 0 1

I already: 

  • Followed StoreKit test guide
  • Re-uploaded the StoreKit certificate
  • Checked that all products in StoreKit file are listed in the dashboard
  • Checked that bundle id is the same as in the app and app secret is added and correct

Have no idea, what can be wrong to receive such an outcome, any thoughts?
Thanks in advance

icon

Best answer by Mykola 12 October 2022, 10:27

View original

1 reply

Badge +1

Solved
Checked everything one more time and seems like the issue was in the bundle id

Reply