Cloudflare Worker-based license server for CX Linux with referral program.
- License validation and activation
- Device limit enforcement
- Stripe webhook integration for automatic provisioning
- Hardware ID fingerprinting
- Referral program (10% commission)
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/api/v1/licenses/validate |
POST | Validate license key |
/api/v1/licenses/activate |
POST | Activate device |
/api/v1/licenses/deactivate |
POST | Deactivate device |
/api/v1/licenses/status |
GET | Get license status |
/webhooks/stripe |
POST | Stripe webhook handler |
/admin/create-license |
POST | Create license (admin) |
| Endpoint | Method | Description |
|---|---|---|
/api/v1/referrals/register |
POST | Register as referrer |
/api/v1/referrals/stats |
GET | Get referral stats |
/admin/referrals/pending |
GET | List pending payouts (admin) |
/admin/referrals/mark-paid |
POST | Mark referral as paid (admin) |
- Register: Call
/api/v1/referrals/registerwith email to get a referral code - Share: Share link
https://cxlinux.com/?ref=YOUR_CODE - Earn: Get 10% commission on every purchase made through your link
- Payout: Monthly payouts via PayPal
curl -X POST https://license.cxlinux.com/api/v1/referrals/register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "name": "Your Name"}'Response:
{
"success": true,
"referral_code": "YOU-ABC123",
"referral_link": "https://cxlinux.com/?ref=YOU-ABC123",
"commission_rate": "10%"
}curl "https://license.cxlinux.com/api/v1/referrals/stats?code=YOU-ABC123"| Product | Price | Commission (10%) |
|---|---|---|
| CX Core+ Monthly | $20 | $2 |
| CX Core+ Annual | $200 | $20 |
| CX Pro+ Monthly | $99 | $9.90 |
| CX Pro+ Annual | $990 | $99 |
| CX Enterprise+ Monthly | $299 | $29.90 |
| CX Enterprise+ Annual | $2990 | $299 |
npm install -g wrangler
wrangler deploySTRIPE_WEBHOOK_SECRET- Stripe webhook signing secretADMIN_API_KEY- Admin API key for/admin/*endpoints
Uses Cloudflare D1 (SQLite). Run schema.sql to set up tables.
BSL 1.1