Skip to content

ProxyMarket Vendor Integration: Sell Your Own Proxies

Sell your own proxies or VPN on ProxyMarket (market.xproxy.io). You keep running your servers. ProxyMarket runs the shop, takes the payments and answers customers. A small connector on your side links the two: it makes a few calls to ProxyMarket and answers four webhooks.

You need: an approved vendor account on market.xproxy.io, a server that ProxyMarket can reach over HTTPS with a valid certificate, and someone who can write a small web service. Every endpoint, field and answer is also in the ProxyMarket API reference.

Running XProxy? You do not need any of this. The XProxy panel already has the connector built in: see Sell on ProxyMarket. This page is for vendors with their own proxy or VPN software.

In short

You call ProxyMarket

Send your plans, keep stock and proxy health up to date, and deliver a login late if you need to. Every call carries your X-API-Key.

ProxyMarket calls you

A health check every 10 minutes, then a webhook when a customer pays, when an order ends and when a customer changes a setting.

You keep 70%

Your share of each sale is credited as soon as the payment clears. ProxyMarket keeps 30% for the shop, payments, support and refunds.

How does it work?

Your servermodems, proxies, VPN
ProxyMarketshop, payments, support
Customerconnects to your proxy
ProxyMarket sells. You deliver the proxy login or the VPN config file, and the customer then connects straight to your server.

What are the steps to go live?

Do them in this order. Steps 1 to 3 set up your account; steps 4 to 7 are the integration.

  1. Create a normal account on market.xproxy.ioYou
  2. Apply to become a vendor (Become Vendor in the top menu)You
  3. Wait for the application to be approvedProxyMarket
  4. Build your health check and put your webhook server onlineYou
  5. Create your API key in the vendor dashboardYou
  6. List your plans, handle orders and check webhook signaturesYou
  7. Place one real test order and check the customer gets a working proxyYou + ProxyMarket

Why build the health check first?

ProxyMarket checks your server with HEAD {webhook_url}/health. It is the one endpoint that decides whether your plans stay on sale:

  • When you create your key, ProxyMarket calls it once. No answer, no key (HTTP 422).
  • Every 10 minutes after that, it calls it again. After 2 failures in a row, all plans of that key are hidden from the shop and cannot be bought. One good answer brings them all back by itself.
Counts as upCounts as down
Any status below 500, within 5 seconds. No login and no body needed.A timeout, a refused connection, or any 5xx status.
python
@app.route("/health", methods=["HEAD", "GET"])
def health():
    return "", 200   # no login, no database, no outside call

Put it under your webhook URL: with https://your-vendor-host.com/marketplace it answers at /marketplace/health.

This is the most common way a working shop quietly stops selling. A deploy, a restart, or a firewall that blocks HEAD can empty your whole catalogue in about 20 minutes. Make /health the simplest route you have: no login, no database, no outside call, and answer GET too.

Do not mix it up with Report the health of your proxies (POST /api/integration/health). That one is a call you make about single proxies; it does not keep your plans listed.

How do I get my API key?

You create it yourself once your vendor application is approved; nobody sends it to you. In the vendor dashboard, give the key a name and your webhook URL, for example https://your-vendor-host.com/marketplace. You can also do it with one call (reference):

bash
curl -X POST "https://market.xproxy.io/api/vendor/integrations" \
  -H "Authorization: Bearer $PROXYMARKET_LOGIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{"name": "primary-instance", "webhook_url": "https://your-vendor-host.com/marketplace"}'

# {"api_key": "pm_..."}   <- shown only this once, save it now
The key is shown only once. ProxyMarket keeps only a hash and cannot give it back. Save it straight away. If you lose it, create a new one.

From that one key you get two values. Keep them apart:

ValueWhat it isUsed for
api_keyThe key itself, starting with pm_The X-API-Key header on every call you make
signing_keySHA256(api_key) as 64-character hexChecking the X-Signature of every webhook (how)

The key never expires. Use one key per server: if you run several independent servers, give each its own key, so you can replace or revoke one without touching the others.

How do I list my plans?

