Build a reseller business on HProxy
The end-to-end reseller loop over the HProxy API: fund a wallet, sell residential GB or dedicated IPs, deliver programmatically, get pushed on fulfillment, renew — with safety rails.
Everything a proxy storefront needs, over one API: prepaid wallet, server-authoritative quotes, idempotent orders, programmatic delivery for both residential lines and dedicated IPs, webhooks on fulfillment, and renewals. Your customers never see HProxy — every response is white-label by construction.
- 1Fund the wallet
POST /depositsreturns a hostedpayUrl(card or crypto). Everything below prepays from this balance and fails with an honest402when it's short — no surprise card charges, ever. - 2Quote before you sell
GET /products/{id}/pricereturns the exact amount the order will charge — for dedicated IPs passcountryandperiod_daystoo. Put your margin on top and show YOUR price. - 3Buy on demand
POST /orderswith anIdempotency-Key. Wallet-paid orders return in seconds; a retry with the same key can never double-charge. - 4DeliverResidential:
POST /plans/{id}/generateper customer request. Dedicated:GET /proxies?order_id=…once the order completes. - 5Attribute
PATCH /plans/{id}with alabel— your customer reference rides on every read and every webhook after that. - 6Get pushed, don't poll
- 7Renew
POST /orderswithfulfillment_meta: {"kind": "extension", "ids": […]}renews exactly the proxies your customer keeps.
Selling residential GB, one plan per customer
Each purchase provisions its own isolated plan — its own upstream credentials and its own hard GB cap. So the sub-user model is built into the buy flow: buy one (small) plan per customer, and customers can never drain each other. Label each plan with YOUR customer reference, read its remaining GB any time, and get pushed [plan.low_traffic](/docs/proxy-api/webhooks) when a customer needs a top-up. Generation is free and repeatable; the plan's balance is consumed by actual traffic only.
# 1. Buy 10 GB for customer 1042 (their own isolated plan + credentials)
curl -X POST https://hproxy.com/api/v1/orders \
-H "X-API-Key: hpx_your_key_here" -H "Idempotency-Key: cust-1042-resi-10gb" \
-H "Content-Type: application/json" \
-d '{"product_id": "residential-premium", "quantity": 10}'
# 2. The new plan id shows up here (newest first)
curl https://hproxy.com/api/v1/plans -H "X-API-Key: hpx_your_key_here"
# 3. Tag it with YOUR customer reference
curl -X PATCH https://hproxy.com/api/v1/plans/{planId} \
-H "X-API-Key: hpx_your_key_here" -H "Content-Type: application/json" \
-d '{"label": "customer-1042"}'
# 4. Generate lines per customer request (free, repeatable)
curl -X POST https://hproxy.com/api/v1/plans/{planId}/generate \
-H "X-API-Key: hpx_your_key_here" -H "Content-Type: application/json" \
-d '{"count": 100, "country": "US", "stickyMinutes": 10}'
# 5. Show the customer their balance (synced ~every 30 min)
curl https://hproxy.com/api/v1/plans/{planId} -H "X-API-Key: hpx_your_key_here"Selling dedicated IPs (IPv4 / IPv6 / ISP / Mobile)
# 1. Quote the exact charge for the targeting your customer picked
curl "https://hproxy.com/api/v1/products/ipv4/price?quantity=5&country=DEU&period_days=30" \
-H "X-API-Key: hpx_your_key_here"
# 2. Buy with the same targeting
curl -X POST https://hproxy.com/api/v1/orders \
-H "X-API-Key: hpx_your_key_here" -H "Idempotency-Key: cust-1042-ipv4-de-5" \
-H "Content-Type: application/json" \
-d '{"product_id": "ipv4", "quantity": 5,
"fulfillment_meta": {"country": "DEU", "period_days": 30}}'
# 3. On the order.fulfilled webhook (or once GET /orders/{id} says completed):
curl "https://hproxy.com/api/v1/proxies?order_id={orderId}" -H "X-API-Key: hpx_your_key_here"
# -> ip, ports, username, password per proxy. Hand them to your customer.
# 4. Renewal, 30 more days for the proxies the customer kept
curl -X POST https://hproxy.com/api/v1/orders \
-H "X-API-Key: hpx_your_key_here" -H "Idempotency-Key: cust-1042-renew-jul" \
-H "Content-Type: application/json" \
-d '{"product_id": "ipv4", "quantity": 2,
"fulfillment_meta": {"kind": "extension", "ids": ["9214321", "9214322"], "period_days": 30}}'Renewals are ownership-checked server-side: the ids (from GET /proxies) must belong to the calling account, and the renewal is priced for exactly those proxies. quantity should match the number of ids.
Safety rails for production
Send an Idempotency-Key on every write, so retries converge instead of double-charging. Put a daily spend cap on the key in your dashboard, so a leak can't drain the wallet. Verify webhook signatures before trusting a delivery. Branch on the machine code in error bodies (402 = top up, 429 = back off per Retry-After). And generate your client from the OpenAPI spec instead of hand-writing one.
Need a hand wiring this up? Email [email protected]. A real person reads every message.