Skip to main content
Primer Checkout Android SDK is currently in beta (v3.0.0-beta.2). The API is subject to change before the stable release.
Error class delivered through PrimerCheckoutEvent.Failure. Contains error details and a diagnostics ID for Primer support.

Definition

class PrimerError {
    val errorId: String
    val description: String
    val errorCode: String?
    val diagnosticsId: String
    val recoverySuggestion: String?
}

Properties

PropertyTypeDescription
errorIdStringUnique error identifier for programmatic handling
descriptionStringHuman-readable error message (suitable for logging)
errorCodeString?Specific failure reason (e.g., "card_declined", "insufficient_funds"). null for non-payment errors.
diagnosticsIdStringUnique diagnostics ID. Provide to Primer support when investigating issues.
recoverySuggestionString?Suggested recovery action. null when no recovery applies.