What it is
Tollgate puts a price on an HTTP route. A bot, an agent or an app calls the route, gets 402 Payment Required, signs one payment and calls again. The money is USDC on Elysium, chain 99901.
It follows x402 version 2, the open standard for payments over HTTP, with the exact scheme: the payer signs for one fixed amount to one fixed address, and nobody can change either.
One paid request
First call: the route answers 402 with a PAYMENT-REQUIRED header. It is base64 JSON with the price (amount in atomic units, 10000 = 0.01 USDC), the token, the address that gets paid and how long the offer holds.
Sign: the payer signs a Permit2 witness transfer with EIP-712. Nothing is sent to the chain and no gas is spent. The signature says: Permit2 may move this exact amount of USDC to this exact address, through the x402 Permit2 proxy, before this deadline.
Second call: the same request with a PAYMENT-SIGNATURE header. The gate checks it, settles it and answers 200 with a PAYMENT-RESPONSE header that holds the transaction hash.
What the gate checks
Eight checks, in the order a facilitator runs them: the scheme and network, the spender is the x402 Permit2 proxy, the money goes to the route, the amount and token match, the deadline is open, the signature recovers to the payer, the payer has allowed Permit2 to move USDC, and the payer holds enough USDC.
The last two are read live from Elysium on every request. A failed check returns 402 with the error code from the x402 spec, for example permit2_allowance_required.
The run on the home page uses a fresh key made in your tab, so it holds no USDC and stops at the allowance check. Pick your wallet instead and the same code asks it to sign.
Why Permit2
USDC on Elysium (0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65) supports EIP-2612 permits but not EIP-3009, so x402 pays through Permit2. Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) and the x402 Permit2 proxy (0x402085c248EeA27D92E8b30b2C58ed07f9E20001) are both deployed on chain 99901.
The proxy only sends money to the address inside the signed witness, so whoever settles the payment cannot redirect it.
Settlement
Settling means a facilitator calls the proxy and pays the gas in HYPE. The payer never pays gas. The facilitator for Tollgate opens with $TOLL. Until then a payment that passes every check ends with settles_at_launch, and the resource stays behind the gate.
Call it from code
GET /api/hype is open to any origin. The gate exposes PAYMENT-REQUIRED and PAYMENT-RESPONSE to browsers and accepts PAYMENT-SIGNATURE, so any x402 v2 client that supports exact with Permit2 can call it.