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

Claim WireGuard Configuration After Payment Settlement

POST
/api/public/v1/subscription/claim
Provisions or retrieves the WireGuard configuration file once the Lightning invoice payment has settled.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
WireGuard configuration claimed successfully
Bodyapplication/json

🟠400Bad Request
🟠402
🟠404Record Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://tunnelsats.com/api/public/v1/subscription/claim' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--data '{
    "paymentHash": "a1b2c3d4e5f6...",
    "wgPublicKey": "pWyZTQx8C4gzzgMVJHiN1ptI46wDtyJSMRa+wxtkXOM=",
    "wgPresharedKey": "string",
    "referralCode": "string"
}'
Response Response Example
200 - Example 1
{
    "config": "[Interface]\nPrivateKey = ...\nAddress = 10.9.0.5/32\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = ...\nEndpoint = us3.tunnelsats.com:51820\nAllowedIPs = 0.0.0.0/0",
    "fullConfig": "string",
    "publicKey": "pWyZTQx8C4gzzgMVJHiN1ptI46wDtyJSMRa+wxtkXOM=",
    "vpnIp": "10.9.0.5"
}
Modified at 2026-08-31 19:53:35
Previous
Create a New WireGuard Subscription (Invoice Generation)
Next
Check subscription status via payment hash
Built with