Get started
Three short paths: look at a 402, pay the demo as a buyer, or call the facilitator as a seller. Base URL for this deployment is .
1. See a 402
The demo resource is unpaid until you attach a signature. This request must return HTTP 402 and a PAYMENT-REQUIRED header.
curl -i {{BASE}}/demoThe JSON body is the same object as the header (decoded). accepts lists GNK and USDC. Pick one when you pay.
The 402 body will appear here.
2. Pay the demo
You need Go and a Gonka private key whose address already holds GNK or bridged USDC. gonkalabs Git is temporarily unavailable — fetch the source from this website. The key stays on your machine.
curl -fsSL {{BASE}}/releases/x402-gonka-source.tar.gz | tar -xz
cd x402-gonka
go run ./cmd/x402-gonka pay --key "$GONKA_PRIVATE_KEY" --url {{BASE}}/demo
go run ./cmd/x402-gonka pay --key "$GONKA_PRIVATE_KEY" --url {{BASE}}/demo --asset usdcThe archive is on Source. Flags are on CLI. What the signer builds is on Agents & buyers.
3. Call the facilitator
Sellers do not talk to the chain themselves. Discover kinds, then POST /settle after the client retries with PAYMENT-SIGNATURE.
curl -sS {{BASE}}/supported
curl -sS {{BASE}}/discovery/resourcesHow to emit 402 from your own API is in Sellers. Registered paid URLs are on Resource listing. Request and response bodies are in HTTP API.
Prerequisites
| Go | A local Go toolchain to go run the source from this host. See Source. |
|---|---|
| Wallet | A gonka1… address. GG Wallet, Keplr, or a hex key from x402-gonka keygen. |
| Funds | Enough GNK or bridged USDC to cover the advertised amount. Demo prices are tiny (see accepts). |
| RPC | The facilitator uses rpc.gonka.gg. Buyers can use the same URL. No API key required. |
| Account | The paying address must already exist on-chain (it has received a transfer at least once) so sequence and account number can be queried. |