A developer's guide to the PROXIES.SX reseller API: mint, cap, top-up, rotate, and delete per-customer keys, build proxy URLs, and wire Stripe or x402 (USDC) billing. Real endpoints, real curl and SDK examples — no hand-waving.
The PROXIES.SX reseller API lets you mint per-customer proxy keys programmatically. Authenticate with your psx_ reseller key in an X-API-Key header, then POST /v1/reseller/pool-keys with a trafficCapGB and expiresAt to get a customer pak_ key. Top-up, rotate, or delete keys with the same resource. The gateway meters every GB.
Use an account enabled for reselling. Create the server-side API key in the account settings. Customer key reads require customers:read. Minting and topping up require customers:write. Keep the management key on your server.
Send that secret in the X-API-Key header. The public proxy username is a separate account value used in customer connection strings. Check the funded balance and the effective traffic rate for your own account before quoting a customer.
A mint creates a per-customer key (pak_...) scoped by two fields:trafficCapGB (how many GB it may consume) andexpiresAt (an ISO timestamp). The customer uses that pak_ key as their proxy password — they never see your psx_ key. Save a unique mint operation identifier and the order details before sending this write. Use either the HTTP or the SDK example for that order. Here it is with raw curl:
# Load the saved mint operation ID and server key from your private environment.
# MINT_RESPONSE_FILE is a new private file for this order’s credential.
umask 077
curl --fail-with-body --output "$MINT_RESPONSE_FILE" --request POST \
https://api.proxies.sx/v1/reseller/pool-keys \
--header "X-API-Key: $PROXIES_SX_API_KEY" \
--header "Idempotency-Key: ${MINT_OPERATION_ID:?load the saved mint operation ID}" \
--header "Content-Type: application/json" \
--data '{"label":"storefront-test","trafficCapGB":10,"capMode":"raw"}'
# The response contains the management id and the customer password in key.Prefer typed calls? The official @proxies-sx/pool-sdk wraps the same endpoints. One client, one method:
import { ProxiesClient } from '@proxies-sx/pool-sdk';
const proxies = new ProxiesClient({
apiKey: process.env.PROXIES_SX_API_KEY!,
proxyUsername: process.env.PROXIES_SX_USERNAME!,
});
const operationId = process.env.MINT_OPERATION_ID;
if (!operationId) throw new Error('Load the saved mint operation ID');
const key = await proxies.poolKeys.create({
label: 'storefront-test',
trafficCapGB: 10,
capMode: 'raw',
idempotencyKey: operationId,
});
// Keep key.id for management. Deliver key.key privately to this customer.Every reseller call lives under /v1/reseller/pool-keys and takes your X-API-Key header. Full reference in the Swagger docs.
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/reseller/pool-keys | Mint a new customer key (pak_) with trafficCapGB + expiresAt |
| GET | /v1/reseller/pool-keys | List your customer keys and their usage |
| GET | /v1/reseller/pool-keys/:id | Fetch one key — cap, usage, status, expiry |
| PATCH | /v1/reseller/pool-keys/:id | Update a key (label, expiry, cap) |
| POST | /v1/reseller/pool-keys/:id/topup | Add GB to an existing key |
| POST | /v1/reseller/pool-keys/:id/regenerate | Rotate the secret, keep the same key id |
| DELETE | /v1/reseller/pool-keys/:id | Delete a customer key |
Once a key is minted, the customer connects through one gateway: gw.proxies.sx:7000. All the routing — pool, country, session, rotation — is encoded in the proxy username. Your public proxy username supplies the prefix; the customer's pak_ key is the password:
http://psx_RESELLER-{POOL}-{COUNTRY}-sid-{SESSION}-rot-{ROTATION}:pak_CUSTOMER_KEY@gw.proxies.sx:7000
# Example with a public proxy username and customer password placeholder:
http://psx_EXAMPLE-mbl-us-sid-test7-rot-sticky:pak_CUSTOMER_KEY@gw.proxies.sx:7000-mbl- carrier modem · -peer- residential · -any- auto-pick mobile, fall back to residential.
A two-letter country code (e.g. us, de, gb) selects the exit country. Check stock for the selected pool before issuing a customer key.
The value after -sid- names one logical configuration. Reuse it for a sticky route. Carrier changes and failover can still change the public IP.
sticky and hard prefer the current eligible endpoint. With a session ID, ondemand reselects on a new connection when another endpoint matches. Omitting the rotation token uses the auto10 default.
Keys are living objects. When a customer buys more bandwidth, you top-up the cap instead of issuing a new key. If a secret leaks, you regenerate it in place — same id, new secret. When access ends, delete the intended key and verify the resulting account state. Existing connections have their own lifecycle.
# Use new, private result files. TOPUP_OPERATION_ID belongs to this order.
umask 077
curl --fail-with-body --output "$TOPUP_RESPONSE_FILE" --request POST \
"https://api.proxies.sx/v1/reseller/pool-keys/$ID/topup" \
--header "X-API-Key: $PROXIES_SX_API_KEY" \
--header "Idempotency-Key: ${TOPUP_OPERATION_ID:?load the saved top-up operation ID}" \
--header "Content-Type: application/json" \
--data '{"addTrafficGB":25}'
# After a lost response, look up the original operation before another write.
curl --fail-with-body --output "$LOOKUP_RESPONSE_FILE" \
https://api.proxies.sx/v1/reseller/pool-keys/operations/lookup \
--header "X-API-Key: $PROXIES_SX_API_KEY" \
--header "Idempotency-Key: ${TOPUP_OPERATION_ID:?load the saved top-up operation ID}"Use GET /v1/reseller/pool-keys to poll usage across all customers, or GET /v1/reseller/pool-keys/:id for one key's remaining cap — handy for usage bars and renewal nudges. Need to rename or extend? PATCH /v1/reseller/pool-keys/:id.
Verify the Stripe signature and check the Checkout Session is paid. Match its amount, currency and plan to your order, then deliver one allowance per session. A first purchase can create a key. A later purchase can top up the customer’s existing key.
The starter webhook handles immediate and delayed payment confirmation. Its delivery journal saves one provider operation against the purchase before issuing a key or adding GB. After a timeout, use the paid-order recovery worksheet to match the provider result to the customer allowance.
A wallet checkout needs its own settlement verification and delivery record. Match the settled amount and asset to your order before granting the purchased traffic allowance. The provider’s x402 buying guide documents the separate Proxies.sx purchase flow.
Don't want to wire all this by hand? The open-source proxy-reseller-kit ships the Stripe webhook and customer dashboard. Wallet checkout has a separate x402 integration guide. See the full reselling-business playbook for the end-to-end launch, or the white-label program if you want it fully branded.
It is the PROXIES.SX REST API for reselling mobile and residential proxies. You authenticate with your psx_ reseller key in an X-API-Key header and call /v1/reseller/pool-keys to mint per-customer keys (pak_...) with a trafficCapGB and expiresAt. The gateway at gw.proxies.sx:7000 then meters traffic against each key. You can also use the @proxies-sx/pool-sdk wrapper instead of raw HTTP.
POST to /v1/reseller/pool-keys with your X-API-Key header and a JSON body of { label, trafficCapGB, expiresAt }. The response includes the customer key (pak_...). With the SDK it is proxies.poolKeys.create({ label, trafficCapGB, expiresAt }). Store the customer password from the response’s key field privately. Save the operation identifier and intent before sending the write.
Use the public proxy username from your account with the selected pool, country, session and rotation. The password is the customer pool key. Keep the management API key on your server.
POST to /v1/reseller/pool-keys/:id/topup with addTrafficGB and a saved Idempotency-Key to add to the existing cap, or PATCH /v1/reseller/pool-keys/:id to change the label or expiry. To rotate the secret without minting a new key, POST /v1/reseller/pool-keys/:id/regenerate. To revoke access entirely, DELETE /v1/reseller/pool-keys/:id.
For Stripe, validate the signed webhook, paid Checkout Session and order terms. Journal the intended customer grant before creating a key or topping up an existing one. Recover the saved operation on a retry. A separate USDC integration can verify x402 settlement before fulfilling its own purchase.
Use the MIT-licensed starter with your reseller account, funded traffic balance and a verified paid order. Check the pack price in your account before setting the retail price.