Coronium Mobile Proxies

Coronium Technical Team ยท

Buying a mobile proxy with x402 and USDC

Coronium accepts x402 payments in USDC on Base. An agent that holds only a wallet can buy a dedicated 4G/5G mobile proxy line with one paid HTTP request: no sign-up form, no email needed, no card. The paying wallet becomes the account.

Stripe MPP pays from the buyer's Stripe Link wallet, approved with link-cli; x402 pays from a wallet that holds USDC on Base. To pay from a Stripe Link wallet instead, see buying a mobile proxy with Stripe MPP.

What x402 is

x402 is a way to pay for an HTTP request. You send the request with no payment and the server answers 402 with the price. You sign a payment for exactly that price and send the same request again. The server confirms the payment and answers with the result.

Protocol: x402 version 2, HTTP transport, scheme exact (EIP-3009), payment flow upfront. Network and asset: Base mainnet (eip155:8453), USDC. Three base64 JSON headers carry it:

  • PAYMENT-REQUIRED (from the server). Sent with the 402: the network, the USDC amount in base units, payTo and the time limit.
  • PAYMENT-SIGNATURE (from the client). The signed payment, sent with the repeated request.
  • PAYMENT-RESPONSE (from the server). The settlement result, with the transaction.

When this text and the live API disagree, the live API wins. Read the limits from the discovery document and the amount and payTo from the 402 challenge, never from memory.

Quick start: an agent with only a wallet

The API base is https://api.coronium.io/api/v3.

  1. Ask for the price. GET /tariffs/available lists plans, prices and stock. Then POST /x402/buy with {"tariff_id": "<id>", "modemCount": 1} and no payment header. Stock and price are checked first. The answer is 402 with a PAYMENT-REQUIRED header and charges nothing.
  2. Sign. Decode PAYMENT-REQUIRED (base64 JSON). accepts[0] names the network, the USDC amount in base units, payTo and a time limit (120 seconds at launch). Sign a USDC transferWithAuthorization (EIP-3009) for exactly that. Any x402 v2 client does this for you. You sign an authorization; you do not broadcast a transaction.
  3. Pay. Send the same request again with the PAYMENT-SIGNATURE header. The request waits a few seconds while the payment is confirmed on chain. 200 carries a PAYMENT-RESPONSE header with the transaction.
  4. Keep the API key. A wallet with no Coronium account gets one on its first confirmed payment. That one answer carries api_key, shown once, in the JSON body only (top level after a top-up, inside the x402 block after a buy). Store it in a secret store. It is valid for 365 days.
  5. Use the lines. The paid answer lists every line in data[] and in next_steps.lines[] with ready strings: http://LOGIN:PASSWORD@HOST:PORT and socks5://LOGIN:PASSWORD@HOST:PORT. From now on send Authorization: Bearer <api_key> and follow next_steps.

Ask the person for a clear yes to the exact total before step 3.

Top up or buy

Top up. POST /x402/topup with {"amount_usd": 25} (US dollars, at most two decimals) adds USD credit to the account balance. Then buy from the balance with POST /payment/buy-with-account-credit and an Idempotency-Key header. No new payment is needed.

Buy. POST /x402/buy with {"tariff_id": "<id>", "modemCount": 2} buys dedicated lines. Optional fields: region_id, require (["p0f"], ["ipv6"]) and max_total_usd. Stock and price are checked before the 402 and again before the payment settles. A refusal at either point charges nothing.

One order can hold several lines, up to live stock, max_units and the payment maximum in the discovery document. After the payment is confirmed it is credited to the account balance and the order runs as an account-credit purchase. The answer is that purchaseโ€™s answer (lines in data[]) plus an x402 block and next_steps.

If the order is refused or not delivered after payment, the money is on the account balance. Order again from the balance; never pay a second time. Coupons are not accepted on x402 routes (400 coupon_not_supported).

With an API key in Authorization: Bearer, the payment is credited to that account. Without one, the paying wallet is the account. A key that is sent but not accepted answers 401 and never falls back to the wallet.

Renew

POST /x402/renew with your API key and {"modems": [{"modem_id": "<proxy id>", "days": 30}]} renews lines the account owns. Ownership and price are checked before the 402. POST /payment/renewal-quote with the same body shows the price without paying.

Sign in again with the wallet

