Skip to main content
Armory is a TypeScript toolkit for x402 v2 payments that lets APIs require wallet-based payment over standard HTTP flows.
Armory targets x402 v2 wire compatibility so Armory clients and middleware can interoperate with Coinbase x402 SDK implementations.

What You Can Build

  • Paid API endpoints using middleware in Express, Hono, Bun, Elysia, and Next.js.
  • Wallet-based API clients using Viem, Ethers.js, and Web3.js.
  • Multi-network and multi-token payment flows with shared base logic.

How Armory Works

  1. A protected endpoint returns 402 with PAYMENT-REQUIRED.
  2. The client selects one option from accepts[] and signs a payment payload.
  3. The retried request sends PAYMENT-SIGNATURE.
  4. The server verifies/settles and returns data with PAYMENT-RESPONSE.

Start Here

Core Packages

  • @armory-sh/base: shared protocol types, encoding, and payment flow logic.
  • Middleware packages: route protection and payment verification.
  • Client packages: wallet integration and payment retries.
  • @armory-sh/extensions: optional protocol extensions.
  • @armory-sh/client-hooks: optional selection/logging hooks.

Supported Networks and Tokens

Armory supports Ethereum, Base, SKALE, and testnets listed in the protocol docs, with major payment tokens including USDC.

Next Step

Go to Key Concepts to understand the model before implementing server or client code.