STAMPT API Reference
Bank-verified identity infrastructure. Verify humans, gate by age, score trust — all through one API. Replace CAPTCHAs, KYC checkboxes, and fake accounts with real identity.
Authentication
All API requests are made to:
https://api.stampt.tech
Authenticate using your API key in the request header:
Authorization: Bearer sk_live_your_secret_key Content-Type: application/json
pk_live_ keys client-side (JavaScript embed). Use sk_live_ keys server-side only — never expose secret keys in frontend code.API Keys
| Key Type | Prefix | Usage |
|---|---|---|
| Publishable | pk_live_ | Client-side JavaScript embed. Safe to expose in frontend code. |
| Publishable Test | pk_test_ | Client-side sandbox. Returns mock verification results. |
| Secret | sk_live_ | Server-side API calls. Never expose in frontend code. |
| Secret Test | sk_test_ | Server-side sandbox. No real Plaid calls, returns mock data. |
Test Mode Live
Use test mode to integrate without real bank connections. All test mode requests use pk_test_ or sk_test_ keys and return deterministic mock responses.
Test Mode Behavior
| Endpoint | Behavior | Response |
|---|---|---|
| /api/plaid/link-token | string | Returns a mock link_token (skips Plaid) |
| /api/plaid/exchange | string | Returns mock STAMPT ID + gem_tier based on test email |
| /api/verify/age-gate | string | Returns meets_age_requirement: true |
| /api/verify/trust-score | string | Returns score: 85, tier: "emerald" |
Test Emails → GEM Tiers
Use these emails in test mode to trigger specific GEM tiers:
// Test mode email → tier mapping amber@test.stampt.tech → Amber (score: 25) ruby@test.stampt.tech → Ruby (score: 45) emerald@test.stampt.tech → Emerald (score: 72) diamond@test.stampt.tech → Diamond (score: 95) any-other@example.com → Topaz (score: 55)
Quickstart
Add bank-verified identity to your site in three lines of code.
<!-- 1. Add the SDK --> <script src="https://stampted.com/stampt-verify.js"></script> <!-- 2. Add a container --> <div id="verify"></div> <!-- 3. Initialize --> <script> const stampt = StamptVerify.init({ publishableKey: 'pk_test_your_key' }); stampt.mount('#verify'); stampt.on('verified', (result) => { console.log(result.stamptId); // STMPT-I-XXXXXXXX console.log(result.gemTier); // emerald console.log(result.token); // verification token }); </script>
Server-Side Validation
Always validate the verification token server-side before trusting it.
const response = await fetch('https://api.stampt.tech/api/sso/userinfo', { headers: { 'Authorization': `Bearer ${token}` } }); const user = await response.json(); // { stampt_id, gem_tier, verified: true }
Create Link Token Live
Creates a Plaid Link token to initiate the bank verification flow. Used internally by the JavaScript SDK — you typically don't call this directly unless building a custom integration.
| Parameter | Type | Description |
|---|---|---|
| userIdrequired | string | Unique identifier for the user session |
| userEmailrequired | string | User's email address |
{
"success": true,
"link_token": "link-production-a9a8317a-...",
"expiration": "2026-08-08T02:24:47Z"
}
Exchange Token Live
Exchanges a Plaid public token for a STAMPT verification. Creates the user's STAMPT ID, determines their GEM tier, and stores their verified identity.
| Parameter | Type | Description |
|---|---|---|
| public_tokenrequired | string | Plaid public token from Link success callback |
| userIdrequired | string | User session identifier |
| emailrequired | string | User's email address |
{
"success": true,
"stampt_id": "STMPT-I-A7K3M9X2",
"gem_tier": "emerald",
"total_liquidity": 350000,
"verified_at": "2026-08-07T19:30:00Z"
}
User Info Live
Returns the verified user's identity information. Use this to validate a verification token server-side.
{
"stampt_id": "STMPT-I-A7K3M9X2",
"gem_tier": "emerald",
"verified": true,
"verified_at": "2026-08-07T19:30:00Z"
}
Age Gate Live
Verifies whether a STAMPT-verified user meets a minimum age requirement. Returns pass/fail only — never exposes the user's date of birth. Designed for legal compliance in alcohol, cannabis, gambling, and age-restricted industries.
| Parameter | Type | Description |
|---|---|---|
| stampt_idrequired | string | User's STAMPT ID |
| min_age | integer | Minimum age requirement. Default: 21 |
{
"success": true,
"verified": true,
"meets_age_requirement": true,
"min_age": 21,
"stampt_id": "STMPT-I-A7K3M9X2"
}
Trust Score Beta
Returns a 1–100 trust score for a verified user, derived from their GEM tier, account age, and verification history. Use it to make real-time decisions: "Should I approve this $5,000 transaction? Should I trust this marketplace seller?"
| Parameter | Type | Description |
|---|---|---|
| stampt_idrequired | string | User's STAMPT ID |
{
"success": true,
"stampt_id": "STMPT-I-A7K3M9X2",
"score": 78,
"tier": "emerald",
"risk_level": "low",
"verified": true
}
SSO / OAuth 2.0 Live
Full OAuth 2.0 authorization code flow for enterprise partners who want STAMPT as their identity provider.
Initiates the OAuth 2.0 authorization flow. Redirect users here to begin SSO authentication.
| Parameter | Type | Description |
|---|---|---|
| client_idrequired | string | Your OAuth client ID |
| redirect_urirequired | string | Callback URL for your application |
| response_type | string | Must be "code" |
| scope | string | Requested scopes: identity, gem_tier, age_gate |
| state | string | CSRF protection token |
Exchanges an authorization code for an access token.
| Parameter | Type | Description |
|---|---|---|
| grant_typerequired | string | Must be "authorization_code" |
| coderequired | string | Authorization code from callback |
| client_idrequired | string | Your OAuth client ID |
| client_secretrequired | string | Your OAuth client secret |
Returns the authenticated user's verified identity. Requires a valid access token.
Webhooks Live
STAMPT sends webhook events to your registered URL when verification events occur. Configure your webhook URL in the partner dashboard at partner.stampt.tech.
Events
| Event | Description | Trigger |
|---|---|---|
| verification.completed | string | User successfully verified their identity |
| verification.failed | string | Verification attempt failed |
| age_gate.passed | string | User passed age verification |
| age_gate.failed | string | User did not meet age requirement |
Webhook Payload
{
"event": "verification.completed",
"data": {
"stampt_id": "STMPT-I-A7K3M9X2",
"gem_tier": "emerald",
"verified_at": "2026-08-07T19:30:00Z",
"client_id": "GRATON-EVOTLX"
},
"timestamp": "2026-08-07T19:30:01Z"
}
Signature Verification
Each webhook includes a X-STAMPT-Signature header containing an HMAC-SHA256 signature. Verify it against your webhook secret to ensure authenticity.
const crypto = require('crypto'); const sig = req.headers['x-stampt-signature']; const expected = crypto .createHmac('sha256', process.env.WEBHOOK_SECRET) .update(JSON.stringify(req.body)) .digest('hex'); if (sig !== expected) { return res.status(401).json({ error: 'Invalid signature' }); }
JavaScript Embed SDK
The fastest way to add STAMPT Verify to any website. One script tag, three lines of code.
API Reference
| Method | Returns | Description |
|---|---|---|
| StamptVerify.init(config) | instance | Initialize with { publishableKey, theme, label } |
| .mount(selector) | instance | Mount verify button into a DOM element |
| .on(event, handler) | instance | Listen: 'verified', 'error', 'cancel' |
| .verify() | Promise | Programmatically trigger verification (headless) |
| .destroy() | void | Remove button and clean up listeners |
Verified Result Object
{
"token": "STMPT-I-A7K3M9X2", // validate server-side
"stamptId": "STMPT-I-A7K3M9X2", // user's STAMPT ID
"gemTier": "emerald", // financial trust tier
"verified": true
}
WordPress Plugin
Install from the WordPress Plugin Directory. Search "STAMPT Verify" or upload the plugin zip manually.
Settings → STAMPT Verify → paste your publishable key → choose where to show the button (login, registration, comments, WooCommerce checkout, or anywhere via [stampt_verify] shortcode).
Shopify App
Install from the Shopify App Store. The STAMPT Verify app adds a verification button to your checkout flow. Configure placement (checkout, account creation, or both) and age gate settings from the app dashboard.
Error Codes
| Code | HTTP | Description |
|---|---|---|
| invalid_key | 401 | Invalid or missing API key |
| invalid_token | 401 | Verification token is invalid or expired |
| user_not_found | 404 | STAMPT ID does not exist |
| user_not_verified | 400 | User exists but has not completed verification |
| age_data_unavailable | 400 | User verified but DOB not captured — needs re-verification |
| rate_limited | 429 | Too many requests — retry after the period in Retry-After header |
| token_already_used | 400 | Plaid public token has already been exchanged (replay prevention) |
| server_error | 500 | Internal error — retry or contact support |
Rate Limits
| Endpoint Group | Limit | Window |
|---|---|---|
| /api/plaid/* | 10 requests | 15 minutes |
| /api/verify/* | 100 requests | 15 minutes |
| /api/sso/* | 100 requests | 15 minutes |
| All other /api/* | 100 requests | 15 minutes |
Rate limit status is returned in response headers: X-RateLimit-Remaining, X-RateLimit-Reset.
GEM Tiers
Every verified user is assigned a GEM tier based on their total bank liquidity. Tiers enable risk-aware decisions without exposing exact financial data.
| Tier | Liquidity Range | Trust Score Range |
|---|---|---|
| amber | string | $1 – $25,000 1–20 |
| topaz | string | $25K – $100K 21–40 |
| ruby | string | $100K – $250K 41–55 |
| emerald | string | $250K – $1M 56–72 |
| sapphire | string | $1M – $10M 73–85 |
| diamond | string | $10M – $50M 86–92 |
| onyx | string | $50M – $100M 93–96 |
| royal | string | $100M – $1B 97–99 |
| crown | string | $1B+ 100 |