TunnelSats Public Wireguard API
  1. 📢 Public
TunnelSats Public Wireguard API
  • About our team
  • 📢 Public
    • List Servers
      GET
    • Create Subscription
      POST
    • Check Status / Heal
      GET
    • Claim Subscription
      POST
    • Renew Subscription
      POST
    • Get Subscription Status
      POST
  • 🔐 Authenticated
    • List My Subscriptions
      GET
    • Sync Subscription
      POST
    • Create Referral Code
      POST
    • Referral History
      GET
  • Announcements
    • 💫 What is TunnelSats?
    • 🚀 Introducing the TunnelSats Public API v1
  • Cookbook
    • 🛠️ Automation & Code Examples
    • 🐚 Bash One-Liners
    • 🛑 Error Codes & Troubleshooting
    • 🎁 Referral Program: Earn Bonus Months
  • Schemas
    • Server
    • InvoiceOrder
    • SubscriptionStatus
    • WireGuardConfig
    • ReferralCode
    • ReferralHistory
    • NodeLookup
    • ConnectivityResult
  1. 📢 Public

Claim Subscription

POST
/api/public/v1/subscription/claim
Provisions WireGuard config. Call after payment confirmed.
Easy Mode: Omit wgPublicKey - we generate keys.
Advanced: Provide your own wgPublicKey.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://tunnelsats.com/api/public/v1/subscription/claim' \
--header 'Content-Type: application/json' \
--data-raw '{
    "paymentHash": "{{paymentHash}}",
    "wgPublicKey": "",
    "wgPresharedKey": "",
    "referralCode": null
}'
Response Response Example
{
    "success": true,
    "message": "Subscription claimed successfully",
    "subscription": {
        "id": "sub-xyz789",
        "serverId": "eu-de",
        "expiresAt": "2026-02-01T10:30:00.000Z"
    },
    "server": {
        "publicKey": "serverPublicKeyBase64==",
        "endpoint": "de2.tunnelsats.com:51820",
        "allowedIPs": "0.0.0.0/0, ::/0"
    },
    "peer": {
        "address": "10.8.0.42/32",
        "privateKey": "clientPrivateKeyBase64==",
        "presharedKey": "presharedKeyBase64=="
    },
    "fullConfig": "[Interface]\nPrivateKey = clientPrivateKeyBase64==\nAddress = 10.8.0.42/32\n\n[Peer]\nPublicKey = serverPublicKeyBase64==\nPresharedKey = presharedKeyBase64==\nEndpoint = de2.tunnelsats.com:51820\nAllowedIPs = 0.0.0.0/0, ::/0\nPersistentKeepalive = 25"
}
Modified at 2026-02-10 21:55:30
Previous
Check Status / Heal
Next
Renew Subscription
Built with