Skip to main content
StellarX402 brings the x402 payment protocol to the Stellar blockchain, enabling any API or web service to charge per HTTP request. Clients — whether browsers, mobile apps, or AI agents — pay in USDC and receive the resource, all within a single HTTP round-trip. No signup flows, no subscription management, no billing integration.

Quick Start

Build a payment-gated endpoint and make your first paid request in minutes.

How It Works

Understand the x402 payment flow from HTTP request to Stellar settlement.

Protect an Endpoint

Add x402 middleware to your Express API and start charging per request.

AI Agent Payments

Let AI agents discover and pay for services autonomously within spending limits.

Why StellarX402?

StellarX402 turns any endpoint into a monetizable service. There’s no billing dashboard to set up, no platform account for your customers to create, and no invoicing to manage. A client sends a payment-signed request; Stellar settles the transaction in roughly 5 seconds; your server delivers the resource.

No Accounts Required

Clients pay directly with a compatible wallet — no registration or API key management.

5-Second Settlement

Stellar finalizes transactions in ~5 seconds, making real-time micropayments practical.

AI-Native

Designed for AI agents that need to autonomously discover and pay for services.

Any SEP-41 Token

Accept USDC or any SEP-41 compliant token on Testnet or Mainnet.

Sponsored Fees

Facilitators sponsor Stellar network fees so your clients only pay the resource price.

Open Protocol

Built on the open x402 standard, governed by the x402 Foundation under Linux Foundation.

Get Started

1

Install the x402 middleware

Add the x402 npm package to your Node.js API server.
2

Protect an endpoint

Wrap your route handler with the x402 middleware, set a price, and configure your Stellar address.
3

Choose a facilitator

Point your server at a facilitator — use the Coinbase facilitator on Testnet for zero-configuration testing, or deploy your own.
4

Make a paid request

Use a compatible wallet (Freighter, Albedo, or any auth-entry signing wallet) to pay and access protected content.
Not sure where to start? Follow the Quick Start guide to build a working paywall in under 10 minutes.