VPN API

VPN API for resellers

The ResellPortal VPN API lets you sell a VPN under your own brand, from your own app or website. Create a VPN account with one call, list 80+ server locations, and fetch a ready-to-use WireGuard or OpenVPN config to embed in your own app. There is no monthly platform fee: each VPN subscription is charged at wholesale from your wallet.

BASE=https://panel.resellportal.com/wp-json/resellportal/v1

# 1. Create the VPN account
curl -X POST "$BASE/orders" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -H "Content-Type: application/json" \
  -d '{"client_id": 123,
       "product_key": "vpn",
       "billing_cycle": "monthly"}'

# 2. Get a WireGuard config
curl "$BASE/vpn/config?service_id=597&server_id=135" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
const BASE = "https://panel.resellportal.com/wp-json/resellportal/v1";
const headers = {
  "X-API-Key": "your_api_key",
  "X-API-Secret": "your_api_secret",
  "Content-Type": "application/json",
};
const api = (path, body) => fetch(BASE + path, {
  method: body ? "POST" : "GET",
  headers,
  body: body && JSON.stringify(body),
}).then((r) => r.json());

// 1. Create the VPN account
const order = await api("/orders", {
  client_id: 123,
  product_key: "vpn",
  billing_cycle: "monthly",
});

// 2. Get a WireGuard config
const config = await api("/vpn/config?service_id=597&server_id=135");
import requests

BASE = "https://panel.resellportal.com/wp-json/resellportal/v1"
HEADERS = {
    "X-API-Key": "your_api_key",
    "X-API-Secret": "your_api_secret",
}

# 1. Create the VPN account
order = requests.post(f"{BASE}/orders", headers=HEADERS, json={
    "client_id": 123,
    "product_key": "vpn",
    "billing_cycle": "monthly",
}).json()

# 2. Get a WireGuard config
config = requests.get(
    f"{BASE}/vpn/config",
    params={"service_id": "597", "server_id": "135"},
    headers=HEADERS,
).json()
80+Server locations
2Protocols: WireGuard & OpenVPN
7App platforms
$0Monthly platform fee
How it works

From API key to connected customer in three steps

1

Create the account

Call POST /orders with product_key "vpn" and a billing cycle (monthly, quarterly, biannual or annual). You get the VPN username and password back straight away.

2

Pick a server

Call GET /vpn/servers for the list of locations, and GET /vpn/ports if you use OpenVPN.

3

Connect

Call GET /vpn/config to get a WireGuard or OpenVPN config for that server and embed it in your own app, or let your customer use the ready-made apps.

Endpoints

The endpoints you will use

Base URL https://panel.resellportal.com/wp-json/resellportal/v1. Authenticate every request with your X-API-Key and X-API-Secret headers.

POST/orders

Create a VPN account: product_key "vpn", billing_cycle, and an optional custom vpn_username. Returns the login details.

GET/vpn/servers

List every VPN server location with its id, city and country code.

GET/vpn/ports

List the available OpenVPN ports and protocols.

GET/vpn/config

Get a WireGuard (default) or OpenVPN config for an active VPN service and server.

Billing

How billing works

  • No setup fee and no monthly fee. You only pay when you place an order.
  • Wholesale per order. Each order is charged at wholesale from your prepaid wallet, and you set your own selling price.
  • Live prices. Current prices are returned by the API and shown in your panel, so your app always uses the latest price.
  • Volume discounts. Larger wallet balances get a discount on every order.
Response

What you get back

A successful order returns everything you need to deliver it in your own interface.

ResponsePOST /orders · 200
{
  "success": true,
  "service_id": 597,
  "message": "VPN Service activated successfully",
  "billing_cycle": "monthly",
  "vpn_credentials": {
    "username": "johndoe123",
    "password": "generatedPass"
  }
}
Why ResellPortal

Built for resellers, not just developers

Sold under your brand

Customer emails and the VPN management page carry your store name, not ours.

Free test mode

Send "test_mode": true (or the X-RP-Test-Mode: 1 header) to build and test your integration without charging your wallet.

WireGuard and OpenVPN

Fetch configs in either protocol. One VPN account works across every server, so switching location is just a different server_id.

Use your own app or ours

Embed the configs in your own app, or point customers to ready-made apps for 7 platforms.

Works with AI assistants

Connect Claude, ChatGPT or Cursor to the ResellPortal MCP server to create VPN accounts by chat.

A ready-made store too

Every account also gets a white-label storefront, so you can sell VPN without building anything.

FAQ

VPN API questions

What is a VPN API?

A VPN API lets your software create VPN accounts and connection configs automatically, so you can offer a VPN inside your own app or service. With the ResellPortal VPN API you create an account with POST /orders and fetch WireGuard or OpenVPN configs with GET /vpn/config.

Can I put the VPN inside my own app?

Yes. GET /vpn/config returns a full WireGuard or OpenVPN config file that you can embed in your own Android, iOS or desktop app. The same VPN account works on every server, so your app only needs to change the server_id.

How many server locations are there?

More than 80 server locations. GET /vpn/servers returns the current list with the city and country for each server.

How much does the VPN API cost?

There is no setup or monthly platform fee. Each VPN subscription you create is charged at wholesale from your prepaid wallet for the billing cycle you choose, and you set your own selling price.

Which billing cycles can I sell?

Monthly, quarterly, biannual and annual. Pass billing_cycle in the POST /orders request.

Can I test the VPN API without being charged?

Yes. Add "test_mode": true to the request body, or send the header X-RP-Test-Mode: 1. Test requests are validated but nothing is charged and no VPN account is created.

What do I need to start using the VPN API?

Create a free ResellPortal account and copy your API key and secret from the API section of the panel. No minimum balance. A live order only needs enough in your wallet to cover it.

Launch your own VPN brand

Free account, free test mode, no monthly platform fee. Get your API keys and create your first VPN account in minutes.