> For the complete documentation index, see [llms.txt](https://docs.bitbadges.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitbadges.io/token-standard/bb-402.md).

# BB-402

Gate any API behind on-chain token ownership using the standard HTTP 402 status code. Built for AI agents, bots, and any programmatic client that needs to authenticate and pay for services.

## Pages

| Page                                                               | Description                                                                     |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| [Overview](/token-standard/bb-402/overview.md)                     | How it works, why it matters, quickstart code                                   |
| [Full Specification](/token-standard/bb-402/spec.md)               | Complete protocol spec, security considerations, x402 comparison                |
| [Code Snippets](/token-standard/bb-402/middleware-recipes.md)      | Server-side verification snippets: signatures, ownership checks, nonces         |
| [Collection Recipes](/token-standard/bb-402/collection-recipes.md) | How to configure collections for auth patterns: soulbound, revocable, 2FA, bans |
