# Red Cup Engineering > x402 seller engineering, Belnap four-valued HTTP, content-addressed evidence and ActivityPub publishing: how Red Cup builds web infrastructure for agents. Red Cup Engineering is the engineering company of the 561 Group. It builds and operates web infrastructure for software agents: an x402 payment seller with 130 per-call offers, HTTP status read in Belnap's four truth values, content-addressed names for evidence, and an ActivityPub publication provider. These articles explain each design with real endpoints, headers, status codes and code from the source. ## Articles - [How an x402 payment works, step by step, from a real 402 response](https://engineering.561.group/how-an-x402-payment-works/): Decode a live x402 v2 challenge header by header: the 402, PAYMENT-REQUIRED, the signed EIP-3009 authorization, settlement and the receipt. - [How this site is built: TUFTE, llms.txt, JSON-LD and a build that refuses broken pages](https://engineering.561.group/how-this-site-is-built-tufte/): How a Markdown folder becomes pages, llms.txt, Markdown twins, JSON-LD with an ni: identifier and feeds, and why the build refuses broken pages. - [Math on the web without JavaScript: LaTeX to MathML in Markdown, with prices left alone](https://engineering.561.group/mathml-without-javascript-markdown/): Render LaTeX in Markdown to MathML server-side with temml, keep TeX as an annotation, and use Pandoc's dollar rules so $9.00 and $12.00 never become math. - [What an x402 seller should do that the spec doesn't require](https://engineering.561.group/x402-seller-design/): Eight seller behaviors beyond the x402 spec, each running on a live endpoint: refuse before charging, recover purchases, pin payees, one catalog. - [Red Cup Engineering: x402 sellers, agent-facing web infrastructure and content-addressed evidence](https://engineering.561.group/): Articles on x402 seller engineering, Belnap four-valued HTTP, content-addressed names, ActivityPub and publishing from the 561 Group's engineering company. - [Paraconsistent federation: an ActivityPub inbox that keeps contradictions instead of last-writer-wins](https://engineering.561.group/activitypub-paraconsistent-inbox/): An ActivityPub inbox that treats activities as claims and joins them in Belnap's knowledge order, so Create and Delete conflict instead of racing. - [Repeat x402 purchases with X-Payment-Recovery: get the same bytes after a dropped connection](https://engineering.561.group/x402-payment-recovery-header/): How an x402 seller returns an already-paid response when the buyer repeats the same signed request with a private X-Payment-Recovery token. - [Per-byte x402 pricing: deterministic workload bands in atomic USDC](https://engineering.561.group/x402-per-byte-pricing/): How a seller prices x402 calls by canonical JSON size: $0.0012 up to 4 KiB, 100 atomic units per further band, measured on the live 402 quotes. - [Sign-in-with-X on an x402 402: stateless wallet login for returning agents](https://engineering.561.group/x402-sign-in-with-x/): How an x402 seller attaches a CAIP-122 sign-in challenge to its 402, verifies EIP-191 and EIP-1271 proofs with stateless HMAC nonces, and grants wallets access. - [Belnap four-valued logic as an API: knowledge join, truth join, negation and conflation per call](https://engineering.561.group/belnap-four-valued-logic-api/): Eight pay-per-call endpoints implement Belnap's FOUR algebra over x402: join, meet, negate, conflate, convert and census, with truth tables and live examples. - [Refuse before you charge: how an x402 API stops billing agents for bad requests](https://engineering.561.group/refuse-before-you-charge-x402/): Validate the body and refuse with 400, 415 or 422 before any 402 challenge, and cancel settlement if the handler fails. Real live responses included. - [Never trust the payee in a 402 challenge: buyer-side x402 payee verification](https://engineering.561.group/verify-x402-payee-buyer-side/): An x402 buyer must take the payee from its own authority, not the seller's 402 challenge. How an expectedPayTo check, a budget and quote-drift refusal work. - [One catalog, five machine faces: MCP, A2A, ActivityPub, llms.txt and x402 discovery](https://engineering.561.group/x402-one-catalog-machine-interfaces/): One 130-offer catalog compiles into x402 discovery, an MCP server, an A2A agent card, an ActivityPub outbox and llms.txt so agents find the same prices. - [ActivityPub for a publication: a Fedify provider with WebFinger, NodeInfo, signed inboxes and no unsigned mode](https://engineering.561.group/activitypub-publication-provider/): A Fedify-based ActivityPub provider for publications: WebFinger, NodeInfo 2.1, HTTP signatures, Data Integrity proofs and no unsigned inbox mode. - [Reading HTTP in four values: why a 402 is neither up nor down](https://engineering.561.group/http-status-four-valued-belnap/): A status page that reads each HTTP answer as Belnap's true, false, both or neither: 2xx is true, 401/402/403 is both, no answer is false. With live data. - [Content-addressed names: RFC 6920 ni: URIs over canonical CBOR, with worked hashes](https://engineering.561.group/content-addressed-names-ni-rfc-6920/): How the 561 Group names data: an RFC 6920 ni: URI of the SHA-256 of NFC-normalized, deterministic CBOR, so key order and Unicode form never change an address. ## Machine interfaces - [x402 discovery (market.561.group)](https://market.561.group/.well-known/x402): Machine-readable list of the 130 paid offers, priced in USDC on Base (eip155:8453). - [Market catalog](https://market.561.group/v1/catalog): Every offer with its input schema, example, price and content-addressed SKU. - [OpenAPI](https://market.561.group/openapi.json): OpenAPI 3.1 derived from the same catalog used for execution. - [A2A agent card](https://market.561.group/.well-known/agent-card.json): Agent card listing one skill per offer. - [Estate reading](https://561.group/estate.json): Live probe of every public 561 Group node, read in Belnap's four values. - [This site's resources](https://engineering.561.group/resources.json): Reusable engineering resources with package names and versions. ## 561 Group - [561 Group](https://561.group/): The Group's public face and live estate reading. - [Science](https://science.561.group/): Research publications of the Group. - [Operations](https://operations.561.group/): How the Group runs its enterprises. - [Services](https://services.561.group/): Services the Group offers. - [Market](https://market.561.group/): Per-call machine-buyable operations paid over x402. ## Feeds and discovery - [Sitemap](https://engineering.561.group/sitemap.xml): every page with last-modified dates - [RSS feed](https://engineering.561.group/feed.rss.xml) - [Atom feed](https://engineering.561.group/feed.atom.xml) - [JSON Feed](https://engineering.561.group/feed.json) - [Full text](https://engineering.561.group/llms-full.txt): every article as Markdown in one file - [Search](https://engineering.561.group/search/): query with ?q= - Fediverse: @engineering@engineering.561.group (https://engineering.561.group/actors/engineering)