LUCC Game Integration API
1. Overview
Welcome to the LUCC Game Integration API, your gateway to seamlessly connect your games with the LUCC ecosystem. Our platform empowers game developers to leverage the LUBB token for user rewards, in-game asset settlements, and community engagement.
By integrating with LUCC, your game can:
- Issue LUBB tokens as in-game currency or rewards;
- Enable users to query and redeem their LUBB balances;
- Track transaction history and referral commissions;
- Receive real-time notifications about settlement events;
- Ensure secure and reliable token settlements using blockchain-backed systems.
2. Onboarding & API Access
To start using the LUCC API, please register your game on our Developer Portal to obtain your unique API Key and Secret. This key pair authenticates your requests and links transactions to your game account.
Once approved, you can start calling API endpoints as described below. All API traffic is sent over HTTPS to ensure security and integrity.
3. Authentication
All API requests must include your API-Key
and a Signature
header generated using your secret, to verify the authenticity of each request.
Example headers:
API-Key: your-game-api-key
Signature: HMAC_SHA256(timestamp + method + path + body, your-secret-key)
Timestamp: 1650000000
Content-Type: application/json
The Signature
is computed using HMAC SHA256 over the concatenated request timestamp, HTTP method, request path, and request body, using your secret key.
4. API Endpoints
4.1 User Binding
POST /api/v1/user/bind
Bind your game user ID to a LUCC user account for reward settlement.
{
"game_user_id": "your_internal_user_id",
"lucc_user_id": "lucc_platform_user_id"
}
Response:
{
"status": "success",
"message": "User bound successfully"
}
4.2 Issue LUBB Tokens (Reward Points)
POST /api/v1/rewards/issue
Grant LUBB tokens to a user as game rewards or settlement.
{
"lucc_user_id": "lucc_platform_user_id",
"amount": 1000,
"reason": "Level completion bonus"
}
Response:
{
"status": "success",
"transaction_id": "abc123xyz"
}
4.3 Query User LUBB Balance
GET /api/v1/users/{lucc_user_id}/balance
Retrieve the current LUBB token balance for a user.
Response:
{
"lucc_user_id": "user123",
"balance": 3500
}
4.4 Transaction History
GET /api/v1/users/{lucc_user_id}/transactions?limit=20&offset=0
Fetch paginated transaction history of LUBB token changes.
Response:
{
"transactions": [
{
"transaction_id": "abc123",
"amount": 1000,
"type": "credit",
"timestamp": 1650001234,
"description": "Reward issued for quest completion"
},
...
],
"total": 45
}
4.5 Event Callback Webhook
Register a callback URL to receive asynchronous notifications on settlement events such as token issuance, redemption, or disputes.
POST /api/v1/webhook/register
{
"url": "https://yourgame.com/api/lucc/callback"
}
LUCC will POST event data to your URL in JSON format with signature headers for verification.
5. Security & Best Practices
- Keep your API key and secret confidential.
- Implement IP whitelisting and rate limiting on your server endpoints.
- Validate all callback signatures to prevent spoofing.
- Log all API activity for auditing and troubleshooting.
- Use HTTPS for all communication to protect data in transit.
6. Error Codes & Troubleshooting
400 Bad Request
: Invalid or missing parameters.401 Unauthorized
: Authentication failed (invalid API key/signature).403 Forbidden
: Access denied (IP restriction, permission).429 Too Many Requests
: Rate limit exceeded.500 Internal Server Error
: Temporary server error; retry recommended.
Contact our support if you encounter persistent issues.
7. Developer Support & Contact
Need help integrating LUCC API into your game? Reach out to our developer support team:
- Email: email@lucc.pro