API Reference (Sketch)
Use same structure, just Qwery-branded:
POST https://api.qwery.xyz/v1/<slug>
X-Qwery-Key: QWERY_ck_live_...
X-Qwery-Secret: QWERY_cs_live_...
X-Qwery-Payment: <base64-solana-tx-signature>
Content-Type: application/jsonPOST /api/v1/projects
GET /api/v1/projects/{project_id}/analytics
POST /api/v1/keys/generate
GET /api/v1/spending
GET /api/v1/marketplace
POST /api/v1/webhooks
Plus clear error codes + examples as noted earlier. Base URL: https://facilitator.qwery.xyz
GET / Service information
Response:
{
"service": "Qwery x402 Facilitator",
"version": "1.2.0",
"features": ["Multi-token", "Zero fees", "Token-gated access"],
"endpoints": {
"core": ["/supported", "/discovery", "/health"],
"facilitation": ["/create-payment", "/settle", "/verify"],
"token_gateway": ["/token-gate/check-access", "/token-gate/get-tier"]
}
}GET /health Health check
Response:
{
"status": "healthy",
"version": "1.2.0",
"networks": {
"solana": "active",
"solana-devnet": "active"
},
"facilitation": {
"status": "enabled",
"wallet": "facilitator_wallet_address"
}
}GET /supported List supported networks and tokens
Response:
{
"networks": {
"solana": {
"name": "Solana Mainnet",
"type": "svm",
"tokens": ["SOL", "USDC", "USDT"],
"block_time": "400ms",
"finality": "~1s"
},
"solana-devnet": {
"name": "Solana Devnet",
"type": "svm",
"tokens": ["SOL", "USDC", "USDT"]
}
}
}POST /create-payment Create payment request
Request:
{
"amount": 0.01,
"token": "SOL",
"recipient": "DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK"
}Response:
{
"payment_id": "pay_abc123",
"transaction": {
"from": "facilitator_wallet",
"to": "merchant_wallet",
"amount": 10000000,
"instructions": [
{
"programId": "11111111111111111111111111111111",
"keys": [...],
"data": "..."
}
]
},
"expires_at": 1700000000,
"network": "solana"
}Errors:
400: Invalid amount/token
500: Server error
POST /settle Submit signed transaction for settlement
Request:
{
"payment_id": "pay_abc123",
"signed_transaction": "base64_encoded_signed_transaction"
}Response:
{
"success": true,
"tx_signature": "2ZE7sT9K...",
"block_number": 123456789,
"gas_used": 5000,
"explorer_url": "https://solscan.io/tx/2ZE7sT9K..."
}Errors:
400: Invalid transaction
404: Payment not found
500: Blockchain error
POST /verify Verify payment on blockchain
Request:
{
"tx_signature": "2ZE7sT9K..."
}Response:
{
"verified": true,
"status": "confirmed",
"block_number": 123456789,
"confirmations": 32,
"amount": 0.01,
"token": "SOL",
"from": "user_wallet",
"to": "merchant_wallet"
}GET /wallet-status Check facilitator wallet status
Response:
{
"wallet": "facilitator_wallet_address",
"balances": {
"SOL": 10.5,
"USDC": 1000.0,
"USDT": 500.0
},
"operational": true
}POST /token-gate/check-access Check if wallet has required token balance
Request:
{
"wallet": "user_wallet_address",
"token": "token_mint_address",
"min_balance": 100
}Response:
{
"has_access": true,
"balance": 250,
"min_balance": 100
}GET /token-gate/tiers List all membership tiers
Response:
{
"tiers": [
{
"id": "bronze",
"name": "Bronze",
"min_balance": 100,
"features": ["basic_access"]
},
{
"id": "silver",
"name": "Silver",
"min_balance": 1000,
"features": ["basic_access", "premium_content"]
},
{
"id": "gold",
"name": "Gold",
"min_balance": 5000,
"features": ["basic_access", "premium_content", "api_access"]
}
]
}Last updated