Send all your products with Publish or update your plans when your connector starts, and again whenever something changes. A plan is listed at once; there is no review. Your external_id is your own ID for the product (a port, a modem, a VPN pool), and every later call and webhook uses it.

bash
curl -X POST "https://market.xproxy.io/api/integration/plans/sync" \
  -H "X-API-Key: $PROXYMARKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{
    "external_id": "port-1",
    "name": "US Mobile 4G - Port 1",
    "proxy_type": "mobile",
    "protocol": "HTTP",
    "country": "United States",
    "duration_days": 30,
    "price_usd": 25.00,
    "stock": 1,
    "is_active": true
  }]'

# {"created": 1, "updated": 0, "plans": [{"plan_id": "...", "external_id": "port-1", "status": "created"}]}
Good to knowWhy
Sending the same external_id again updates the planSync is safe to repeat; it never makes duplicates.
A plan you leave out stays on saleTo stop selling it, call Take a plan off sale.
proxy_type takes only mobile, residential, datacenter, isp, ipv6 or vpnAny other value is accepted, but the order then never gets its login. See VPN and VLESS.
country is the full name, for example United StatesCustomers filter by country. The supported list is at the end.
stock is usually 1 per modem portOne customer per port. Set it to 0 while the port is sold or down.

What happens when someone buys?

  1. The customer pays. Your 70% is credited to your balance right away, before your server is even called.
  2. ProxyMarket calls POST {webhook_url}/provision with the order_id and your external_plan_id (payload). Check the signature, then create the customer's access.
  3. You answer with the login or config (best), with pending, or with error. See the table below.
  4. The customer sees the login on ProxyMarket and connects to your server. Set the port's stock to 0.
  5. When the time runs out, ProxyMarket ends the order by itself (it checks every 5 minutes) and calls POST {webhook_url}/deprovision. You remove the access and set the stock back to 1. See When an order ends.
status you answerWhen to use itWhat happens
provisioned (best)You can create the access at onceThe customer gets it immediately. Add all four of proxy_ip, proxy_port, proxy_username, proxy_password, or vpn_config_file for VPN.
pendingSetting it up takes a whileSend it within 5 minutes with Deliver the proxy login or VPN config.
error + messageYou cannot deliver (port offline, no free profile)ProxyMarket refunds the customer automatically and takes your earning back.

Save the order_id: you need it to deliver late, to end the order yourself, and to match the other webhooks.

How do I check that a webhook really comes from ProxyMarket?

Every webhook POST carries X-Signature: sha256=…, an HMAC-SHA256 of the raw body. The secret is your signing key, SHA256(api_key) as hex, not the API key itself. Check it on /provision, /deprovision and /update-settings before you do anything else.

python
import hashlib, hmac, os

API_KEY = os.environ["PROXYMARKET_API_KEY"]
# The HMAC secret is SHA256(api_key) as hex, NOT the raw key. Compute it once.
SIGNING_KEY = hashlib.sha256(API_KEY.encode()).hexdigest()


def verify_signature(raw_body: bytes, header: str) -> bool:
    expected = "sha256=" + hmac.new(SIGNING_KEY.encode(), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, header or "")


# Flask: sign the raw bytes, before you parse the JSON
@app.route("/provision", methods=["POST"])
def provision():
    if not verify_signature(request.get_data(), request.headers.get("X-Signature", "")):
        return jsonify({"status": "error", "message": "Invalid signature"}), 401
    data = request.get_json()
    ...

Use the raw request body. Parsing the JSON and dumping it again changes the bytes, and the signature no longer matches.

How do I test before customers buy?

  1. From outside your network, run curl -I https://your-vendor-host.com/marketplace/health and check you get a status below 500 within 5 seconds.
  2. Sync one plan and find it in Browse on market.xproxy.io.
  3. Place one real order for it. Your server should get /provision with a valid signature, and the login should appear in the customer's order.
  4. Connect with that login, then wait for the order to end (or ask over Telegram to end it) and check /deprovision removes the access and the stock comes back.

