1. ⚡ Purchase
TunnelSats Public Wireguard API
  • Announcements
    • 👋 About our team
    • 💫 What is TunnelSats?
    • 🚀 Introducing the TunnelSats Public API v1
    • How TunnelSats Leverages Public APIs for Confined VPN Management
  • 📡 Discovery
    • List Available WireGuard Servers & Regions
      GET
  • ⚡ Purchase
    • Create a New WireGuard Subscription (Invoice Generation)
      POST
    • Check Invoice Status & Polling by Payment Hash
      GET
    • Claim WireGuard Configuration After Payment Settlement
      POST
  • 🔄 Lifecycle
    • Get Subscription & Bandwidth Status by WireGuard Public Key
      POST
    • Renew an Existing VPN Subscription (Anonymous)
      POST
    • Sync Subscription (Real-Time Server Refresh)
      POST
    • Request Bandwidth Top-Up ($1 for +100GB)
      POST
  • 🔑 Account
    • List Account Subscriptions (Authenticated)
      GET
  • 🔧 Tools
    • Lightning Node Network Address Discovery
      POST
    • Universal Connectivity & Latency Probe
      POST
  • Cookbook
    • 🛠️ Automation & Code Examples
    • 🐚 Bash One-Liners
    • 🚑 Node Health & Upkeep
    • ⚡ Bandwidth Top-Up ($1 for +100GB)
    • 🛡️ Security & Authentication
    • 🎁 Referral Program: Earn Bonus Months
    • 🛑 Error Codes & Troubleshooting
  • Schemas
    • Server
    • InvoiceOrder
    • SubscriptionStatus
    • NodeLookup
    • ConnectivityResult
    • ApiError
    • ClaimResult
    • BandwidthResetResponse
    • PublicKeyStatusResponse
    • RenewalOrder
    • SubscriptionListItem
    • SyncResult
Tunnelsats Github
Tunnelsats Telegram
  1. ⚡ Purchase

Create a New WireGuard Subscription (Invoice Generation)

POST
https://tunnelsats.com/api/public/v1/subscription/create
Generates a Lightning invoice to purchase a 1, 3, 6, or 12-month WireGuard VPN tunnel in a chosen region. Rate limit: 10 requests/min per IP.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Lightning invoice generated successfully
Bodyapplication/json

🟠400Bad Request
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://tunnelsats.com/api/public/v1/subscription/create' \
--header 'Accept;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data '{
    "serverId": "eu-de",
    "duration": 1,
    "referralCode": null
}'
Response Response Example
200 - Success Example
{
    "invoice": "lnbc41130n1p5a4p2dpp5pwd0d2ua837kz...",
    "paymentHash": "0b9af6ab9d3c7d6146e3f28ca11bf4b830f4cab95330c5a5c9b25b7827afc44c",
    "amountSats": 4113,
    "orderId": "ab897fc4-41ff-4a55-9bb6-0ce1623e7a87"
}
Modified at 2026-09-02 16:36:08
Previous
List Available WireGuard Servers & Regions
Next
Check Invoice Status & Polling by Payment Hash
Built with