IPSurfer
FeaturesPricingFAQSetup guides
Sign inGet started

API documentation

Buy, read and renew dedicated ISP proxies from your own program. Choose the country and the use. Every purchase is paid from your balance.

Contents

  1. Overview
  2. Quick start
  3. Authentication
  4. Conventions
  5. Idempotency
  6. Prices
  7. Products and stock
  8. Buying and reading orders
  9. The order object
  10. Status and renewal timeline
  11. Using the proxy lines
  12. Faulty lines
  13. Balance and deposits
  14. Errors
  15. Limits
  16. Selling to your own customers
  17. Full examples
  18. What the API doesn't do
  19. Changelog

For code generators and API tools: OpenAPI 3 description.

Overview

The API sells one product: Dedicated ISP. Each IP is static and yours alone for as long as you keep renewing it. You pick a country and, where it is listed, a use such as ticket or social. Terms are 30 days and are paid up front from your balance.

WhatHow
Base URLhttps://www.ipsurfer.com/api/v1
FormatJSON in and out, over HTTPS. Send Content-Type: application/json with a body.
MoneyUS dollars, as numbers with two decimals, in fields ending in _usd.
TimeISO 8601 in UTC, for example 2026-11-05T12:00:00.000Z.
Where to call it fromYour server. Calls from a browser aren't supported, and your key must stay secret.

Quick start

  1. Create an account and confirm your email.
  2. Add funds to your balance in the dashboard, or through POST /deposits.
  3. Create a key in Dashboard → API. It is shown once.
  4. Make these calls:
# 1. Your balance
curl https://www.ipsurfer.com/api/v1/balance \
  -H "Authorization: Bearer ips_live_YOUR_KEY"

# 2. What's on sale and your price for 10 more IPs
curl "https://www.ipsurfer.com/api/v1/products?quantity=10" \
  -H "Authorization: Bearer ips_live_YOUR_KEY"

# 3. Buy. Keep the Idempotency-Key if you have to retry.
curl -X POST https://www.ipsurfer.com/api/v1/orders \
  -H "Authorization: Bearer ips_live_YOUR_KEY" \
  -H "Idempotency-Key: my-order-0001" \
  -H "Content-Type: application/json" \
  -d '{"product":"dedicated","country":"US","use_case":"ticket","quantity":10,"reference":"customer-42"}'

# 4. Read it every 15 seconds or more until status is "active"
curl https://www.ipsurfer.com/api/v1/orders/ORDER_ID \
  -H "Authorization: Bearer ips_live_YOUR_KEY"

# 5. Get the lines, one per row
curl "https://www.ipsurfer.com/api/v1/orders/ORDER_ID/proxies?output=text" \
  -H "Authorization: Bearer ips_live_YOUR_KEY"

A purchase answers 202 at once with status processing and your balance already charged. The proxies usually arrive within a couple of minutes.

Authentication

Send your key on every call, except the OpenAPI description, which is public:

Authorization: Bearer ips_live_YOUR_KEY
  • A key acts on your whole account: it can spend your balance. Keep it on your server and out of your code repositories.
  • You can have 5 active keys, for example one per program. We store only a hash of each key, so it can't be shown again after you create it.
  • To change a key without stopping: create a new one, switch your program to it, then revoke the old one in Dashboard → API.
  • The account's email must be confirmed. Until it is, every call answers 403 email_not_verified.
  • A missing, wrong or revoked key answers 401 invalid_api_key. Repeated failures from one address answer 429.

Conventions

Errors

Our errors have the same shape, with a stable code for your program and a message for people. Some carry extra fields. The full list is in Errors. Rarely, a platform failure answers a 5xx that isn't JSON: treat it as internal_error.

{ "error": { "code": "insufficient_balance", "message": "Not enough balance. Add funds and try again.", "required_usd": 549, "balance_usd": 12 } }

Pagination

Lists return newest first with a next_cursor. Pass it as cursor to read the next page. null means there are no more rows. Treat it as opaque text.