Tell ProxyMarket on Telegram @xproxyio when you place the test order, so it can be checked from their side too.

How do I keep stock and health up to date?

When this happens on your sideCall
A modem or server goes offlinePATCH /plans/stock with stock: 0, is_active: false
It comes back online, or a sold port is free againPATCH /plans/stock with stock: 1, is_active: true
A price, name or config changesPOST /plans/sync with just that plan
You stop selling a productDELETE /plans/{external_id}
Every 5 minutesPOST /health with the state of each proxy (online, offline, rotating)

All paths start with https://market.xproxy.io/api/integration.

What happens when an order ends?

ProxyMarket calls POST {webhook_url}/deprovision with a reason:

ReasonMeaning
expiredThe rental time is over. Sent automatically, with expired_at.
cancelledThe order was cancelled before it started.
refundedAn admin refunded the customer. Your earning for it is taken back.

Remove the customer's login (or turn their VPN profile off), put the port back on sale with PATCH /plans/stock, and answer {"status": "deprovisioned"}. ProxyMarket retries on network errors, so a second call for the same order must also answer 200.

If access ends on your side first (you revoked it, or the hardware died for good), tell ProxyMarket with End an order from your side.

What if a customer changes their IP whitelist or TCP fingerprint?

For proxy orders (never VPN), ProxyMarket calls POST {webhook_url}/update-settings. Apply what your system supports and answer {"status": "ok"}; you can ignore a field you do not support.

  • ip_whitelist: only these IPs may use the proxy. [] removes the limit; null leaves it as it is.
  • tcp_fingerprint: which OS the connection should look like (win1 Windows 11, mac1 macOS, ios1 iPhone 15, android1 Galaxy S24, and more). null turns it off.

How do I sell VPN and VLESS?

The order flow is the same; only what you deliver changes. Send the complete client file, exactly as the customer should import it.

ProductPlan fieldsYou deliver
OpenVPNproxy_type: "vpn", protocol: "OpenVPN", vpn_protocol: "openvpn"The full .ovpn text, certificates and keys inside
WireGuardproxy_type: "vpn", protocol: "WireGuard", vpn_protocol: "wireguard"The full .conf with [Interface] and [Peer]
VLESS (Xray)proxy_type: "vpn", protocol: "VLESS", vpn_protocol: "vless"A one-line vless:// link, or full Xray client JSON
Never send proxy_type: "xray". The shop shows VLESS plans as “Xray”, but that label comes from vpn_protocol. xray is accepted by the API and then breaks the plan: the customer pays and the config never arrives.

Three ways to deliver the file:

  • Same file for everyone on the plan: put it in vpn_config_template when you sync.
  • A new file per order: make it in /provision and answer with vpn_config_file.
  • A new file that takes time: answer pending, then send vpn_config_file with Deliver the proxy login or VPN config.

For VLESS, give each order its own UUID (sharing one means revoking one customer revokes all), name the transport in the plan description (for example XTLS-Reality or WS+TLS), and remove the UUID from your inbound when the order ends.

How do I get paid?

Your share70% of each sale (the standard rate; it can be agreed per vendor)
ProxyMarket share30%, for the shop, payments, support and refunds
When it is creditedAs soon as the customer's payment clears and the order goes active, before your /provision is called
Where to see itEarnings in your vendor dashboard: each sale with its amount, your amount and the rate used
PayoutsPaid by the ProxyMarket admin from your balance. Ask on Telegram when you want to withdraw.
RefundsIf you answer error, or the order is refunded later, the earning is removed from your balance.

The rate is saved with each sale, so a later rate change never touches money you already earned.

Where do my plans show up in the shop?

Browse lists plans cheapest first, with one rule to know before you set prices: plans from vendors running XProxy software come first, under Powered by xProxy, with an xProxy badge. Plans from your own connector come next, under Other vendors, also cheapest first.

WhereWhat decides the order
Browse, defaultThe XProxy group first, then yours, each cheapest first
Browse, when the customer sortsThe sort applies inside each group, so a cheaper plan of yours still stays below the XProxy group
Homepage “from $X” cardsThe cheapest XProxy plan of each category; yours only when XProxy has no stock there
Country, protocol and search filters, your store pageExactly the same for every vendor

