โ† Back to World Credit

Badge SDK

Embed verified trust scores in websites, iOS, Android, and Flutter apps.

Web
๐Ÿ“ฆ npm
iOS
Swift Package Manager
Android
๐Ÿค– JitPack
Flutter
๐ŸŽฏ pub.dev

Live Demo โ€” Badge Styles

These are real badges fetching live data from the World Credit API.

Inline โ€” next to usernames (dark)

SK
Sarah K. Superhost ยท 47 reviews
AK
Alex K. Top Rated Seller
MR
Morgan R. Verified freelancer
JM
Jamie M. New member
NV
New User No World Credit account

Pill badges

Card badges

Shield badges

Sarah K.
Morgan R.
Alex K.
Jamie M.
New User

Light theme

SK
Sarah K. Superhost ยท 47 reviews
AK
Alex K. Top Rated Seller

Quick Start

Pick your platform. Two minutes to integrate.

<!-- Initialize with your API key -->
<script>
  window.WorldCredit = { apiKey: "your-api-key" };
</script>

<!-- Look up by email (recommended for B2B) -->
<div data-email="user@example.com" data-style="inline"></div>

<!-- Or look up by World Credit handle -->
<div data-worldcredit="handle" data-style="inline"></div>

<!-- Load SDK (before </body>) -->
<script src="https://world-credit.com/sdk/badge.js"></script>

All Styles

<!-- Inline (next to names) -->
<div data-email="user@example.com" data-style="inline"></div>

<!-- Pill (compact capsule) -->
<div data-email="user@example.com" data-style="pill"></div>

<!-- Card (profile sidebar) -->
<div data-email="user@example.com" data-style="card"></div>

<!-- Shield (minimal checkmark) -->
<div data-email="user@example.com" data-style="shield"></div>
// Add to Xcode via Swift Package Manager:
// https://github.com/World-Credit-Inc/worldcredit-sdk

import WorldCreditBadge

// Initialize with your API key (typically in AppDelegate or @main App)
WorldCredit.configure(apiKey: "your-api-key")

// SwiftUI โ€” look up by email (recommended for B2B)
InlineBadge(email: "user@example.com")
PillBadge(email: "user@example.com", theme: .light, size: .sm)
CardBadge(email: "user@example.com")
ShieldBadge(email: "user@example.com")

// Or by World Credit handle
InlineBadge(handle: "handle")

// Programmatic fetch
let data = try await WorldCreditBadge.fetch(handle: "handle", email: "user@example.com")
print(data.worldScore)  // 87
print(data.tier)        // "Platinum"
// build.gradle.kts
implementation("com.worldcredit:badge:1.0.0")

// Initialize with your API key (typically in Application.onCreate)
WorldCredit.configure(apiKey = "your-api-key")

// Jetpack Compose โ€” look up by email (recommended for B2B)
import com.worldcredit.badge.ui.*

InlineBadge(email = "user@example.com")
PillBadge(email = "user@example.com", theme = BadgeTheme.Light, size = BadgeSize.Small)
CardBadge(email = "user@example.com")
ShieldBadge(email = "user@example.com")

// Or by World Credit handle
InlineBadge(handle = "handle")

// Programmatic fetch
val data = WorldCreditBadge.fetch(email = "user@example.com")
println(data.worldScore)  // 87
println(data.tier)        // "Platinum"
# pubspec.yaml
dependencies:
  worldcredit_badge: ^1.2.0

// Initialize with your API key (typically in main())
WorldCreditBadge.configure(apiKey: 'your-api-key');

// Dart โ€” look up by email (recommended for B2B)
import 'package:worldcredit_badge/worldcredit_badge.dart';

WCInlineBadge(email: 'user@example.com')
WCPillBadge(email: 'user@example.com', theme: WCBadgeTheme.light, size: WCBadgeSize.sm)
WCCardBadge(email: 'user@example.com')
WCShieldBadge(email: 'user@example.com')

// Or by World Credit handle
WCInlineBadge(handle: 'handle')

// Programmatic fetch
final data = await WorldCreditBadge.fetch('handle', email: 'user@example.com');
print(data.worldScore);  // 87
print(data.tier);        // "Platinum"

Options

All SDKs support the same badge styles, themes, and sizes.

OptionValuesDefault
styleinline pill card shieldinline
themedark lightdark
sizesm md lgmd

Badge API

All SDKs use the same REST endpoint. You can also call it directly.

GET https://world-credit.com/api/badge?email=user@example.com&key=your-api-key
GET https://world-credit.com/api/badge?handle=handle&key=your-api-key

{
  "ok": true,
  "verified": true,
  "handle": "handle",
  "displayName": "Sarah K.",
  "worldScore": 87,
  "tier": "Platinum",
  "tierColor": "#00FFC8",
  "linkedNetworks": 10,
  "profileUrl": "https://world-credit.com/profile?handle=handle",
  "categories": [
    { "label": "Reliability", "score": 92 },
    { "label": "Financial Integrity", "score": 85 },
    { "label": "Social Proof", "score": 88 }
  ]
}

Unverified Users

When a handle doesn't have a World Credit account, the API returns verified: false instead of a 404. All SDKs automatically render an "unverified" badge state โ€” a grayed-out badge that links to the signup page.

// Response for users without a World Credit account
{
  "ok": true,
  "verified": false,
  "handle": "newuser",
  "worldScore": 0,
  "tier": "Unverified",
  "tierColor": "#4A5568",
  "profileUrl": "https://world-credit.com/signup?ref=embed"
}

Platform integration tip: Use the email parameter to look up users โ€” your platform already knows their email. No need to know their World Credit handle. If they haven't signed up, the SDK renders an unverified badge. Once they do, the badge automatically shows their real score.

Trust Tiers

TierScoreColor
UnverifiedNo account#4A5568
Bronze1 โ€“ 19#CD7F32
Silver20 โ€“ 49#C0C0C0
Gold50 โ€“ 79#FFD700
Platinum80 โ€“ 100#00FFC8

Full source code, examples, and READMEs for every platform:

View Full SDK on GitHub

ยฉ 2026 World Credit Inc. All Rights Reserved.