GET /api/v1/orders?limit=50
→ { "orders": [ ... ], "next_cursor": "cm..." }

GET /api/v1/orders?limit=50&cursor=cm...
→ { "orders": [ ... ], "next_cursor": null }

Strict bodies

A POST or PATCH with a field we don't know answers 400 invalid_requestinstead of ignoring it, so a typo can't buy something you didn't mean. Prices are never taken from your request.

Response headers

HeaderWhenMeaning
Retry-After429, 503, 409 request_in_progress and 409 not_active on the lines endpointSeconds to wait before trying again.
Idempotent-Replayed: trueA retry with the same keyThis is the stored answer of the first request. Nothing happened again.

Idempotency

Networks fail. If a purchase times out you can't know whether it went through, so POST /orders and POST /orders/:id/renew require an Idempotency-Keyheader: any text up to 128 characters, unique per operation. A random UUID or your own order number both work. Keys belong to your account and don't expire.

You sendWe answer
The same key and body, after it finishedThe first answer again, with Idempotent-Replayed: true. No second charge.
The same key and body, while it runs409 request_in_progress with Retry-After. Wait and retry.
The same key with another body422 idempotency_key_reused. Use a new key. Bodies are compared byte for byte, so send the same text when you retry.
The same key, after a refusal such as 400, 402, 409 out_of_stock or 503It runs again: a refused request doesn't use up its key. For example, retry after a top-up.
The same key after a 500 on POST /ordersSafe: it answers the order if the charge went through, and buys it if it didn't.
Anything after a 500 on renewThat key stays blocked with 409, because the renewal may have gone through. Read the order and your balance, and if it didn't renew, use a new key.

On POST /orders, a request that died before charging frees its key after 5 minutes. Save the key with your own order before you call, so a restart of your program retries with the same one. A new key is a new purchase.

Prices

The price is per IP per month. It falls with volume, counting the IPs you already hold plus the ones you are buying. An IP counts once its order is active, or when it is paid from your balance and on its way.

IPs held plus this orderPrice per IP per month
1$7.99
2$7.29
3 to 4$6.79
5 to 9$6.29
10 to 19$5.89
20 to 34$5.69
35 to 49$5.59
50+$5.49
  • You pay the rung of the total for the whole order. Holding 20 IPs, one more costs the 20 to 34 price.
  • An order renews at the price it was bought at, so a larger order placed at once pays less than the same IPs bought one by one.
  • GET /products?quantity=N tells you what N more IPs cost your account right now.

Volume pricing on your account

For large volumes, write to us. A negotiated price is set on your account and shows in special_pricing: with your current tier in GET /account, and as the list of tiers in GET /products. It works by tiers of IPs held:

  • You pay the tier reached by the IPs you hold plus the order, or the public price if that is lower.
  • When an API purchase takes you to a new tier, the orders you already hold move to that price from their next renewal. An order's price never goes up.

Products and stock

GET /api/v1/products?quantity=50

Every country and use on sale, whether each is available now, and your price for that many more IPs (1 to 100, default 1).

{ "term_days": 30, "max_quantity_per_order": 100, "active_ips": 340,
  "quote": { "quantity": 50, "unit_price_usd": 5.49, "total_usd": 274.5 },
  "price_ladder": [ { "min_quantity": 1, "max_quantity": 1, "unit_price_usd": 7.99 }, ... ],
  "special_pricing": null,
  "dedicated": [
    { "product": "dedicated", "country": "US", "country_name": "United States", "use_case": "ticket", "in_stock": true }, ... ] }

in_stock says whether that product can be bought now. It is a yes or no, not a count, and nullmeans it couldn't be read at that moment. Orders are checked again when you place them.

Countries and uses

Pass country and optionally use_case, in any case. Without use_case you get the first one listed for that country.