When everything listed belongs to one group, Browse shows one flat list without headings. Most customers arrive by filtering for a country or protocol, and there your plans sit next to everyone's.

What do the error codes mean?

CodeMeaningWhat to do
400Bad JSON or a missing fieldCheck the request body
401Missing or wrong API keyCheck the X-API-Key header
404Unknown external_id or order_idCheck the ID; sync the plan first
409Duplicate, or the order already has its loginSkip it, or update instead
422A value is not validThe answer names the field
429Too many callsWait and retry later
500ProxyMarket errorRetry with a growing delay

Limits per minute: plan sync 60, stock updates 120, health reports 30, credential deliveries 60.

Is there a full example?

Yes. This Python connector syncs one proxy plan, reports health every 5 minutes and answers all four webhooks. Replace the two functions at the top with calls to your own system.

python
"""Minimal ProxyMarket connector: sync plans, report health, answer the four webhooks."""
import hashlib
import hmac
import os
import secrets
import threading
import time

import requests
from flask import Flask, jsonify, request

API_KEY = os.environ["PROXYMARKET_API_KEY"]          # pm_... from "Create your API key"
MARKET = "https://market.xproxy.io/api/integration"
HEADERS = {"X-API-Key": API_KEY, "Content-Type": "application/json"}
SIGNING_KEY = hashlib.sha256(API_KEY.encode()).hexdigest()


# ── Your system (replace with your own code) ─────────────────────────
PORTS = {
    "port-1": {"name": "US Mobile 4G - Port 1", "country": "United States", "protocol": "HTTP",
               "price": 25.00, "days": 30, "online": True, "ip": "203.0.113.1", "port": 8080},
}

def add_proxy_login(port_id, username, password): ...   # create the customer's login
def remove_proxy_login(port_id, order_id): ...          # delete it again


# ── Calls you make ───────────────────────────────────────────────────
def sync_plans():
    plans = [{
        "external_id": pid, "name": p["name"], "proxy_type": "mobile", "protocol": p["protocol"],
        "country": p["country"], "duration_days": p["days"], "price_usd": p["price"],
        "stock": 1 if p["online"] else 0, "is_active": p["online"],
    } for pid, p in PORTS.items()]
    r = requests.post(f"{MARKET}/plans/sync", json=plans, headers=HEADERS, timeout=15)
    print("[sync]", r.status_code, r.json())


def set_stock(port_id, free):
    requests.patch(f"{MARKET}/plans/stock", headers=HEADERS, timeout=15,
                   json=[{"external_id": port_id, "stock": 1 if free else 0, "is_active": free}])


def health_reporter():
    while True:
        try:
            reports = [{"external_id": pid, "status": "online" if p["online"] else "offline",
                        "current_ip": p["ip"]} for pid, p in PORTS.items()]
            requests.post(f"{MARKET}/health", json=reports, headers=HEADERS, timeout=15)
        except requests.RequestException as e:
            print("[health]", e)
        time.sleep(300)  # every 5 minutes


# ── Webhooks ProxyMarket calls ───────────────────────────────────────
app = Flask(__name__)


def signed():
    expected = "sha256=" + hmac.new(SIGNING_KEY.encode(), request.get_data(), hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, request.headers.get("X-Signature", ""))


@app.route("/health", methods=["HEAD", "GET"])
def health():
    return "", 200


@app.route("/provision", methods=["POST"])
def provision():
    if not signed():
        return jsonify({"status": "error", "message": "Invalid signature"}), 401
    data = request.get_json()
    port = PORTS.get(data["external_plan_id"])
    if not port or not port["online"]:
        return jsonify({"status": "error", "message": "Port offline"})  # ProxyMarket refunds the customer
    username = f"cust_{data['order_id'][:8]}"
    password = secrets.token_urlsafe(16)
    add_proxy_login(data["external_plan_id"], username, password)
    set_stock(data["external_plan_id"], free=False)
    return jsonify({
        "status": "provisioned",
        "proxy_ip": port["ip"], "proxy_port": port["port"],
        "proxy_username": username, "proxy_password": password,
    })


