Skip to main content
This guide explains how to embed Tala Credit-as-a-Service into an Android wallet built with Crossmint. You will learn how to authenticate a user, create or load a Crossmint wallet, launch Tala’s lending flow, and handle the result.

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, and wallets.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.
This guide uses Base Sepolia and the Tala sandbox as examples. To follow along, you will also need:
  • 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)
In production, you need a Tala partnership and a production API key from the Tala team. Contact Crossmint Sales to get connected.

What You Will Build

High-level steps:
  1. Configure the Crossmint Kotlin SDK and the Tala sandbox SDK.
  2. Authenticate the user with Crossmint Auth email OTP.
  3. Create or load a Crossmint smart wallet on Base Sepolia.
  4. Launch the Tala lending flow.
  5. 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 with CrossmintNonCustodialSignerProvider so the SDK can show the email OTP signer UI. Send an OTP, verify it, and create the wallet.
MainActivity.kt
This example sends the OTP first and only shows the OTP field after the email is sent. In a production app, split the OTP collection and wallet creation steps into separate screens.

Launch the Tala Lending Flow

Register TalaSDK.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.
The contract returns a TalaResult:
  • TalaResult.LoanAccepted — the user accepted a loan. The loan details (reference ID, amount, currency) are delivered through TalaSDK.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 a requestId for support: NetworkUnavailable, ServerError, SessionExpired, TokenProviderError, KycCallbackMissing, and Unknown.
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 the chain 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

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.
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_.
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.
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.