Skip to main content
Accept crypto payments in your Hono API with the Armory middleware.

Installation

Quick Start


Accessing Payment Info

Payment information is stored in the Hono context:

Protecting Specific Routes

Use path patterns to protect specific route groups:

Multi-Network Support

Accept payments across multiple networks:

Route Configuration

For route-specific configuration, use routeAwarePaymentMiddleware:

Tips

The amount parameter accepts human-readable strings like "1.0" for 1 token — no need to calculate decimals manually.
Hono’s middleware matching is pattern-based. Use /api/* to protect all API routes, or /premium/* for paid content only.

More Information

See @armory-sh/middleware-hono for full configuration options.