Developer Docs
Integrate in hours, not days
Karma3 provides a REST API, JavaScript browser SDK, and four server-side libraries. Most teams go from first API call to production in under two business days.
4
server SDKs
Node, Python, Go, Ruby
2 days
typical integration
for most backend teams
99.4%
API uptime target
included in Scale plan agreements
SDK Reference
Score a user session in any server environment
The server SDK wraps the REST API for score requests. Use the same pattern in any of the four supported languages.
Node.js
const karma3 = require('@karma3/node');
const { Karma3Client } = karma3;
const client = new Karma3Client({
apiKey: process.env.K3_API_KEY
});
const result = await client.score({
userId: req.user.id,
sessionId: req.sessionId,
event: 'checkout'
});
console.log(result.trust_score);
console.log(result.verdict);
Python
from karma3 import Karma3Client
client = Karma3Client(
api_key=os.environ["K3_API_KEY"]
)
result = client.score(
user_id=user.id,
session_id=session_id,
event="checkout"
)
print(result.trust_score, result.verdict)
Go
apiKey := os.Getenv("K3_API_KEY")
client := karma3.NewClient(apiKey)
req := &karma3.ScoreRequest{
UserID: userID,
SessionID: sessionID,
Event: "checkout",
}
result, err := client.Score(ctx, req)
fmt.Println(
result.TrustScore,
result.Verdict,
)
Ruby
client = Karma3::Client.new(
api_key: ENV['K3_API_KEY']
)
result = client.score(
user_id: current_user.id,
session_id: session_id,
event: 'checkout'
)
puts result.trust_score, result.verdict
Platform Compatibility
Works with your existing backend stack
Karma3 integrates alongside the platforms your team already uses for payments, auth, and commerce.
Payments and Commerce
Stripe
Braintree
Shopify Plus
WooCommerce
Magento
Adyen
Auth and Identity
Auth0
Okta
AWS Cognito
Firebase Auth
Supabase Auth
Clerk
Data and Observability
Segment
Mixpanel
Snowflake
BigQuery
Notifications and Ops
PagerDuty
Slack
SendGrid
Custom Webhooks
Get Started
Request your API key
Early-access API keys are available to qualified teams. Request one in the demo call and your key will be ready within 24 hours of onboarding.