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-20approve. After that, payment is a single off-chain signature. - Solana — the payer signs the transfer transaction and pays SOL for network fees.
Request body
How the flow works
- Your agent sends
POST /api/v1/x402/topupwith the desired top-up amount - 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-requiredresponse header - Your agent picks one network/token, signs an authorization for the amount, and submits it in the
PAYMENT-SIGNATUREheader (x402 v2). The v1X-PAYMENTheader is still accepted, so existing clients keep working - VirtualSMS verifies the signature, settles on-chain, then returns
{api_key, balance_usd, user_id, endpoints}: the API key is immediately usable - 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
amount is in the asset’s base units, so the Base and Solana rows above are 10.00 at 18.
Output schema (after successful settlement)
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: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.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.