Features

Everything You Need to Monetize APIs

A fullstack SDK for JavaScript. From one-line integration to enterprise security, Atomic Rail handles the complexity so you can focus on building.

Core Features

Everything you need to monetize APIs with crypto payments

< 5 min setup

One-Line Integration

Wrap any Next.js API route with withUsageGate and start accepting payments immediately. No complex setup, no payment processor integrations.

Live updates

Real-Time Metering

Every paid request is tracked instantly with payer address, price, timestamp, and status. See your revenue as it happens.

SHA-256

HMAC-Signed Events

Tamper-proof usage records with cryptographic signatures. We verify before storing, ensuring audit trails you can trust.

Real-time

Analytics Dashboard

Real-time insights into revenue, success rates, unique payers, and usage patterns. Filter by action, time range, or wallet.

0% fees

Direct Wallet Payments

Payments flow directly to your wallet via x402. No intermediaries, no payment processors, no chargebacks. Keep 100%.

Unlimited

Multi-Project Support

Manage multiple projects with separate credentials, usage tracking, and analytics. Perfect for agencies and platforms.

Multi-Chain Support

Accept payments on your users' preferred blockchain

Base

EVM
MainnetSepolia

Ethereum

EVM
MainnetSepoliaGoerli

Arbitrum

EVM
OneNovaSepolia

Optimism

EVM
MainnetSepolia

Polygon

EVM
MainnetMumbai

Solana

Solana
MainnetDevnet

More chains coming soon. Request your preferred chain on GitHub.

Deep Dive into Features

Explore how each feature works under the hood

x402 Protocol

Seamless Payment Flow

The x402 protocol handles payment negotiation automatically. Users pay directly to your wallet - no intermediaries, no chargebacks, instant settlement.

  • Automatic 402 Payment Required responses
  • Direct wallet-to-wallet transfers
  • Support for USDC and native tokens
  • Built-in payment verification
  • Works with any x402-compatible client
1

User calls /api/premium

2

x402 returns 402 Payment Required

3

User pays → Your wallet

4

API responds with premium content

Usage Metering

Track Every Request in Real-Time

Non-blocking event emission means zero latency impact on your API. Events are signed, verified, and stored with full audit trails.

  • Sub-millisecond event emission
  • Automatic idempotency handling
  • Payer wallet attribution
  • Custom metadata support
  • Export data via API
Usage Event
{
  "eventId": "evt_1a2b3c...",
  "projectId": "proj_abc123",
  "actionId": "premium-api",
  "price": "0.001",
  "payerAddress": "0x742d...",
  "status": "success",
  "timestamp": 1702847293,
  "signature": "hmac-sha256..."
}
Enterprise Security

Cryptographically Verified Events

Every usage event is signed with HMAC-SHA256 using your project's secret key. Invalid signatures are rejected before storage.

  • HMAC-SHA256 event signing
  • Per-project secret rotation
  • Timing-safe signature comparison
  • Immutable audit logs
  • SOC 2 compliant infrastructure

HMAC-SHA256

Payload Signature

Verified
sig_f7e32d5b6e1c9a0f4d8b7c6a5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d
EVENT_INGEST_OKTIMESTAMP: 2025.12.29
Analytics

Insights That Drive Growth

Understand your API usage patterns, identify top payers, track conversion rates, and optimize your pricing strategy.

  • Real-time event streaming
  • Revenue by endpoint breakdown
  • Unique payer analytics
  • Success/failure rate tracking
  • Custom date range filtering
Analytics Dashboard

Total Events

12,847

Success Rate

99.2%

Revenue

$1,284

Action Registry

Your API's Control Plane

Manage your infrastructure without redeploying code. The Action Registry lets you control unit economics, networks, and status from a single UI.

  • Dynamic pricing updates
  • Multi-network configuration
  • Emergency 'Kill Switch'
  • Ghost action auto-discovery
  • Idempotency TTL management

Action Registry

Mainnet
Active

premium-generate

Detected 2 mins ago

image-upscale

$0.05 • Base Mainnet

Update Price

$0.10$0.15
Interactive Playground

Verify Before You Deploy

Test your integration end-to-end without real funds. The Playground simulates the full x402 lifecycle to ensure your HMAC signing and ingestion are perfect.

  • Real-time simulation logs
  • HMAC signature verification
  • Request/Response inspection
  • Bypass payment with headers
  • Zero-cost integration testing
Simulation Console
Verified
14:02:12INFOIncoming request: POST /api/generate
14:02:12GATEX-Atomic-Simulation: true detected
14:02:12AUTHHMAC signature verified successfully
14:02:13METEREvent queued for Action: premium-gen
>Listening for events...
Run Simulation

Simple to Integrate, Powerful to Scale

See how easy it is to add usage gating to your API

Create a central gate instance for your project

import { AtomicGate } from "@atomic-rail/usage-gate";

export const gate = new AtomicGate({
  projectId: process.env.METER_PROJECT_ID!,
  hmacSecret: process.env.METER_HMAC_SECRET!,
  sellerWallet: "0x...",
  debug: true,
});

Why Atomic Rail?

See how we compare to other API monetization solutions

Feature
Stripe Metering
Custom Solution
Atomic RailBest
Setup time
Days
Weeks
5 minutes
Transaction fees
2.9% + 30¢
Gas only
0%
Crypto payments
Limited
Build it
Native
Real-time analytics
Delayed
Build it
Instant
Multi-chain support
No
Complex
EVM + Solana
Usage verification
Trust-based
Build it
HMAC-signed
Payment settlement
2-7 days
Instant
Instant

Get Started in Minutes

From zero to monetized API in 4 simple steps

01

Install the Package

Add usage-gate and x402-next to your Next.js project.

bun add @atomic-rail/usage-gate x402-next
02

Create a Project

Sign up and create a project to get your credentials.

03

Configure Your Route

Wrap your API handler with withUsageGate.

export const GET = withUsageGate(config, handler);
04

Start Earning

Deploy and watch payments flow to your wallet.

Ready to Monetize Your APIs?

Join developers who are earning from their APIs with crypto payments.

No credit card required. Start with 10,000 free events.