Accept x402 payments

Save the three X402 values in Project Settings → Secrets. /api/public/x402/demo sells a test JSON resource only; it does not paywall chat or sell AI tokens. No API key is needed for the Naven x402 seller flow.

  • X402_PAY_TO: owner's PUBLIC nonzero receiving EVM address, never a private key, provider signer or example receiver
  • X402_FACILITATOR_URL=https://facilitator.naven.network
  • X402_PRICE_USDG_BASE_UNITS: positive integer, 6 decimals; 10000 = 0.01 USDG is an example only, not an activated price

Evidence reviewed 2026-10-24: https://docs.naven.network/getting-started/seller-server-guide and https://docs.naven.network/demo/robinhood-x402 explicitly document exact V2 canonical USDG on eip155:4663. Only the exact Naven URL may omit the optional advertised asset list when the live matching kind exists; explicit exclusion fails closed. Custom facilitators must explicitly advertise USDG.

GET /api/public/x402/demo?status checks configuration, token/domain and live facilitator capabilities without signing or settling. It distinguishes missing/invalid configuration, token unavailability, unreachable/unsupported facilitator and ready for a paid test. Readiness or an unpaid 402 challenge does NOT prove funded settlement. Signed payloads and the exact AuthorizationUsed nonce plus Transfer receipt remain mandatory.