Overview
The Android / Kotlin SDK is designed for Bolt Managed Checkout and SSO Login. It handles the full checkout experience: including shipping, payment, and order completion: as well as Bolt account authentication via OAuth 2.0.
com.bolt:checkout) provides a streamlined integration for launching Bolt’s managed checkout flow and SSO login from your Android app. The SDK handles the complete checkout UI, 3D Secure challenges, and payment authorization, so you can focus on your app experience.
Completing the integration requires three primary steps:
- Initialize the SDK with your publishable key.
- Register an activity result launcher to handle lifecycle events.
- Launch the checkout flow using an order token generated by your backend.
Installation
The SDK artifact is published to Maven Central. Add it to your app-levelbuild.gradle or build.gradle.kts file:
SDK Initialization
The SDK must be initialized exactly once during your application’s lifecycle. The best place to do this is in your customApplication class’s onCreate() method.
First, declare your application subclass in your AndroidManifest.xml:
BoltCheckout with your application context, publishable key, and environment:
Configuration Requirements
To use the SDK, ensure you have the following credentials properly configured:| Credential | Where it’s used | Description |
|---|---|---|
publishableKey | BoltCheckout.init() | Your unique merchant identifier provided by Bolt. |
orderToken | BoltCheckoutConfig | A unique, per-checkout token generated by your backend server. |
Next Steps
- Checkout Flow: Generate order tokens and launch the managed checkout experience.
- SSO Login: Authenticate users with their Bolt account via OAuth 2.0.
- Custom Checkout: Build a custom checkout using the payment flow and authorization APIs.
- API Reference: Full reference for all delegates, result types, and callbacks.