# 💫 What is TunnelSats?

TunnelSats provides **pre-configured WireGuard VPN tunnels** designed for **Lightning Network nodes**. It hides your node's IP, enables safe clearnet routing, and requires no KYC – just pay with Lightning.

This API enables developers to:
* **Programmatically provision VPN subscriptions** for node operators.
* **Integrate VPN management** into node management software (Umbrel, Start9, etc.).
* **Automate renewals** for uninterrupted privacy.

---

## 🚀 API Capabilities

### ⚡ Purchase Flow (No Auth Required)
* **List available VPN servers** (US, EU, Asia, Australia)
* **Create subscription** → Lightning invoice
* **Claim WireGuard config** after payment
* **Renew** existing subscriptions

### 🔐 Account Management (API Key Required)
* **List linked subscriptions**
* **Sync real-time bandwidth/expiry** from VPN servers
* **Manage referral codes** & earn bonus months

---

## ⚡ Quick Start

<Steps>
  <Step title="First Step">
    `GET /servers`         → Pick a region
  </Step>
  <Step title="Second Step">
    `POST /create`         → Get Lightning invoice
  </Step>
  <Step title="Third Step">
    `Pay the invoice`      → Any Lightning wallet
  </Step>
  <Step title="Fourth Step">
    `POST /claim`          → Receive WireGuard config
  </Step>
</Steps>


> **That's it – 4 API calls to private VPN!** 🎉

---

## 🔐 Authentication

| Endpoint Type | Auth Required? | Method |
| --- | --- | --- |
| **Purchase flow** | ❌ No | **None** – completely anonymous |
| **Account endpoints** | ✅ Yes | `Authorization: Bearer sk_live_...` |

**How to authenticate:**

1. **Get your API Key:** Log in → Dashboard → Settings → Generate API Key
2. **Alternative:** NIP-98 Nostr-signed events (for Nostr-native apps)

---

## 💰 Pricing

| Duration | Price | Discount |
| --- | --- | --- |
| **1 month** | $3.00 | - |
| **3 months** | $8.55 | 5% |
| **6 months** | $16.20 | 10% |
| **12 months** | $28.80 | **20%** |

> *Prices converted to Sats at current BTC/USD rate.*

---

## 🎁 Referral Program

Include `referralCode` in `/create` for bonus months:

| Plan Purchased | Bonus Earned |
| --- | --- |
| **3mo plan** | +1 month free |
| **6mo plan** | +2 months free |
| **12mo plan** | +3 months free |

---

## 🌐 Base URL

* **Production:** `https://tunnelsats.com`
* **API Docs:** [https://api.tunnelsats.com](https://api.tunnelsats.com)