← Home

📡 API Documentation

VisoChain REST API Reference

Base URL: https://api.visochain.com
🔐 Authentication
POST /api/auth/login Login with wallet address
Request Body
ParameterTypeRequiredDescription
addressstringYesWallet address (0x...)
Example
{ "address": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1" }
200 OK 400 Invalid Address
POST /api/auth/verify Verify auth token
Request Body
ParameterTypeRequiredDescription
tokenstringYesAuth token from login
200 OK 401 Invalid Token
POST /api/auth/logout Logout and invalidate token
Request Body
ParameterTypeRequiredDescription
tokenstringYesAuth token
200 OK
📊 Data Registration
POST /api/data/register API Key Register data fingerprint
Headers
HeaderValue
X-API-KeyYour partner API key
Request Body
ParameterTypeRequiredDescription
fingerprintstringYesData hash (min 10 chars)
contributorstringYesContributor wallet address
Example
{ "fingerprint": "img_abc123hash456", "contributor": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1" }
200 OK 401 Invalid API Key 409 Duplicate
GET /api/data/check/:fingerprint Check if data exists
URL Parameters
ParameterTypeDescription
fingerprintstringData fingerprint to check
Example Response
{ "exists": true, "asset": { "contributor": "0x90f8...", "source": "TestPlatform", "timestamp": "2025-11-25T...", "reward": "100 VCDT" } }
200 OK
GET /api/data/contributor/:address Get contributor stats
URL Parameters
ParameterTypeDescription
addressstringWallet address
200 OK 400 Invalid Address
💳 Payment Gateway
POST /api/payment/create API Key Create payment request
Headers
HeaderValue
X-API-KeyYour payment API key
Request Body
ParameterTypeRequiredDescription
amountnumberYesAmount in VCDT
descriptionstringNoPayment description
orderIdstringNoYour order ID
callbackUrlstringNoSuccess callback URL
cancelUrlstringNoCancel redirect URL
Example Response
{ "success": true, "paymentId": "abc123...", "payUrl": "https://visochain.com/pay.html?id=abc123", "amount": 100, "expiresAt": "2025-11-25T..." }
200 OK 401 Invalid API Key
GET /api/payment/:id Get payment status
URL Parameters
ParameterTypeDescription
idstringPayment ID
200 OK 404 Not Found
POST /api/payment/confirm Confirm payment (internal)
Request Body
ParameterTypeRequiredDescription
paymentIdstringYesPayment ID
txHashstringYesTransaction hash
payerstringYesPayer wallet address
200 OK 404 Not Found
POST /api/payment/verify API Key Verify payment status
Request Body
ParameterTypeRequiredDescription
paymentIdstringYesPayment ID to verify
200 OK 404 Not Found
GET /api/payment/list API Key List your payments
Headers
HeaderValue
X-API-KeyYour payment API key
200 OK 401 Invalid API Key
📈 Network
GET /api/stats Network statistics
Example Response
{ "network": { "name": "VisoChain", "chainId": 2025, "peers": 4, "blockNumber": 12345 }, "token": { "name": "VCDT", "totalSupply": "2000200 VCDT" }, "dataRegistry": { "totalAssets": "150", "currentRewardPerAsset": "100 VCDT" } }
200 OK
GET /api/user/:address User information
URL Parameters
ParameterTypeDescription
addressstringWallet address
200 OK 400 Invalid Address
GET /api/health Health check
Example Response
{ "status": "ok", "blockNumber": 12345, "timestamp": "2025-11-25T..." }
200 OK 500 Error