What does invalidReceiptError (code 8) mean in the purchases SDK?

The purchases SDK raises invalidReceiptError (code 8) when the backend rejects the receipt, signed transaction or purchase token.

Quick facts#

Error ErrorCode.invalidReceiptError (iOS), PurchasesErrorCode.InvalidReceiptError (Android), code 8
Where Purchases SDK (iOS, Android and the hybrid SDKs built on them)
What the vendor says The receipt is not valid.

Cause#

  • The backend answered 7103 (invalid receipt token) or, on iOS, 7712 (the purchased product is missing from the Apple receipt).
  • The receipt came from a build with a different bundle ID or package name than the app configured on the server.
  • A StoreKit testing receipt signed by Xcode's local certificate reached a server that does not know that certificate, or Google Play says the purchase token is invalid.

Fix#

  1. Compare the app's bundle_id or package_name on the server with the build you test.
  2. For StoreKit testing in Xcode, add the public certificate from your .storekit file as the app's xcode_certificate credential.
  3. Read the server message in the underlying error; the 7103 message names the cause.
  4. Run the credential check on the app page: a wrong App Store key or Google service account is a server setup problem, not a bad receipt.

Example#

Swift
// The purchases SDK throws `ErrorCode` values; match the one you handle and let the rest fall through.
func handle(_ error: Error) {
    guard let code = error as? ErrorCode else {
        print("Not a purchases SDK error: \(error)")
        return
    }
    switch code {
    case .invalidReceiptError:
        // A 4xx answer means the receipt can never be accepted: do not retry, point the customer to support.
        print("The receipt could not be verified")
    default:
        print("Other purchases error: \(code.description)")
    }
}

Compile-checked: npm run check:snippets type-checks this snippet with swiftc together with the ErrorCode.swift file of the RevenueDot purchases-ios fork (checked 2026-10-03).

How the RevenueDot SDK reports it#

RevenueDot's server answers 400 with code 7103, and the SDK then finishes the transaction for good. See 4xx or 5xx on a receipt. Deep dive: revenuedot.app/errors/invalid-receipt-error.

Source#

Checked: 2026-10-03

Edit this page on GitHub ↗ View as Markdown Last updated