A live endpoint that charges for itself. Call it, get a 402,
pay in DigiDollar, get the data. Machine-payable, no account, no key.
GET /api/network with no payment.402 Payment Required with a fresh DigiDollar
invoice — an address, an amount, and an invoiceId.X-Payment: <invoiceId>.
The gateway asks its own node whether the invoice's address got paid, and if so,
releases a live DigiByte network snapshot.Payment is proven by the chain, checked against the gateway's own node — the caller is never trusted. Same design as dgb-x402, which powers it.
1. See the 402 and the invoice you'd pay:
# the paywall responds with where + how much to pay curl -i http://localhost:8402/api/network
2. Pay that invoice's DigiDollar address on testnet26 (need coins? grab free testnet DGB from the faucet), then retry with the id:
# release the data by proving you paid curl http://localhost:8402/api/network \ -H "X-Payment: <invoiceId-from-step-1>"
An AI agent does all of this automatically — see dgb-tollgate, the autonomous paying client.
Part of github.com/dgb-tools — open-source agent-commerce tools for DigiByte. · Testnet faucet