// HTTP4K PRO

Machine-to-machine payments for HTTP and AI agents.

Add payment gates to any HTTP endpoint or MCP tool with X402 and Machine Payments Protocol. Client and server filters, route-level security, testable fakes, and MCP integration - all with familiar http4k patterns.

Highlights

X402
Protocol

Full x402 protocol support with client-side automatic 402 handling, server-side payment verification and settlement via facilitator services, and route-level X402Security.

Machine
Payments Protocol

Flexible payment protocol with pluggable payment methods. No facilitator needed - implement MppSigner and MppVerifier directly for any provider including Stripe and crypto.

MCP
Integration

Payment-gated MCP tools and resources. Add protocol-level and tool-level payment filters to your MCP servers for automated machine-to-machine commerce between AI agents.

Client
Filters

Automatic 402 handling for both X402 and MPP. Your HTTP client detects payment-required responses, signs the challenge, and retries - transparent to your application code.

Server
Filters

Protect any endpoint with payment requirements. Verify and settle payments before allowing access. One filter wrapping your handler - no changes to business logic.

Route
Security

X402Security and MppSecurity integrate with http4k’s routing DSL for fine-grained, per-route payment protection. Different prices for different endpoints.

Testable
Fakes

Built-in FakeX402Facilitator for testing payment flows without real transactions. Test your entire payment integration in-memory with no external services.

Transactional
Outbox

(Coming soon) Reliable message delivery with database consistency. Ensure payment events, notifications, and downstream messages are never lost, even when services fail.

Getting started with Internet Payments

Add the X402 or MPP dependency. Protect a server endpoint with a payment filter - one line wrapping your handler.

Add the client filter to automatically handle 402 responses. Your client signs payment challenges and retries transparently.

Use X402Security or MppSecurity for per-route payment protection in your http4k routing DSL.

Test everything in-memory using the built-in FakeX402Facilitator. No real transactions, no external services, full-speed tests.

// PRICING

Pricing

http4k Internet Payments Pack is available under the http4k Commercial License. Free for qualifying small businesses (under $1M ARR), non-commercial, non-profit, and research use. Checkout is handled securely by Stripe.

All http4k Pro modules are also automatically included with the Enterprise Edition. Need bulk seats, team licensing, or custom terms? Get in touch.

pumb
scarf