Skip to main content

Quick diagnosis

Installation issues

Compose version conflict

Cause: Build fails with Compose compiler version mismatch. Solution: Ensure your Compose compiler version is compatible:

Runtime issues

Checkout stays in Loading state

Cause: PrimerCheckoutState.Loading never transitions to Ready. Possible causes:
  • Invalid or expired client token
  • Network connectivity issues
  • Incorrect API key in client session creation
Solution: Check Logcat for error messages from the SDK. Ensure your client token is fresh and generated correctly.

Payment methods not showing

Cause: PrimerPaymentMethods shows an empty list. Possible causes:
  • No payment methods configured in Primer Dashboard
  • Client session missing required fields
  • Payment methods not enabled for the currency/country
Solution: Verify your Primer Dashboard configuration and ensure your client session includes the correct currencyCode and countryCode.

3DS challenge not completing

Cause: Payment gets stuck during 3DS authentication. Solution: Ensure your Activity has android:configChanges="orientation|screenSize" to prevent the WebView from being destroyed during configuration changes.

Compose-specific issues

Recomposition causes re-initialization

Cause: Checkout reinitializes on every recomposition. Solution: Use rememberPrimerCheckoutController() which survives recomposition:

State not updating in UI

Cause: UI doesn’t reflect state changes from the SDK. Solution: Use collectAsStateWithLifecycle():

Validation vs payment errors

Understanding the difference helps with proper error handling:
Don’t confuse these two error types. Validation errors prevent form submission and are shown inline. Payment failures occur after the form is submitted and require explicit handling.

Debugging tips

Log checkout state changes

Log all checkout state changes

Getting help

When contacting Primer support, include:
  1. The diagnosticsId from any PrimerCheckoutState.Failure
  2. Your Android API level, Compose version, and SDK version
  3. Steps to reproduce the issue

See also

Events guide

Event handling patterns