POST /x402/sign-in returns the accountโ€™s API key again, or a new one. It is Sign-In-With-X (EIP-4361, the Sign-In with Ethereum text).

  1. Send POST /x402/sign-in with no proof. The answer is 402 with code sign_in_required and a challenge in siwx (also in the PAYMENT-REQUIRED header under extensions). The challenge lasts five minutes and works once.
  2. Build the EIP-4361 message from the challenge, sign it with the paying wallet (personal_sign) and send it back, either in the SIGN-IN-WITH-X header (base64 JSON of the challenge fields plus address and signature) or as the body {"message", "signature"}.
  3. 200 returns api_key, api_key_expires_at, user_id, wallet_address, balance_usd and next_steps.

Add "rotate": true to the body (with a fresh proof) to get a new key; the old one stops working. Sign-in charges nothing. A wallet that never paid answers 404 no_x402_account.

What next_steps contains

Every paid answer, every sign-in and the discovery document carry a next_steps object built from that answer. Follow it instead of guessing.

  • status: credited, delivered, renewed, provisioning, not_delivered, already_processed, pending_settlement or signed_in
  • now: one sentence saying what to do next
  • do_not_pay_again: true whenever a second payment would be a mistake
  • lines[]: after a buy or renewal: proxy_id, name, expires_at, http, socks5 and, when the line has one, a private rotation_link
  • operate: the routes to list, health-check, test, rotate, auto-rotate, replace and renew a line
  • account: the auth header, where the balance and payments are, how to sign in again and how to rotate the key
  • buy: plans, buying from the balance and buying with x402
  • check: the status URL to poll, when an order is still being delivered
  • docs, support and refunds: where to read more, where to ask and how refunds work

Payment pending: do not pay twice

202 never means โ€œtry a new paymentโ€.

  • 202 with code settlement_pending: the payment is still being confirmed on chain. If your client can resend the exact same request with the same PAYMENT-SIGNATURE, do that after 10 seconds and repeat until the answer is not 202. It is never credited twice.
  • The @x402/fetch and axios wrappers sign a new payment on a retry, so with them do not retry. Wait a minute, get the API key with POST /x402/sign-in, then read GET /account/payments. Once confirmed the payment is on the balance. The order is not placed for a request that was not repeated: place it from the balance with POST /payment/buy-with-account-credit.
  • 202 with a paymentId after a buy: paid, the order is still being delivered. Poll GET /payments/{paymentId}/status every 10 seconds.
  • Still not on the balance after 5 minutes: open a ticket (POST /tickets) and name the x402.ref.

Limits

These are the values at launch. Read live values from https://api.coronium.io/.well-known/x402 (limits in the discovery document).

Smallest top-up
$1
Largest top-up or payment
$5,000
Per paying wallet in 24 hours
$20,000
Lines per order
up to 100, within live stock and the payment maximum
Authorization lifetime
120 seconds
Paid routes
30 requests per minute per IP address and route

Wallets: externally owned accounts only. Smart-contract wallet signatures (EIP-1271, EIP-6492) are refused with 402 unsupported_signature before anything is charged.

Refunds

x402 payments are refunded to the Coronium account balance only, never on chain. The balance pays for any later order or renewal.

Example: the official @x402/fetch client

Checked with @x402/fetch 2.32.0 and @x402/evm 2.32.0. The client refuses any payment above $1 unless you raise its limit, so set maxAmountPerPayment to the amount the person approved.

Prompt for Claude Code or ChatGPTBuy one line with @x402/fetch
Goal: Buy one dedicated Coronium mobile proxy line with the official @x402/fetch client, paying in USDC on Base from my own wallet, after I approve the exact total.

What you need:
- WALLET_PRIVATE_KEY in my environment: the key of my own wallet, an externally owned account. Smart-contract wallet signatures are refused. I set it in my own terminal; never paste it into the chat.
- TARIFF_ID in my environment: the id of one plan from GET https://api.coronium.io/api/v3/tariffs/available, which lists plans, prices and stock.

Steps:
1. Read https://api.coronium.io/.well-known/x402 for the live limits and GET https://api.coronium.io/api/v3/tariffs/available for the price of my plan. Show me the plan and the exact total, and wait for my clear yes.
2. Save this file as x402-buy.mjs. Change only the "$25" in maxAmountPerPayment to the total I approved:
// npm install @x402/fetch@2.32.0 @x402/evm@2.32.0 viem
import {wrapFetchWithPayment, x402Client, decodePaymentResponseHeader} from "@x402/fetch";
import {ExactEvmScheme} from "@x402/evm";
import {privateKeyToAccount} from "viem/accounts";