countryNameuse_case
USUnited Statessocial, retail, ticket, sneaker, ipqs, pokemon_center
CACanadaretail, ticket, sneaker
GBUnited Kingdomsocial, retail, ticket, sneaker, ipqs
FRFranceaio
DEGermanysocial, retail, ticket, sneaker, ipqs
HKHong Kongretail, ticket
ITItalyaio
JPJapanretail
PLPolandaio
ESSpainaio

Buying and reading orders

POST /api/v1/orders

Requires an Idempotency-Key header. Your balance is charged when the order is accepted. Up to 100 IPs per order; place more orders for more.

FieldTypeRequiredDescription
productstringYesdedicated
countrystringYesTwo letters, as listed above.
use_casestringNoAs listed above. Default: the first one listed for the country.
quantityintegerYes1 to 100.
auto_renewbooleanNoDefault true. See the renewal timeline.
referencestringNoYour own label, up to 64 letters, digits and . _ : @ - such as your end customer's id. We don't read it. You can filter by it.
{ "product": "dedicated", "country": "US", "use_case": "ticket", "quantity": 100, "auto_renew": true, "reference": "customer-42" }
→ 202 { "order": { "id": "cm...", "status": "processing", ... }, "balance_usd": 701.5 }

Errors: 400 (nothing charged), 402 insufficient_balance, 409 out_of_stock, 409 request_in_progress, 422 idempotency_key_reused, 429, 503 temporarily_unavailable. Allow up to about 60 seconds for the answer when many orders arrive together.

GET /api/v1/orders/:id

One order with its proxies. Poll it after buying, every 15 seconds or more, until status is active. An order of several IPs stays processing until all its lines are there, up to 30 minutes. Past that it turns active with the lines that exist, so compare the number of lines with quantity and report any shortfall.

{ "order": {
    "id": "cm...", "status": "active", "product": "dedicated", "country": "United States",
    "use_case": "ticket", "reference": "customer-42", "quantity": 2,
    "unit_price_usd": 7.29, "total_usd": 14.58, "renewal_price_usd": 14.58, "auto_renew": true,
    "created_at": "2026-11-05T12:00:00.000Z", "expires_at": "2026-12-05T12:00:30.000Z",
    "proxies": { "http": ["1.2.3.4:61234:user1:pass1", "1.2.3.5:61234:user2:pass2"],
                 "socks5": ["1.2.3.4:62234:user1:pass1", "1.2.3.5:62234:user2:pass2"] } } }

GET /api/v1/orders/:id/proxies?protocol=http&format=host_port&output=json

Just the lines, in the shape your tool wants. 409 not_active until the order is active.

ParameterValuesDescription
protocolhttp (default), socks5Which set of lines.
formathost_port (default), urlhost:port:username:password, or http://username:password@host:port with the login URL-encoded.
outputjson (default), textJSON, or text/plain with one line per proxy.
GET /api/v1/orders/cm.../proxies?format=url
→ { "protocol": "http", "format": "url", "proxies": [ "http://user1:pass1@1.2.3.4:61234", "http://user2:pass2@1.2.3.5:61234" ] }

GET /api/v1/orders?status=active&expires_before=2026-12-01&reference=customer-42&limit=50&cursor=...&include=proxies

Your orders, newest first. Every parameter is optional.

ParameterDescription
statusprocessing, active, needs_attention, expired, canceled or refunded.
expires_beforeA date. Only orders whose expires_at is on or before it.
referenceOnly orders with exactly this label.
includeproxies adds each order's lines.
limit1 to 100. Default 50.
cursorThe next_cursor of the previous page.

PATCH /api/v1/orders/:id

Send either field or both. It answers the order after the change.

FieldTypeDescription
auto_renewbooleanfalse: the order runs to its end and stops. true: it renews by itself. Older website subscriptions and bundles answer 400 not_renewable.
referencestring or nullChange your label, or null to remove it.
{ "auto_renew": false, "reference": "customer-43" }

POST /api/v1/orders/:id/renew

