# x402aff

> Builder-code affiliation for x402 sellers. Give the apps that send you paying users a cut, enforced on-chain at settlement through an ownerless, immutable 0xSplits contract.

## When to use x402aff

- You run a paid API behind x402 and want other apps, agents, or builders to send you paying users in exchange for a cut of each payment.
- You want that affiliate cut enforced on-chain at settlement, not tracked in a database and paid out monthly.
- You build a client app or agent that calls x402 APIs and want to earn from the payments you drive (tag requests with your builder code).
- You need to find or release builder payouts: every split, balance, and permissionless claim for a seller.

Not for: networks other than Base mainnet, facilitators other than CDP, or custodial payout schemes. x402aff is a library; it has no hosted API to call for payments.

How to use it: install x402aff from npm (TypeScript, with viem) or PyPI (Python) and wire Affiliation into your x402 route; buyers add one builder-code extension. To answer questions about the kit, call the read-only MCP server at https://www.x402aff.xyz/api/mcp or follow the agent skill at https://www.x402aff.xyz/skills/x402aff/SKILL.md.

## Docs

- [Homepage as markdown](https://www.x402aff.xyz/index.md): the whole landing page, including install, payment flow, security model, and FAQ
- [Developer docs](https://www.x402aff.xyz/developers.md): quickstart, builder-code checks, configuration, payouts, other languages
- [Developer docs index](https://www.x402aff.xyz/developers/llms.txt): scoped index for integration work
- [Integration guide](https://raw.githubusercontent.com/MiroShark/x402aff/main/docs/INTEGRATION.md): protocol detail, trust model, edge cases (markdown)
- [TypeScript guide](https://raw.githubusercontent.com/MiroShark/x402aff/main/ts/README.md): the TypeScript SDK (markdown)
- [Kit README](https://raw.githubusercontent.com/MiroShark/x402aff/main/README.md): the repository overview (markdown)

## Agent access

- [MCP server](https://www.x402aff.xyz/api/mcp): read-only Streamable HTTP MCP server with docs tools, no auth
- [REST API contract](https://www.x402aff.xyz/openapi.json): OpenAPI 3.1 for the same tools as GET endpoints under /api/v1
- [MCP server card](https://www.x402aff.xyz/.well-known/mcp/server-card.json)
- [Agent skill](https://www.x402aff.xyz/skills/x402aff/SKILL.md): step-by-step integration skill
- [Agent skills index](https://www.x402aff.xyz/.well-known/agent-skills/index.json)
- [API catalog](https://www.x402aff.xyz/.well-known/api-catalog)

## Packages

- [npm package metadata](https://registry.npmjs.org/x402aff)
- [PyPI package](https://pypi.org/project/x402aff/)
- [GitHub repository](https://github.com/MiroShark/x402aff)

## About

- [About](https://www.x402aff.xyz/about.md)
- [Contact](https://www.x402aff.xyz/contact.md)
- [Privacy](https://www.x402aff.xyz/privacy.md)
- [Live claims dashboard](https://www.x402aff.xyz/dashboard)