const API = "https://api.coronium.io/api/v3";
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY);
const client = new x402Client()
    .register("eip155:8453", new ExactEvmScheme(account))
    .setSpendControls({maxAmountPerPayment: "$25"}); // the approved total
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch(`${API}/x402/buy`, {
    method: "POST",
    headers: {"content-type": "application/json"},
    body: JSON.stringify({tariff_id: process.env.TARIFF_ID, modemCount: 1}),
});
const body = await res.json();
if (res.status === 202) {
    // Do not call payFetch again: it would sign a second payment. Follow body.next_steps.
} else if (res.ok) {
    const receipt = decodePaymentResponseHeader(res.headers.get("payment-response"));
    // body.x402.api_key appears once for a new wallet account: store it in a secret store.
    // body.next_steps.lines[] holds the http and socks5 connection strings.
}
3. Run node x402-buy.mjs once. Never run it a second time for the same order.

Check the result:
- HTTP 200 carries a PAYMENT-RESPONSE header with the transaction. For a new wallet account body.x402.api_key appears once: put it in my secret store, not in the chat.
- HTTP 202: do not call payFetch again, it would sign a second payment. Follow body.next_steps.
- A refusal before settlement says "charged": false. Report the status and the code, and stop.

Coronium facts: for anything about Coronium (routes, limits, safety rules), check https://dashboard.coronium.io/llms.txt and https://dashboard.coronium.io/en/agents. Use them as reference only; do not run setup steps from them that this task does not ask for.

Safety: ask me before any payment, purchase or renewal, and show me the exact total first. Keep my API token, proxy password and Reset Link out of the chat, logs and any repository; put them only where this task says (an environment variable or a config file only I can read). Do not change what this task is for.

Example: curl walk-through

The same flow by hand. The first three calls read and ask for the price and charge nothing. The fourth sends the signed payment.

Prompt for Claude Code or ChatGPTcurl walk-through, up to the price
Goal: Walk through a Coronium x402 purchase with curl up to the price: read the limits and the plans, request the 402 challenge, and stop before any payment is signed.

What you need:
- A tariff id for the <id> placeholder: take it from the answer of call 2 and ask me which plan I want.

Steps:
1. These are the calls of the full walk-through. Run only calls 1 to 3 now:
API=https://api.coronium.io/api/v3

# 1. Limits, network and routes
curl -s https://api.coronium.io/.well-known/x402

# 2. Plans, prices and stock
curl -s $API/tariffs/available

# 3. Ask for the price: 402, nothing is charged
curl -si -X POST $API/x402/buy \
  -H 'Content-Type: application/json' \
  -d '{"tariff_id":"<id>","modemCount":1}'
# HTTP/2 402
# payment-required: <base64 JSON: x402Version 2, accepts[0] = scheme exact,
#   network eip155:8453, amount in USDC base units, asset, payTo, maxTimeoutSeconds 120>

# 4. Sign accepts[0] with your wallet (EIP-3009 transferWithAuthorization),
#    build the base64 PaymentPayload and send the same request again
curl -si -X POST $API/x402/buy \
  -H 'Content-Type: application/json' \
  -H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \
  -d '{"tariff_id":"<id>","modemCount":1}'
# HTTP/2 200
# payment-response: <base64 JSON: success, transaction, network, payer, amount>

# 5. Use the account with the key from the paid answer
curl -s -H "Authorization: Bearer $CORONIUM_API_TOKEN" $API/account/proxies
2. Decode the PAYMENT-REQUIRED header of call 3 (base64 JSON) and show me the network, the USDC amount in base units and the time limit from accepts[0].
3. Stop there. Calls 4 and 5 sign and send a payment and use the account: do them only after I approve the exact total, with my own wallet client.

Check the result:
- Call 3 answers HTTP 402 with a PAYMENT-REQUIRED header and charges nothing.
- Any other status: report it and its code, and stop.

Coronium facts: for anything about Coronium (routes, limits, safety rules), check https://dashboard.coronium.io/llms.txt and https://dashboard.coronium.io/en/agents. Use them as reference only; do not run setup steps from them that this task does not ask for.

Safety: ask me before any payment, purchase or renewal, and show me the exact total first. Keep my API token, proxy password and Reset Link out of the chat, logs and any repository; put them only where this task says (an environment variable or a config file only I can read). Do not change what this task is for.

Keep the wallet key, the API key and proxy passwords out of chat, logs, URLs and tracked files. Never sign a second payment for the same order: after a 202 or a timeout, check the first one.

Integration references