Partner API Reference
Integrate UCrypto Space Dollars into your platform. Four endpoints. Bearer-token auth. Production-ready.
Overview
The UCrypto Partner API lets external platforms credit Space Dollars (SD) to UCrypto users and trigger SD→UCrypto conversions. Designed for play-to-earn games, apps, and marketplaces that want to reward users with real crypto.
Base URL: https://ucrypto.ai/api/partner
Quick-start checklist
Authentication
All partner endpoints require a Bearer token in the Authorization header. Your key is issued at application approval and hashed server-side — UCrypto never stores the plaintext.
Authorization: Bearer ucpk_<your_key_here>Keys can be scoped to a specific origin via allowedOrigin. Contact support to enable origin locking. Revoked or disabled keys return 401 Invalid or inactive API key.
Endpoints
GET /api/partner/rate
Returns the current live SD→UCrypto exchange rate and supply statistics.
GET https://ucrypto.ai/api/partner/rate// 200 OK
{
"sdPerUcrypto": 1250.00,
"circulatingSupply": 1200,
"totalFloat": 100000,
"floatRemaining": 98800,
"supplyPct": 1.20,
"earlyAdopterActive": true,
"scarcityFactor": 1.006,
"timestamp": "2026-09-20T21:00:00.000Z"
}POST /api/partner/user/lookup
Look up a UCrypto user by email. Returns the userId needed for deposit and convert calls.
POST https://ucrypto.ai/api/partner/user/lookup// Request
{ "email": "[email protected]" }
// 200 OK
{ "userId": "abc123-...", "name": "Jane Smith", "ucryptoBalance": 0.05, "spaceDollarsBalance": 1500 }
// 404
{ "error": "User not found" }POST /api/partner/sd-deposit
Credit Space Dollars to a user's wallet when they earn SD on your platform.
POST https://ucrypto.ai/api/partner/sd-deposit// Request
{ "userId": "abc123-...", "amount": 500, "sourcePlatform": "intellislots", "externalRef": "event-789" }
// 200 OK
{ "ok": true, "credited": 500, "newSpaceDollarsBalance": 2000 }POST /api/partner/convert
Convert Space Dollars → UCrypto at the live rate. User must have sufficient SD balance.
POST https://ucrypto.ai/api/partner/convert// Request
{ "userId": "abc123-...", "spaceDollarsAmount": 1000, "sourcePlatform": "intellislots" }
// 200 OK
{ "ok": true, "ucryptoReceived": 0.8, "rateApplied": 1250.00, "newUcryptoBalance": 0.85, "newSpaceDollarsBalance": 1000, "transactionId": 42, "earlyAdopterBonus": true }
// 400
{ "error": "Insufficient Space Dollars balance", "balance": 500, "required": 1000 }Code Samples
// JavaScript / Node.js — full integration flow
const BASE = 'https://ucrypto.ai/api/partner';
const headers = { 'Authorization': 'Bearer ucpk_your_key', 'Content-Type': 'application/json' };
const { sdPerUcrypto } = await fetch(`${BASE}/rate`, { headers }).then(r => r.json());
const { userId } = await fetch(`${BASE}/user/lookup`, {
method: 'POST', headers, body: JSON.stringify({ email: '[email protected]' })
}).then(r => r.json());
await fetch(`${BASE}/sd-deposit`, {
method: 'POST', headers, body: JSON.stringify({ userId, amount: 500, sourcePlatform: 'my-platform' })
});
const result = await fetch(`${BASE}/convert`, {
method: 'POST', headers, body: JSON.stringify({ userId, spaceDollarsAmount: 500, sourcePlatform: 'my-platform' })
}).then(r => r.json());
console.log('UCrypto received:', result.ucryptoReceived);# Python 3 — full integration flow
import requests
BASE = 'https://ucrypto.ai/api/partner'
H = { 'Authorization': 'Bearer ucpk_your_key', 'Content-Type': 'application/json' }
rate = requests.get(f'{BASE}/rate', headers=H).json()
user = requests.post(f'{BASE}/user/lookup', headers=H, json={'email': '[email protected]'}).json()
uid = user['userId']
requests.post(f'{BASE}/sd-deposit', headers=H, json={'userId': uid, 'amount': 500, 'sourcePlatform': 'my-platform'})
result = requests.post(f'{BASE}/convert', headers=H, json={'userId': uid, 'spaceDollarsAmount': 500, 'sourcePlatform': 'my-platform'}).json()
print('UCrypto received:', result['ucryptoReceived'])<?php
$base = 'https://ucrypto.ai/api/partner';
$h = ['Authorization: Bearer ucpk_your_key', 'Content-Type: application/json'];
function uc($m, $u, $h, $b = null) {
$c = curl_init($u);
curl_setopt_array($c, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $h]);
if ($m === 'POST') { curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, json_encode($b)); }
$r = curl_exec($c); curl_close($c); return json_decode($r, true);
}
$user = uc('POST', "$base/user/lookup", $h, ['email' => '[email protected]']);
$uid = $user['userId'];
uc('POST', "$base/sd-deposit", $h, ['userId' => $uid, 'amount' => 500, 'sourcePlatform' => 'my-platform']);
$r = uc('POST', "$base/convert", $h, ['userId' => $uid, 'spaceDollarsAmount' => 500, 'sourcePlatform' => 'my-platform']);
echo 'UCrypto received: ' . $r['ucryptoReceived'];Error Reference
| Status | Error | Meaning |
|---|---|---|
| 401 | Invalid or inactive API key | Key not found, revoked, or disabled |
| 400 | userId is required | Missing required body field |
| 400 | amount must be > 0 | Invalid amount value |
| 400 | Insufficient Space Dollars balance | User does not have enough SD |
| 400 | Insufficient float remaining | UCrypto supply exhausted |
| 404 | User not found | No UCrypto account for that email |
| 503 | Exchange rate not configured | Admin has not seeded exchange settings yet |
| 451 | Service not available in your region | Geo-blocked region (CA) |
Partner Agreement
UCrypto.ai Partner API Agreement — Last updated September 2026
1. Acceptance
By submitting a partner application and using the UCrypto Partner API, you ("Partner") agree to be bound by this Agreement. If you are acting on behalf of a company, you represent that you have authority to bind that company.
2. Permitted Use
Partner may use the API solely to (a) credit Space Dollars to UCrypto users who have earned them through legitimate activity on Partner's platform, and (b) trigger SD→UCrypto conversions on behalf of those users. Any other use requires prior written consent from UCrypto.ai.
3. Prohibited Use
Partner must not: (a) use the API to fabricate, inflate, or manipulate Space Dollar balances; (b) use the API for money laundering, fraud, or any illegal activity; (c) share API keys with third parties; (d) reverse-engineer or attempt to circumvent rate limits or security controls; (e) use the API in jurisdictions where doing so would violate applicable law.
4. API Key Security
Partner is responsible for keeping API keys confidential. Keys must be stored server-side and never exposed in client-side code, public repositories, or logs. UCrypto.ai will revoke keys that appear to be compromised. Partner must notify [email protected] immediately upon suspected key compromise.
5. Rate Limits & Fair Use
UCrypto.ai reserves the right to impose rate limits on any partner key. Excessive or abusive API usage may result in key suspension. Partners experiencing legitimate high-volume needs should contact support to arrange appropriate limits.
6. Data & Privacy
Partner must not collect, store, or process UCrypto user data beyond what is strictly necessary for the integration. Partner must maintain a privacy policy that discloses the use of UCrypto services and complies with applicable privacy law (GDPR, CCPA, PIPEDA, etc.).
7. Compliance
Partner is solely responsible for ensuring its platform and use of the API complies with all applicable laws, including but not limited to gaming regulations, financial services regulations, anti-money-laundering (AML) requirements, and know-your-customer (KYC) obligations in its jurisdiction.
8. Geo-Restrictions
UCrypto.ai currently restricts service to users in Canada. Partner must not use the API to service Canadian users or users in any other jurisdiction where UCrypto.ai has indicated a restriction.
9. Termination
Either party may terminate this Agreement at any time. UCrypto.ai may immediately revoke API access for breach of this Agreement. Upon termination, Partner must cease all API usage and delete any cached UCrypto user data.
10. Disclaimer & Limitation of Liability
The API is provided "as is" without warranty of any kind. UCrypto.ai is not liable for any indirect, incidental, or consequential damages arising from Partner's use of the API. UCrypto.ai's total liability to Partner shall not exceed USD $100.
11. Changes
UCrypto.ai may update this Agreement at any time. Continued use of the API after notice of changes constitutes acceptance. Material changes will be communicated to the contact email on file.
12. Contact
Questions about this Agreement: [email protected]