SDKs
Official client libraries and SDKs for iOS, Android, and Web platforms. Native integrations with comprehensive examples.
JavaScript / TypeScript
v2.1.0Full-featured SDK for Node.js and browser environments. Supports all FreshCredit APIs with type definitions.
npm install @freshcredit/sdkimport { FreshCredit } from '@freshcredit/sdk';
const client = new FreshCredit({
apiKey: process.env.FRESHCREDIT_API_KEY,
apiSecret: process.env.FRESHCREDIT_API_SECRET,
});
// Verify identity
const verification = await client.blockid.verify({
userId: 'user_123',
type: 'kyc_basic',
});
// Generate credit score
const score = await client.blockscore.score({
userId: 'user_123',
modelId: 'model_custom_456',
});iOS (Swift)
v2.0.1Native Swift SDK for iOS apps. Full support for BlockID™ identity verification and wallet management.
pod 'FreshCredit'import FreshCredit
let client = FreshCredit(
apiKey: "fc_live_xxxxxxxxxxxxxxxx",
apiSecret: "fc_secret_xxxxxxxxxxxxxxxx"
)
// Verify identity
let verification = try await client.blockID.verify(
userId: "user_123",
type: .kycBasic
)
// Get credit score
let score = try await client.blockScore.score(
userId: "user_123",
modelId: "model_custom_456"
)Android (Kotlin)
v2.1.0Native Kotlin SDK for Android. Comprehensive API coverage with coroutine support.
implementation 'com.freshcredit:sdk:2.1.0'import com.freshcredit.sdk.FreshCredit
val client = FreshCredit(
apiKey = "fc_live_xxxxxxxxxxxxxxxx",
apiSecret = "fc_secret_xxxxxxxxxxxxxxxx"
)
// Verify identity
val verification = client.blockID.verify(
userId = "user_123",
type = VerificationType.KYC_BASIC
).await()
// Get credit score
val score = client.blockScore.score(
userId = "user_123",
modelId = "model_custom_456"
).await()Python
v2.0.3Python SDK for backend integrations and data science workflows. Async support with aiohttp.
pip install freshcreditfrom freshcredit import FreshCredit
client = FreshCredit(
api_key="fc_live_xxxxxxxxxxxxxxxx",
api_secret="fc_secret_xxxxxxxxxxxxxxxx"
)
# Verify identity
verification = client.blockid.verify(
user_id="user_123",
type="kyc_basic"
)
# Generate credit score
score = client.blockscore.score(
user_id="user_123",
model_id="model_custom_456"
)Go
v2.0.0Go SDK for high-performance backend services. Full context support for cancellation and timeouts.
go get github.com/freshcredit/go-sdkpackage main
import (
"context"
"github.com/freshcredit/go-sdk"
)
func main() {
client := freshcredit.New(
"fc_live_xxxxxxxxxxxxxxxx",
"fc_secret_xxxxxxxxxxxxxxxx",
)
// Verify identity
verification, _ := client.BlockID.Verify(context.Background(),
&freshcredit.VerifyRequest{
UserID: "user_123",
Type: "kyc_basic",
},
)
}Rust
v2.0.0Rust SDK for systems programming and WebAssembly. Memory-safe implementation matching our core infrastructure.
cargo add freshcredituse freshcredit::Client;
#[tokio::main]
async fn main() → Result<(), Box<dyn std::error::Error>> {
let client = Client::new(
"fc_live_xxxxxxxxxxxxxxxx",
"fc_secret_xxxxxxxxxxxxxxxx",
)?;
// Verify identity
let verification = client
.blockid()
.verify("user_123", "kyc_basic")
.await?;
Ok(())
}Automatic HMAC Signing
All SDKs automatically sign requests with HMAC-SHA256. No manual signature calculation needed.
Retry Logic & Exponential Backoff
Built-in retry mechanisms with configurable exponential backoff for resilience.
Type Safety
Full type definitions and compile-time safety in TypeScript, Swift, Kotlin, and Rust.
Webhook Helpers
Utility functions for webhook signature verification and payload parsing.