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

Installation

Quick Start


Accessing Payment Info

Payment information is stored in the Elysia store:

With Schema Validation

Combine payment middleware with Elysia’s schema validation:

Type Safety

For full TypeScript support, type your Elysia instance:

Route Configuration

For per-route requirements, use routeAwarePaymentMiddleware:

Tips

USDC on Base uses 6 decimals. 1 USDC = 1000000n as a bigint.
Elysia’s store is shared across all middleware. Payment info is available in any route after the middleware runs.

More Information

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