· URLGate News

Test your x402 client before it pays

A glowing terminal card with two verified signature rows linked to a blue coin on a dark grid, under the headline Test before you pay and the label verdict ok.

An AI agent that pays per request with x402 has to get the details right: the network, the amount, the wallet balance and the signature format. A mistake on a real purchase costs time, and sometimes money. Urlgate gives agents and developers a free way to rehearse first.

What the compat check does

Opening a paid Urlgate link takes two USDC signatures from the same wallet in one retry: the main leg to the link's creator and a platform fee leg of 0.3% to Urlgate. The compat check asks for exactly the same two-leg payment, with tiny amounts and a 30 second expiry. Urlgate verifies both legs (signature, balance and a simulation) and never settles them. Signatures sent to the check can never pay for anything.

How to run it

  1. Call payment_compat_check on the MCP server at /mcp, or POST /api/v2/payments/compat-check over REST, with no payment.
  2. Read the x402 payment requirements in the reply: a main accepts[] entry and a platform fee entry.
  3. Sign both with the same wallet and call again.
  4. Read the verdict. ok means your client is ready. Anything else names the problem, such as fee_leg_missing, wrong_network, bad_signature or insufficient_funds.

Then pay for real

Once the verdict is ok, the same client can call open_link and pay for a link in the same way. That makes Urlgate a practical place to sell access to a file or an API to AI agents: they test once, then pay per link from 0.01 USDC with no API key and no checkout form.

Start at urlgate.xyz

Create a paid linkRead as markdown

For agents

Machine-readable summary for AI agents and their builders. Always trust the live 402 challenge and GET https://urlgate.xyz/api/v2/config over any number on this page.

Example (a 0.05 USDC link at 0.3%: 49850 units to the creator, 150 units to URLGate):

GET https://urlgate.xyz/Gp1qJx
Accept: application/json

402 Payment Required
PAYMENT-REQUIRED: base64({ x402Version: 2,
  accepts: [{ scheme: "exact", network: "eip155:8453", amount: "49850", payTo: "0xCreator…", … }],
  extensions: { "platform-fee": { accepts: [{ scheme: "exact", network: "eip155:8453", amount: "150", payTo: "0xURLGate…", … }] } } })

GET https://urlgate.xyz/Gp1qJx
Accept: application/json
PAYMENT-SIGNATURE: base64(PaymentPayload for accepts[0])
PAYMENT-SIGNATURE-FEE: base64(PaymentPayload for extensions["platform-fee"].accepts[0])

200 OK
PAYMENT-RESPONSE: base64(settlement)
{ "destination": "https://…", "receiptUrl": "…" }

FAQ

What is URLGate?

A pay-to-open URL shortener: any URL becomes a short link that people and AI agents unlock by paying USDC over x402.

What does HTTP 402 mean?

HTTP 402 is Payment Required. x402 uses it: the server answers 402 with a price, the client pays in USDC and retries the same request.

Request the link with Accept: application/json and read the x402 v2 challenge in the PAYMENT-REQUIRED header. Sign two USDC authorizations with the same wallet on the same network (PAYMENT-SIGNATURE for the creator, PAYMENT-SIGNATURE-FEE for the 0.3% platform fee) and send both in one retry. URLGate verifies and settles the payment itself; there is no facilitator. A wallet that already paid gets back in with SIGN-IN-WITH-X or a Bearer token, without paying again.

0.01 USDC on this host (the default is 0.01 USDC). The live value is in GET https://urlgate.xyz/api/v2/config.

Which networks does URLGate accept?

USDC on Base (eip155:8453), Polygon (eip155:137), Arbitrum (eip155:42161) on this host. The code supports Base, Base Sepolia, Polygon, Arbitrum. Read accepts[] in the 402, /.well-known/x402 or /api/v2/config for the current list.

The website create form is free. Over the API or MCP, creating links is free within a daily quota when signed in or with an agent key; otherwise the 0.01 USDC creation fee is charged via x402.

All news · RSS