Prerequisites
To use Tala with Crossmint wallets, you need:- Crossmint wallet: a wallet on Base Sepolia
- API key: a staging Client API Key with the scopes
users.create,users.read,wallets.create,wallets.read,wallets:transactions.create,wallets:transactions.sign,wallets:balance.read, andwallets.fund(create in the Crossmint Console). In staging, all scopes are included by default. - Android project: an app with the Crossmint Kotlin SDK and the Tala Lending SDK AARs. This guide uses the sandbox module that Tala shares for evaluation.
- Tala AARs: the Tala SDK AAR (
lending-sdk-<VERSION>.aar) and the sandbox AAR (lending-sdk-sandbox-<VERSION>.aar), which Tala shares with partners for evaluation. The sandbox AAR is a thin add-on and requires the main SDK AAR alongside it. - Test tokens: test USDC or USDXM in the wallet (use wallet.fund or the Circle USDC Faucet)
- Gas: ETH on Base Sepolia for gas fees (not required if gas sponsorship is enabled)
What You Will Build
High-level steps:- Configure the Crossmint Kotlin SDK and the Tala sandbox SDK.
- Authenticate the user with Crossmint Auth email OTP.
- Create or load a Crossmint smart wallet on Base Sepolia.
- Launch the Tala lending flow.
- Handle the Tala result.
Tala’s sandbox module is for UI/UX evaluation only. It does not call the Tala backend or move real funds.
Production integration requires Tala partnership credentials.
Add the SDKs
1
Drop the Tala AARs into app/libs/
Tala provides the AARs directly to partners out-of-band. The main SDK artifact is
lending-sdk-<VERSION>.aar; the sandbox artifact is lending-sdk-sandbox-<VERSION>.aar. For sandbox evaluation, drop both files into app/libs/ (the sandbox module depends on the main SDK). In production, only the main SDK AAR is required.2
Add repositories and dependencies
settings.gradle.kts
app/build.gradle.kts
3
Initialize Crossmint and Tala
Initialize the Crossmint SDK in your
Application class. For sandbox, call TalaSandbox.init instead of TalaSDK.init — it wires the SDK to bundled fixtures so no Tala backend or session token is needed.MyApplication.kt
CrossmintSDK.configure must be called on the main thread before any other Crossmint SDK call. The environment
(staging vs production) is derived from the key prefix: staging keys start with ck_staging_ and production keys
with ck_production_.Authenticate and Create a Wallet
Wrap your Compose UI withCrossmintNonCustodialSignerProvider so the SDK can show the email OTP signer UI. Send an OTP, verify it, and create the wallet.
MainActivity.kt
Launch the Tala Lending Flow
RegisterTalaSDK.Contract with rememberLauncherForActivityResult inside your composable (as shown in MainActivity above) and launch it with the launch() extension from com.tala.sdk.launch. The contract takes no input: the user identity is bound to the session token that the SDK fetches through TalaSDK.setSessionTokenProvider. In sandbox, TalaSandbox.init installs a test token provider for you.
TalaResult:
TalaResult.LoanAccepted— the user accepted a loan. The loan details (reference ID, amount, currency) are delivered throughTalaSDK.setLoanVerificationCallback, not on the result.TalaResult.Abandoned— the user dismissed the flow.TalaResult.ConsentDeclined— the user declined the consent screen.TalaResult.NoLoanOffer— Tala has no offer for this user.TalaResult.Error— a sealed hierarchy of typed errors, each carrying arequestIdfor support:NetworkUnavailable,ServerError,SessionExpired,TokenProviderError,KycCallbackMissing, andUnknown.
In production, the session token must come from your backend and is supplied through
TalaSDK.setSessionTokenProvider. The Tala team provides the production setup details when you partner with them.Sandbox Scenarios
TalaSandbox.init accepts an optional scenario argument so you can test each major flow without editing fixtures:
init is idempotent, so you can re-initialize with the picked scenario right before launching.
Repay a Loan from the Wallet
After Tala returns a repayment address or contract call, send USDC from the Crossmint wallet.wallet is the EVMWallet created in Authenticate and Create a Wallet (or loaded with sdk.wallets.getWallet):
Production
To enable Tala in production, you need a Tala partnership and a production API key provided by the Tala team. Contact Crossmint Sales to get connected.Customizing the Integration
Switch chains by changing thechain argument in sdk.wallets.createWallet — for example, EVMChain.Base in production or EVMChain.BaseSepolia for testing. To change Tala’s consent mode, repayment handling, or legal links, update the TalaConfig you pass to TalaSandbox.init.
Tala supports specific emerging markets; confirm the country, currency, and disbursement token with the Tala team.
Troubleshooting
Tala SDK returns TalaResult.Error.SessionExpired or TokenProviderError in production
Tala SDK returns TalaResult.Error.SessionExpired or TokenProviderError in production
In production, the session token must come from your backend through
TalaSDK.setSessionTokenProvider. In sandbox, TalaSandbox.init installs a test provider so no backend is needed. Contact Crossmint Sales to get connected with the Tala team and receive a production API key.The Crossmint wallet fails to create with an API key error
The Crossmint wallet fails to create with an API key error
Ensure you are using a client API key (
ck_...) with the wallets.create scope. The SDK environment is derived
from the key prefix: staging keys start with ck_staging_ and production keys with ck_production_.OTP dialog does not appear when signing a transaction
OTP dialog does not appear when signing a transaction
CrossmintNonCustodialSignerProvider must wrap your Compose content. If you are not using Compose, observe
CrossmintSDK.shared.isOTPRequired and call CrossmintSDK.shared.submit(otp) from your own UI.Tala sandbox UI shows the same scenario every time
Tala sandbox UI shows the same scenario every time
TalaSandbox.init is idempotent. Call it again with the desired TalaSandbox.Scenario right before launching TalaSDK.Contract.Next Steps
Check Wallet Balances
Query USDC and native token balances before and after a loan.
Send Custom EVM Transactions
Repay or disburse using raw contract calls when Tala provides the repayment contract.