@app.route("/deprovision", methods=["POST"])
def deprovision():
    if not signed():
        return jsonify({"status": "error", "message": "Invalid signature"}), 401
    data = request.get_json()
    remove_proxy_login(data["external_plan_id"], data["order_id"])  # must be safe to run twice
    set_stock(data["external_plan_id"], free=True)
    return jsonify({"status": "deprovisioned"})


@app.route("/update-settings", methods=["POST"])
def update_settings():
    if not signed():
        return jsonify({"status": "error", "message": "Invalid signature"}), 401
    data = request.get_json()
    # data["ip_whitelist"]: [] = allow everyone, None = leave as it is
    # data["tcp_fingerprint"]: "win1", "ios1", ... or None = no spoofing
    return jsonify({"status": "ok"})  # apply what you support, ignore the rest


if __name__ == "__main__":
    sync_plans()
    threading.Thread(target=health_reporter, daemon=True).start()
    # Serve this behind HTTPS at your webhook_url, for example https://your-vendor-host.com/marketplace
    app.run(host="0.0.0.0", port=9090)

Where is the full API reference?

Every call and webhook, with all fields, example answers and code in curl, Python, Node.js and PHP, is in the ProxyMarket API reference. The OpenAPI 3.1 file is at market.openapi.yaml.

DirectionEndpointWhat it does
You callPOST /api/vendor/integrationsCreate your API key
You callPOST /plans/syncPublish or update plans
You callPATCH /plans/stockChange stock and visibility
You callDELETE /plans/{external_id}Take a plan off sale
You callPOST /healthReport the state of your proxies
You callPOST /orders/{order_id}/credentialsDeliver a login or config late
You callPOST /orders/{order_id}/expireEnd an order from your side
We call youHEAD /healthHealth check that keeps your plans listed
We call youPOST /provisionA customer paid: deliver
We call youPOST /deprovisionAn order ended: remove access
We call youPOST /update-settingsApply a new IP whitelist or TCP fingerprint

Which countries can I list?

United States, United Kingdom, Germany, France, Netherlands, Canada, Australia, Japan, Singapore, South Korea, Brazil, India, Russia, Italy, Spain, Sweden, Switzerland, Poland, Turkey, Indonesia, Thailand, Vietnam, Philippines, Mexico, Argentina, Colombia, Chile, South Africa, Nigeria, Egypt, Israel, United Arab Emirates, Saudi Arabia, Hong Kong, Taiwan, Ukraine, Romania, Czech Republic, Austria, Belgium, Denmark, Finland, Norway, Ireland, Portugal, Hungary, Greece, New Zealand, Malaysia and China. Use the name exactly as written here.

FAQ

I run XProxy. Do I need to build this?

No. Turn on ProxyMarket in the panel (Selling Platform → ProxyMarket) and it does all of this for you, including the webhooks. See Sell on ProxyMarket. Your plans then also get the xProxy badge.

Why did all my plans disappear from the shop?

Almost always the health check: HEAD {webhook_url}/health failed twice in a row (down, slower than 5 seconds, a 5xx, or HEAD blocked). Fix it and the plans come back after the next good check, within 10 minutes.

I lost my API key. Can ProxyMarket send it again?

No. Only a hash is stored. Create a new key, and remember that the signing key changes with it.

My signature check always fails. Why?

Usually one of two things: you used the raw API key as the HMAC secret instead of SHA256(api_key) in hex, or you signed parsed and re-encoded JSON instead of the raw request body.

Do I get paid if my server fails to deliver?

No. If you answer error, or never deliver, the customer is refunded and the earning is removed from your balance.

Can I connect several servers?

Yes. Create one key per server, each with its own webhook URL. Each key's plans are hidden or shown by that server's health check only.

What next?

Open the full reference, or ask ProxyMarket on Telegram.

Use with AI

Still stuck?A technician can look at your device with a one-time PIN, or chat with us on Telegram.