Skip to main content
FreshCreditFreshCredit®INC
Documentation / SDKs /

SDKs

Official client libraries and SDKs for iOS, Android, and Web platforms. Native integrations with comprehensive examples.

JavaScript / TypeScript

v2.1.0
GitHub →

Full-featured SDK for Node.js and browser environments. Supports all FreshCredit APIs with type definitions.

Install
npm install @freshcredit/sdk
Example
import { 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.1
GitHub →

Native Swift SDK for iOS apps. Full support for BlockID™ identity verification and wallet management.

Install
pod 'FreshCredit'
Example
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.0
GitHub →

Native Kotlin SDK for Android. Comprehensive API coverage with coroutine support.

Install
implementation 'com.freshcredit:sdk:2.1.0'
Example
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.3
GitHub →

Python SDK for backend integrations and data science workflows. Async support with aiohttp.

Install
pip install freshcredit
Example
from 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.0
GitHub →

Go SDK for high-performance backend services. Full context support for cancellation and timeouts.

Install
go get github.com/freshcredit/go-sdk
Example
package 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.0
GitHub →

Rust SDK for systems programming and WebAssembly. Memory-safe implementation matching our core infrastructure.

Install
cargo add freshcredit
Example
use freshcredit::Client;

#[tokio::main]
async fn main() &rarr; 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(())
}
SDK Features /

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.