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#
- Compare the app's
bundle_idorpackage_nameon the server with the build you test. - For StoreKit testing in Xcode, add the public certificate from your
.storekitfile as the app'sxcode_certificatecredential. - Read the server message in the underlying error; the 7103 message names the cause.
- 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.
Related#
- What does VerificationError.invalidSignature mean in StoreKit 2?
- What does receiptAlreadyInUseError (code 7) mean in the purchases SDK?
- What does invalidCredentialsError (code 11) mean in the purchases SDK?
- What RevenueDot's API errors mean (server codes)
Source#
- RevenueDot purchases-ios: ErrorCode.swift (the iOS ErrorCode enum)
- RevenueDot purchases-android: PurchasesErrorCode.kt (the Android enum)
- RevenueDot purchases-ios: BackendErrorCode.swift (backend code mapping)
- RevenueDot purchases-android: common/errors.kt (backend code mapping)
Checked: 2026-10-03