What it is

RH402 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 USDG on Robinhood Chain, chain 4663.

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 USDG), the token, the address that gets paid and how long the offer holds.

Sign: the payer signs an EIP-3009 transferWithAuthorization with EIP-712. Nothing is sent to the chain and no gas is spent. The signature says: move this exact amount of USDG from me to this exact address, once, before this time.

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 money goes to the route, the amount matches, the time window is open, the signature recovers to the payer, the nonce is unused, the payer holds enough USDG, and USDG accepts the transfer in a simulation.

The last three are read live from Robinhood Chain on every request. A failed check returns 402 with the error code from x402, for example invalid_exact_evm_insufficient_balance.

The run on the home page uses a fresh key made in your tab, so it holds no USDG and stops at the balance check. Pick your wallet instead and the same code asks it to sign.

Why EIP-3009

USDG on Robinhood Chain (0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168) supports EIP-3009 transferWithAuthorization, so x402 pays through the token itself, with no approval step. It is the transfer method the x402 spec recommends.

The signed transfer names its receiver and a one-time nonce, so whoever settles the payment cannot redirect it or replay it.

Settlement

Settling means a facilitator sends the signed transfer to USDG and pays the gas in ETH. The payer never pays gas. The facilitator for RH402 opens with $RH402. 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 EIP-3009 can call it.