Skip to Content
Docs
Get startedPartner API v4Partner API v3Android SDK
v1.0.9

Configure

AbleCredit.configure() authenticates the current user session against the AbleCredit backend. Call it once after the user logs in, before any loan or capture operations.

What happens internally

  1. The SDK validates sdkKey and tenantId via a network ping to /api/v2/partners/ping.
  2. On success, the ping response is cached locally. Subsequent configure() calls on the same device skip the network round-trip – safe to call on every app start.
  3. If configure() returns AbleCreditResult.Failure, do not proceed to any loan or capture operations.

Parameters

ParameterDescription
sdkKeyRenamed from apiKey in v1.0.8. Your SDK authentication key.
tenantIdYour organisation's tenant identifier.
userIdThe currently logged-in user's identifier.
baseUrlAbleCredit backend base URL (UAT or Production).
branchIdYour branch identifier. Scopes the loan to a specific branch.
val result = AbleCredit.configure(
    context  = this,
    sdkKey   = "your_sdk_key",
    tenantId = "your_tenant_id",
    userId   = "user_123",
    baseUrl  = "https://your-base-url.com",
    branchId = "branch_001",
)
when (result) {
    is AbleCreditResult.Success -> { /* proceed */ }
    is AbleCreditResult.Failure -> { /* handle */ }
}

On this page