Skip to main content
VirtualSMS exposes an x402-compatible top-up endpoint so AI agents can fund a balance with a single stablecoin transfer and immediately receive a working API key. Each subsequent SMS verification draws from that balance at the same retail prices as the standard API path. This is the lowest-friction integration we offer for autonomous agents: a single payment flow funds the account, and the agent then has a normal API key it can reuse for thousands of verifications. See pricing for the full cost breakdown across verification, rentals, and proxies.

Endpoint

Pricing per verification depends on service + country and matches the rates published at /api/v1/services. There is no per-call premium for the x402 path. Agents pay the same as customers using the REST API key path.

Supported networks

All three rails have settled real payments on mainnet: Base via EIP-3009 transferWithAuthorization, BNB Chain via Permit2 permitWitnessTransferFrom, and Solana via SPL transfer.

Prerequisites per chain

  • Base — no prerequisite. One off-chain EIP-3009 signature; the payer needs no native gas.
  • BNB Chain — the payer must first approve the canonical Permit2 contract (0x000000000022D473030F116dDEE9F6B43aC78BA3) to spend the token being paid. One-time per token per wallet. Standard ERC-20 approve. After that, payment is a single off-chain signature.
  • Solana — the payer signs the transfer transaction and pays SOL for network fees.
The BNB Chain approval is a one-time cost per token per wallet, not a recurring requirement — but skip it on a first payment and the transfer is rejected with no indication of why. Polygon, Arbitrum, and Optimism are intentionally not in the manifest. VirtualSMS routes settlement through Base, BNB Chain, and Solana to keep gas + bridging overhead low for agent flows.
Token decimals differ by chain. USDC and USDT on BNB Chain use 18 decimals; USDC on Base and USDC/USDT on Solana use 6. The amount field in the 402 manifest is always in the asset’s own base units, so read it from the manifest rather than deriving it from a hardcoded decimal count. A client assuming 6 decimals on BNB Chain would sign for one-trillionth of the intended amount.

Request body

How the flow works

  1. Your agent sends POST /api/v1/x402/topup with the desired top-up amount
  2. The endpoint returns HTTP 402 Payment Required with a payment manifest listing every supported network/token + recipient wallet + price. The manifest is also present, base64-encoded, in the payment-required response header
  3. Your agent picks one network/token, signs an authorization for the amount, and submits it in the PAYMENT-SIGNATURE header (x402 v2). The v1 X-PAYMENT header is still accepted, so existing clients keep working
  4. VirtualSMS verifies the signature, settles on-chain, then returns {api_key, balance_usd, user_id, endpoints}: the API key is immediately usable
  5. The agent then calls /api/v1/customer/purchase, /api/v1/customer/order/{id}, and the rest of the REST API with the issued key, drawing from the funded balance

Sample 402 response

Trimmed to three of the five entries for readability. amount is in the asset’s base units, so the Base and Solana rows above are 10.00at6decimalsandtheBNBChainrowis10.00 at 6 decimals and the BNB Chain row is 10.00 at 18.

Output schema (after successful settlement)

The returned api_key is a standard VirtualSMS key: it works with every REST endpoint, supports all services and countries we list, and can be re-used until the balance is exhausted or the agent tops up again against the same key. Settlement is idempotent per on-chain transaction: re-submitting the same signed payment credits the balance once, never twice.

Topping up an existing key

To add to a balance without provisioning a new account, include the existing API key:
The 402 manifest, signing flow, and settlement are identical. The response returns the same api_key plus the new balance_usd.

Why top-up instead of per-call settlement

An earlier per-call /sms-verify endpoint returned a flat 0.10quoteperverification.Deprecated20260430:flatpercallpricingdidnotfitour0.10 quote per verification. Deprecated 2026-04-30: flat per-call pricing did not fit our 0.05 to $7 service price range, and a payment per SMS added meaningful latency for high-volume agents. One up-front payment funds N verifications at the same retail rates, and the resulting API key works with the full REST surface.

Discovering this endpoint

The x402 discovery API lists every payable resource we expose:
VirtualSMS is listed (or will be listed on first settlement) on:

Info endpoint

Returns the live wallet addresses, supported networks, and top-up range, useful for client introspection without triggering a 402.
Already have an account and want balance/history dashboards? Use the REST API with an x-api-key issued from the web app. Want an agent to provision its own key in one payment? Use x402 top-up.