Documentation Index
Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Quick diagnosis
| Symptom | Likely Cause | Solution |
|---|---|---|
| Compose version conflict | Compiler version mismatch | Align kotlinCompilerExtensionVersion |
| Checkout stays in Loading | Invalid/expired client token | Check Logcat for errors, regenerate token |
| Payment methods empty | Dashboard misconfiguration | Verify Dashboard settings and client session fields |
| Recomposition causes re-init | Controller created outside remember | Use rememberPrimerCheckoutController() |
| State not updating in UI | Not using lifecycle-aware collect | Use collectAsStateWithLifecycle() |
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
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
currencyCode and countryCode.
3DS challenge not completing
Cause: Payment gets stuck during 3DS authentication. Solution: Ensure your Activity hasandroid: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: UserememberPrimerCheckoutController() which survives recomposition:
State not updating in UI
Cause: UI doesn’t reflect state changes from the SDK. Solution: UsecollectAsStateWithLifecycle():
Validation vs payment errors
Understanding the difference helps with proper error handling:| Error Type | When It Occurs | How It’s Handled |
|---|---|---|
| Validation errors | During input (invalid format, missing fields) | Handled automatically by input components; prevents form submission |
| Payment failures | After form submission (declined card, network issues) | Requires explicit handling with error container or custom code |
Debugging tips
Log checkout state changes
Log all checkout events
Getting help
When contacting Primer support, include:- The
diagnosticsIdfrom any error callbacks - Your Android API level, Compose version, and SDK version
- Steps to reproduce the issue
See also
Events guide
Event handling patterns