Skip to content

Solana mainnet — payments use real USDC, go straight to the seller and are final. Unaudited software; use small amounts.

Nanotoll
Solana mainnet · real USDC

Paste a URL. Set a USDC price. Get paid per call, with no code.

Nanotoll turns any https URL into an endpoint that answers HTTP 402 until the caller pays in USDC on Solana, then forwards the request and streams back the origin's response.

This deployment runs on Solana mainnet. Payments are real USDC, sent directly to the seller, and are final.

terminal

1 · Unpaid request

$ curl -i https://<your-deployment>/p/<token>
HTTP/1.1 402 Payment Required
content-type: application/json
x-nanotoll-price: 10000

{
  "x402Version": 1,
  "error": "X-PAYMENT header is required",
  "code": "payment_required",
  "accepts": [{
    "scheme": "exact",
    "network": "solana",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "payTo": "<seller wallet>",
    "maxAmountRequired": "10000",
    "resource": "https://<your-deployment>/p/<token>",
    "description": "Paid call to Nanotoll endpoint <eid> (0.01 USDC)",
    "mimeType": "*/*",
    "maxTimeoutSeconds": 120,
    "extra": {
      "challenge": "<payload>.<hmac>",
      "memoPrefix": "ntoll:v1:",
      "memoProgram": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr",
      "decimals": 6
    }
  }]
}

2 · Pay on Solana, then retry with proof

$ curl -i https://<your-deployment>/p/<token> \
    -H "X-PAYMENT: <base64 {challenge, signature}>"
HTTP/1.1 200 OK
content-type: application/json
x-nanotoll-receipt: <transaction signature>
x-nanotoll-price: 10000

{ ...the origin's response, byte for byte... }

How it works

  1. 1

    Paste

    Paste any https URL that returns data: a JSON API, a file, a page. Add an origin header if it needs an API key.

  2. 2

    Price

    Set a price per call between 0.001 and 100 USDC and the Solana wallet that should receive it.

  3. 3

    Share

    Share the endpoint URL. Unpaid requests get HTTP 402 with payment details; paid requests get the origin's response.

What happens on a call

  1. The caller requests the endpoint and gets 402 with the price, the seller's wallet, the USDC mint and a signed challenge that expires in 120s.
  2. The caller sends one Solana transaction: create the seller's USDC account if needed, transfer USDC to it, and attach the memo ntoll:v1:<endpoint>:<nonce>.
  3. The caller retries with an X-PAYMENT header. The server checks the transaction on-chain, forwards the request to the origin, and streams the response back with an X-Nanotoll-Receipt header.

Full protocol, error codes and a copy-paste TypeScript client are in the docs.

Design

Non-custodial

Buyers pay the seller's wallet directly with an SPL token transfer. Nanotoll never holds funds and takes no fee.

No database

Your endpoint config is encrypted (AES-256-GCM) into the URL token. Sales are read from Solana using a memo on each payment.

Origin stays private

The origin URL and header are encrypted in the token and never shown. Anyone who pays still receives the origin's response content.

x402-style

The 402 body follows the x402 v1 "exact" shape, but settlement is verified directly on-chain, not through a facilitator. Not every x402 client will work.

Limits, stated plainly

  • Every paid call is final. There are no refunds in v1.
  • The buyer pays after the 402, and the origin can still fail. Failures after payment return HTTP 502 with the payment receipt.
  • Replay protection is best-effort: a payment is bound to one request and expires after 120s, but within that window an identical request may be served again by a different server instance.
  • Sellers are responsible for the content and legality of what they proxy.
  • Only GET and POST, request bodies up to 1 MB, and origins on public addresses.
  • There is no NTOLL token in the product. Nothing here requires or uses one.

Read the full terms and limits.

Make an endpoint

You need an https URL and a Solana wallet address.