Embedded SDKs
Official SDKs keep server credentials separate from client access. Use each package's release notes for current versions and installation commands.
| Platform | App backend | Client self-service | Data API | Token interface |
|---|---|---|---|---|
| TypeScript | ServerClient | EmbeddedClient | GatewayClient | TokenProvider |
| Swift | CreditPlatformServerClient | CreditPlatformEmbeddedClient | CreditPlatformGatewayClient | CreditPlatformTokenStore |
| Kotlin | CreditPlatformServerClient | CreditPlatformEmbeddedClient | CreditPlatformGatewayClient | TokenStore |
TypeScript
ts
const embedded = new EmbeddedClient({
baseUrl,
applicationCode: 'my_app',
tokenProvider,
})
const wallet = await embedded.getWallet()Bundle ServerClient only into a trusted App backend. Browser and shared frontend packages use only a caller-provided TokenProvider.
Swift
swift
let client = try CreditPlatformEmbeddedClient(
baseURL: baseURL,
applicationCode: "my_app",
tokenStore: keychainTokenStore
)
let wallet = try await client.getWallet()Back CreditPlatformTokenStore with Keychain on iOS. Never ship an AppClient secret in the app bundle.
Kotlin
kotlin
val client = CreditPlatformEmbeddedClient(
baseUrl,
"my_app",
keystoreBackedTokenStore
)
val wallet = client.getWallet()Back TokenStore with Android Keystore. On every platform, bind the Application code during client construction; business callers must not supply another Application or user ID per request.
SDK errors should contain only an HTTP status and safe error code. Do not append full responses, request bodies, or credentials in wrappers.