Pays one more 30-day period now, from your balance only, even if you have a saved card. Requires an Idempotency-Key. All IPs of the order renew together, at renewal_price_usd. It works early, and each call adds a period, so keep one key per period. After expires_at it buys a new proxy: the answer can read processing with expires_at null, and you read the new lines when it turns active.

→ 200 { "order": { "id": "cm...", "status": "active", "expires_at": "2027-01-04T12:00:30.000Z", ... }, "balance_usd": 640.2 }

Errors: 400 not_renewable, 402 insufficient_balance with required_usd, 409 not_renewable, 409 renewal_pending (it is paid and being applied, don't pay again), 409 request_in_progress.

The order object

FieldTypeDescription
idstringThe order's id.
statusstringSee the timeline below.
productstringdedicated. Older website orders may read custom, isp or bundle.
countrystringThe country's name.
use_casestring or nullticket, social... null if the order has none.
referencestring or nullYour label.
quantityintegerHow many IPs.
unit_price_usdnumberPer IP per month. This is what renewals are charged at.
total_usdnumberWhat the purchase cost.
renewal_price_usdnumberWhat the next period costs for the whole order.
auto_renewbooleanWhether it renews by itself.
created_atdateWhen it was bought.
expires_atdate or nullPaid through this moment. The lines stop working soon after it. null until the order is delivered.
proxiesobject or nullOn GET /orders/:id and with include=proxies. { http: [...], socks5: [...] }, or null unless the order is active. Don't serve them once expires_at has passed.

Older website orders of the custom kind also carry location and asn. Old bundle orders show no lines here: read them in the dashboard.

Status and renewal timeline

statusMeaningWhat to do
processingWe are getting your proxies. A website checkout that wasn't paid also reads this until it is dropped.Keep reading the order. If it takes long, the purchase is being retried by itself and you won't be charged again.
activeDelivered, with the lines in proxies. They work until expires_at. Past it the order is in grace: it still reads active, but its lines no longer work.Check expires_at as well as status.
needs_attentionPaid, and our team has to finish it by hand.Nothing. Write to support if it lasts.
expiredIt ended and wasn't renewed. The lines no longer work.Buy a new one.
canceledCanceled.Nothing.
refundedRefunded to you.Nothing.

What happens around expires_at

WhenWhat happens
7 days beforeWith auto-renew on, we email your account what will be charged.
5 days beforeWith auto-renew on, the renewal is first tried from your balance. It keeps trying until grace ends. Keep funds on your balance.
If the balance is shortA saved card covers it, if you have one. Otherwise it waits for a top-up and renews by itself.
expires_atThe paid period ends. The lines stop answering within hours (HTTP 407), and the IP can't be kept any more.
Up to 7 days afterGrace: the status stays active and you can still renew, by hand or by itself. That buys a new proxy, with a new IP and login and a full 30 days: the order goes back to processing, expires_at is null, and you read the new lines when it turns active.
After graceThe status becomes expired. Buy a new one.

To keep the same IP, renew before expires_at. A renewal before it adds 30 days to the current end, so renewing early loses nothing. With auto_renew off, an order just runs to its end.

Using the proxy lines

  • A line is host:port:username:password. Split it on the first three colons.
  • Each IP has its own line, normally with its own login. Don't assume two lines of an order share one.
  • The login is the only authentication. There is no IP allowlist.
  • The IP doesn't rotate. It stays the same for as long as the order renews before expires_at.
  • HTTP and SOCKS5 use different ports, so take the line from the matching list: proxies.http for HTTP, proxies.socks5 for SOCKS5. A SOCKS5 client on an HTTP line fails.
  • SOCKS5 is checked on the first line of an order, and socks5 is empty if that check fails. Test each line before relying on it.
  • The country is what we commit to. You can't choose a city or an ISP on this product.
curl -x http://USER:PASS@1.2.3.4:61234 https://ipinfo.io/ip
curl --socks5 1.2.3.4:62234 --proxy-user USER:PASS https://ipinfo.io/ip

Faulty lines

POST /api/v1/orders/:id/report

Tells support that a line is failing. Support tests it and answers at your account's email. If it fails on our side we make it right, normally with a replacement line that has a new IP and login, so read the order again afterwards. There is no automatic swap.

FieldTypeRequiredDescription
messagestringYesWhat fails and what you see, 5 to 2000 characters.
ipstringNoThe IP that fails. It has to be on this order.
{ "ip": "1.2.3.4", "message": "Connection refused on the login since 12:00 UTC" }
→ 202 { "reported": true, "order_id": "cm...", "ip": "1.2.3.4", "reply_to": "you@example.com" }

You can also write to support@ipsurfer.com.

Balance and deposits

GET /api/v1/balance

{ "balance_usd": 1250.5, "currency": "USD" }

GET /api/v1/account

Your balance, the IPs you hold and any special pricing on your account.

{ "email": "you@example.com", "balance_usd": 1250.5, "currency": "USD", "active_ips": 1340,
  "special_pricing": {
    "current_unit_price_usd": 3.75,
    "tiers": [ { "min_ips": 1, "unit_price_usd": 4 }, { "min_ips": 1000, "unit_price_usd": 3.75 } ],
    "next_tier": { "min_ips": 10000, "unit_price_usd": 3.25 } } }

special_pricing is null on an account without it.

GET /api/v1/transactions?limit=50&cursor=...

Your balance ledger, newest first, up to 200 rows a page. type is deposit, purchase, renewal, refund, coupon, commission, withdrawal or adjustment. amount_usd is signed.

{ "transactions": [ { "id": "cm...", "type": "purchase", "amount_usd": -14.58, "balance_after_usd": 85.42,
    "order_id": "cm...", "created_at": "2026-11-05T12:00:00.000Z" } ], "next_cursor": null }

POST /api/v1/deposits

Opens a crypto payment for amount_usd, from 15 to 10,000, with at most two decimals. Pay at payment_url. Your balance is credited when the payment settles, and you can open as many as you need. Card top-ups are in the dashboard.

{ "amount_usd": 500 }
→ 201 { "id": "cm...", "amount_usd": 500, "payment_url": "https://..." }

GET /api/v1/deposits

Your latest 50. status is credited once your balance has it. Anything else means it isn't in your balance yet. A payment below the amount asked reads partially_paid and isn't credited by itself: write to us.

{ "deposits": [ { "id": "cm...", "amount_usd": 500, "status": "credited",
    "credited_at": "2026-11-05T12:30:00.000Z", "created_at": "2026-11-05T12:00:00.000Z" } ] }

Errors

HTTPcodeWhat it means and what to doCharged?
400invalid_jsonThe body isn't valid JSON.No
400invalid_requestA field or parameter is missing, has the wrong type or is out of range. Unknown fields are refused too. The message says which.No
400idempotency_key_requiredSend the Idempotency-Key header, up to 128 characters.No
400unknown_productNo product for that country and use_case. See GET /api/v1/products.No
400unknown_ipThat IP isn't on this order.No
400not_renewableThis order can't be renewed or changed through the API: an older website subscription or bundle.No
401invalid_api_keyThe key is missing, wrong or revoked.No
402insufficient_balanceAdd funds and retry. It carries required_usd, and balance_usd where it can be read.No
403email_not_verifiedConfirm your account's email.No
404not_foundThat order doesn't exist on your account, or that endpoint doesn't exist.No
409out_of_stockThat product isn't available now. Try another use_case or country, or retry later.No
409request_in_progressThe same Idempotency-Key is still running. Wait the seconds in Retry-After.See Idempotency
409not_activeThe order has no active proxies right now.No
409not_renewableOn renew: the order has ended or can't be renewed right now. If it has ended, buy a new one.No
409renewal_pendingThe renewal is paid and being applied. Read the order again shortly and don't pay again.Already paid
422idempotency_key_reusedThat key was used with a different request. Use a new key.No
429rate_limitedToo many requests. Wait the seconds in Retry-After.No
500internal_errorOn POST /orders: retry with the same key, it can't buy twice. On renew: check the order and your balance first, then use a new key.See the message
502payment_provider_errorThe crypto payment couldn't be opened. Try again shortly.No
503temporarily_unavailableThis can't be served right now. Retry after the seconds in Retry-After.No

A call to the wrong method of a real endpoint answers 405. Any other path under /api/v1 answers 404 not_found.

Limits

WhatLimit
IPs per order100
Requests300 a minute per key. These are per server, so treat them as approximate and honor Retry-After.
New orders30 a minute per account
Renewals60 a minute per account
New deposits10 a minute per account
Reports of a faulty line5 every 10 minutes per account
Failed authentication30 a minute per address
Reading an order that is on its wayIt moves forward at most once every 15 seconds, so polling faster gains nothing
Active keys5 per account

Stay under these limits and honor Retry-After. Use of the proxies is subject to our terms, including what they say about acceptable use and refunds.

Selling to your own customers

  • Place one order per end customer, or per customer and country, and put their id in reference. Each order then has its own expiry and renewal.
  • GET /orders?reference=customer-42 gives you everything that customer has, and include=proxies their lines.
  • Give your customers only the lines. Your key spends your balance, and it shows your price.
  • Run a daily check with expires_before. Decide per order: keep funds for auto-renew, renew it yourself, or turn auto_renew off when your customer leaves.
  • Keep enough balance for the renewals coming up. Each one is charged in full.
  • Place large batches progressively and watch for 503 and 409 out_of_stock, which charge nothing. Availability is checked order by order, so write to us before a very large purchase.
  • You are responsible for what is done with your proxies, including your customers' use.
# Everything active that ends by 1 December
curl "https://www.ipsurfer.com/api/v1/orders?status=active&expires_before=2026-12-01T00:00:00Z" \
  -H "Authorization: Bearer ips_live_YOUR_KEY"

# Renew one of them now, from your balance
curl -X POST https://www.ipsurfer.com/api/v1/orders/ORDER_ID/renew \
  -H "Authorization: Bearer ips_live_YOUR_KEY" \
  -H "Idempotency-Key: renew-ORDER_ID-2026-12"

# Your customer left: stop renewing
curl -X PATCH https://www.ipsurfer.com/api/v1/orders/ORDER_ID \
  -H "Authorization: Bearer ips_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"auto_renew":false}'

Full examples

Python

import time, uuid, requests

BASE = "https://www.ipsurfer.com/api/v1"
api = requests.Session()
api.headers["Authorization"] = "Bearer ips_live_YOUR_KEY"
RETRY = {"request_in_progress", "rate_limited", "temporarily_unavailable", "internal_error"}

def call(method, path, **kw):
    # A timeout or an answer that isn't JSON counts as "try again".
    try:
        r = api.request(method, BASE + path, timeout=70, **kw)
        return r.status_code, r.json(), int(r.headers.get("Retry-After", 15))
    except (requests.RequestException, ValueError):
        return None, None, 15

def buy(key, country, use_case, quantity, reference=None):
    # Save key with your own order BEFORE calling this, and pass the same one
    # if your program restarts: that is what makes it impossible to buy twice.
    body = {"product": "dedicated", "country": country, "use_case": use_case, "quantity": quantity}
    if reference:
        body["reference"] = reference
    for _ in range(20):
        status, data, wait = call("POST", "/orders", json=body, headers={"Idempotency-Key": key})
        if status == 202:
            return data["order"]
        if data and "error" in data and data["error"]["code"] not in RETRY:
            raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
        time.sleep(wait)
    raise RuntimeError("Not accepted yet. Run it again later with the same key.")

def wait_active(order_id, seconds=1900):
    end = time.time() + seconds
    while time.time() < end:
        status, data, wait = call("GET", f"/orders/{order_id}")
        if status == 200:
            order = data["order"]
            if order["status"] == "active":
                return order
            if order["status"] != "processing":
                raise RuntimeError(f"{order_id} is {order['status']}")
            wait = 20
        time.sleep(wait)
    raise TimeoutError(f"{order_id} isn't active yet")

key = str(uuid.uuid4())  # store it with your own order first
order = wait_active(buy(key, "US", "ticket", 10, reference="customer-42")["id"])
if len(order["proxies"]["http"]) < order["quantity"]:
    print("Fewer lines than paid for: report it")
for line in order["proxies"]["http"]:
    host, port, user, password = line.split(":", 3)
    print(host, port)

Node.js 20 or later

// Save as buy.mjs and run with: node buy.mjs
const BASE = "https://www.ipsurfer.com/api/v1";
const HEADERS = { Authorization: "Bearer ips_live_YOUR_KEY", "Content-Type": "application/json" };
const RETRY = new Set(["request_in_progress", "rate_limited", "temporarily_unavailable", "internal_error"]);
const sleep = (s) => new Promise((done) => setTimeout(done, s * 1000));

// A timeout or an answer that isn't JSON counts as "try again".
async function call(method, path, { body, headers } = {}) {
  try {
    const r = await fetch(BASE + path, { method, headers: { ...HEADERS, ...headers }, body, signal: AbortSignal.timeout(70000) });
    return { status: r.status, data: await r.json(), wait: Number(r.headers.get("retry-after") ?? 15) };
  } catch {
    return { status: null, data: null, wait: 15 };
  }
}

// Save key with your own order BEFORE calling this, and pass the same one
// if your program restarts: that is what makes it impossible to buy twice.
async function buy(key, country, useCase, quantity, reference) {
  const body = JSON.stringify({ product: "dedicated", country, use_case: useCase, quantity, ...(reference ? { reference } : {}) });
  for (let i = 0; i < 20; i++) {
    const { status, data, wait } = await call("POST", "/orders", { body, headers: { "Idempotency-Key": key } });
    if (status === 202) return data.order;
    if (data?.error && !RETRY.has(data.error.code)) throw new Error(`${data.error.code}: ${data.error.message}`);
    await sleep(wait);
  }
  throw new Error("Not accepted yet. Run it again later with the same key.");
}

async function waitActive(id, seconds = 1900) {
  const end = Date.now() + seconds * 1000;
  while (Date.now() < end) {
    const { status, data, wait } = await call("GET", `/orders/${id}`);
    if (status === 200) {
      if (data.order.status === "active") return data.order;
      if (data.order.status !== "processing") throw new Error(`${id} is ${data.order.status}`);
    }
    await sleep(status === 200 ? 20 : wait);
  }
  throw new Error(`${id} isn't active yet`);
}

const key = crypto.randomUUID(); // store it with your own order first
const order = await waitActive((await buy(key, "US", "ticket", 10, "customer-42")).id);
if (order.proxies.http.length < order.quantity) console.log("Fewer lines than paid for: report it");
console.log(order.proxies.http);

What the API doesn't do

  • Other products, such as datacenter, residential or rotating proxies.
  • Choosing a city or an ISP.
  • Sub-accounts. Use reference to keep your customers apart.
  • Webhooks. Read the order instead.
  • A test mode. To try it, buy 1 IP.
  • Renewing part of an order. All its IPs renew together, so use small orders if your customers come and go.
  • Canceling a period already paid. Turn auto_renew off to stop the next one.

Changelog

We add to /api/v1without notice, so ignore fields you don't know. A breaking change would come as a new version.

DateChange
2026-11-05First version.

Questions: support@ipsurfer.com.

IPSurfer
PricingFAQSetup guidesAPITermsPrivacyContact
© 2026 IPSurfer. All rights reserved.IKERPRIME, S.L. · NIF B-26902544 · Calle Almirante Mourelle, 50, 5º D, 15011 A Coruña, Spain