---
title: "Deploy x402 Commerce"
description: "Agent-to-Agent Micropayment Infrastructure with x402 v2 and MCP server"
category: "AI/ML"
url: https://railway.com/deploy/x402-commerce
---

# Deploy x402 Commerce

Agent-to-Agent Micropayment Infrastructure with x402 v2 and MCP server

**[Deploy x402 Commerce on Railway](https://railway.com/template/x402-commerce)**

- **Creator:** Erick Rosas's Projects
- **Category:** AI/ML

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### x402-mcp

- **Source:** https://github.com/Disseveru/x402-mcp
- **Start command:** `node dist/mcp/server.js`
- **Health check:** /health
- **Public domain:** Yes

### Redis-WvMX https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host x402 Commerce

Agent-to-Agent Micropayment Infrastructure with x402 v2 payment protocol, monetized MCP server, and observability stack.

## About Hosting x402 Commerce

Deploy a complete monetized Model Context Protocol (MCP) server + observability stack with x402 v2 payment protocol, 30+ monetized agent tools, USDC settlement on Base, and real-time telemetry.

## Why Deploy x402 Commerce

- **x402 Transport Protocol v2**: Native HTTP 402 challenge & cryptographic proof settlement for AI agent micropayments.
- **Bazaar Discovery Layer**: Machine-readable capabilities manifest at `/.well-known/bazaar.json`.
- **Model Context Protocol (MCP)**: Works natively with Gemini, Claude, Grok, and custom LLM agent frameworks.
- **Base & Solana USDC Settlement**: Support for instant settlement via Base Mainnet (EIP-155:8453) and Solana.

## Common Use Cases

- Autonomous Agent-to-Agent (A2A) Commerce.
- Monetized MCP tool execution.
- Automated API paywalls and micro-settlements.

## Dependencies for x402 Commerce

- Node.js & TypeScript application server.
- Redis for verifier state and nonce replay protection.
- Postgres for payment ledger.

### Deployment Dependencies

- Redis
- Postgres
- InfluxDB
- Loki
- OTEL Collector
- MinIO


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/x402-commerce
