---
title: "What does invalidReceiptError (code 8) mean in the purchases SDK?"
description: "invalidReceiptError (code 8) means the backend said the receipt or purchase token is not valid, usually code 7103. Check the bundle ID or package name and the store credentials."
url: https://revenuedot.app/docs/errors/sdk-invalid-receipt-error
---

# 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](https://revenuedot.app/docs/help/receipt-errors-4xx-vs-5xx.md). Deep dive: [revenuedot.app/errors/invalid-receipt-error](https://revenuedot.app/errors/invalid-receipt-error).

## Related

- [What does VerificationError.invalidSignature mean in StoreKit 2?](https://revenuedot.app/docs/errors/storekit-verification-error-invalid-signature.md)
- [What does receiptAlreadyInUseError (code 7) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-receipt-already-in-use-error.md)
- [What does invalidCredentialsError (code 11) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-invalid-credentials-error.md)
- [What RevenueDot's API errors mean (server codes)](https://revenuedot.app/docs/api/errors.md)

## Source

- [RevenueDot purchases-ios: ErrorCode.swift (the iOS ErrorCode enum)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Generated/ErrorCode.swift)
- [RevenueDot purchases-android: PurchasesErrorCode.kt (the Android enum)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/generated/com/revenuecat/purchases/PurchasesErrorCode.kt)
- [RevenueDot purchases-ios: BackendErrorCode.swift (backend code mapping)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Error%20Handling/BackendErrorCode.swift)
- [RevenueDot purchases-android: common/errors.kt (backend code mapping)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/com/revenuecat/purchases/common/errors.kt)

Checked: 2026-10-03
