Official TypeScript/Node.js SDKs for the InFlow payments platform - x402 and MPP (Machine Payments Protocol) integration for sellers and buyers.
inflow-node is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on aep, agentic-payments, ai-agents, fintech. It currently has 9 GitHub stars and 2 forks, and sits alongside related tools like moltpe-agent-payments, inflow-cli, piprail, sardis, sdk, x402-client.
Official Node.js SDKs for the InFlow payments platform.
Register a Seller account and create an API key in the InFlow dashboard, then pass environment to the SDK. That's the
only configuration you need — the SDK resolves the right endpoint internally (don't set baseUrl).
environment |
Register / get your API key at |
|---|---|
sandbox (testing) |
https://sandbox.inflowpay.ai |
production (live) |
https://app.inflowpay.ai |
For network egress allowlisting only: the SDK makes its outbound API calls to
https://sandbox.inflowpay.ai(sandbox) andhttps://api.inflowpay.ai(production). You never set these yourself.
This monorepo houses InFlow's open-source Node.js packages, organized by product. Every package, example, and product
doc folder uses a product prefix (x402-, …) so multiple products can coexist without ambiguity.
| Product | What it does | Docs |
|---|---|---|
| x402 | x402 protocol integration — facilitator client, seller helpers, buyer wrappers. | overview · architecture · wire format · extensions |
| mpp | MPP (Machine Payments Protocol) integration — InFlow and Tempo methods, seller/buyer drivers. | overview · architecture · wire format · extensions |
All packages publish under the @inflowpayai scope on npm and depend on @x402/core@^2.12.0 as a peer.
| Package | npm | Role |
|---|---|---|
@inflowpayai/x402 |
Core types + HTTP client | |
@inflowpayai/x402-seller |
Facilitator client + seller client + inflowAccepts helper |
|
@inflowpayai/x402-buyer |
InflowClient — foundation x402Client subclass for buyers |
The MPP packages publish under the same scope but declare mppx@^0.6.28 as their
peer instead of @x402/core:
| Package | npm | Role |
|---|---|---|
@inflowpayai/mpp |
Core: MPP Method definitions, wire types, codec, HTTP client |
|
@inflowpayai/mpp-seller |
Method.toServer + InFlow redeem/settle driver — accepting MPP |
|
@inflowpayai/mpp-buyer |
Method.toClient + InFlow buyer-endpoint driver — paying via MPP |
# Seller accepting MPP payments
pnpm add @inflowpayai/mpp-seller mppx
# Buyer paying via MPP
pnpm add @inflowpayai/mpp-buyer mppx
See the MPP product docs for the seller/buyer integration shape.
Sellers integrate via the foundation V2 middleware (paymentMiddlewareFromConfig from @x402/express, @x402/hono,
@x402/fastify, or @x402/next) and pass InFlow's facilitator client into its facilitatorClients array. See the
x402 quickstart for the integration shape.
Common installs:
# Seller in Express (foundation middleware + InFlow facilitator)
pnpm add @inflowpayai/x402-seller @x402/express @x402/core express
# Seller in Fastify
pnpm add @inflowpayai/x402-seller @x402/fastify @x402/core fastify
# Seller in Next 16 App Router
pnpm add @inflowpayai/x402-seller @x402/next @x402/core next
# Buyer (InFlow-signed paths only)
pnpm add @inflowpayai/x402-buyer @x402/core
# Buyer composing InFlow with foundation EVM and/or SVM signing
pnpm add @inflowpayai/x402-buyer @x402/core @x402/evm @x402/svm
See the x402 product docs for quickstarts.
Runnable end-to-end examples live in examples/. Start a seller, then run a buyer against it.
x402:
x402-seller-express — Express server with three protected routes.x402-seller-hono — same shape on Hono via @hono/node-server.x402-seller-fastify — same shape on Fastify; @x402/fastify mutates the Fastify
instance in place rather than returning middleware.x402-seller-next — Next 16 App Router; proxy.ts carries the InFlow wiring and Route
Handlers stay x402-free.x402-buyer-fetch — paying a protected endpoint with @inflowpayai/x402-buyer +
native fetch.x402-buyer-axios — paying a protected endpoint with @inflowpayai/x402-buyer +
axios.x402-buyer-x402-evm — foundation-only EVM buyer (no @inflowpayai/* imports)
paying an InFlow seller.x402-buyer-x402-svm — foundation-only SVM buyer paying an InFlow seller; same idea
on Solana devnet.x402-facilitator — InFlow facilitator as a foundation drop-in: vanilla
@x402/express seller + foundation-only EVM buyer, with no INFLOW_API_KEY (uses
createUnauthenticatedInflowFacilitator).MPP:
mpp-aep-seller-express — Express server applying AEP API-key authentication
before MPP payment enforcement on the same protected routes.mpp-seller-express — Express server accepting MPP payments via mppx's Express
adapter + InFlow's inflow seller method, plus a multi-currency /api/checkout route via
inflowChargesNodeListener.mpp-seller-hono — same shape on Hono via mppx/hono and @hono/node-server; the
multi-currency /api/checkout route uses inflowCharges on the core mppx/server instance.mpp-buyer-fetch — paying via MPP through a transparently polyfilled global fetch.mpp-buyer-manual — paying via MPP through the explicit, non-polyfill mppx.fetch.Node 22 LTS or newer at runtime; the packages ship engines.node: >=22.0.0. CI exercises Node 22 (maintenance LTS until
April 2027) and Node 24 (active LTS, April 2028 EOL). Node 20 went EOL on 2026-04-30 and is no longer supported.
For a tour of the monorepo itself — tooling, contributing, publishing — see docs/monorepo:
docs/ style guide.See SECURITY.md for disclosure. Examples under examples/ are illustrative and out of scope.
MIT.
Payment infrastructure for AI agents. Reference implementation: x402 + MPP + fiat.
A wallet for your agents to onboard and pay. Agentic MPP / x402 payments from your machine - CLI + MCP server.
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
The open authority layer + SDKs for AI-agent payments. Thin Python/TS clients, an MCP server, framework adapters (LangChain/CrewAI/Hermes/OpenClaw/…), and @sardis/reference — a pure policy simulator + AP2/TAP/x402 verifiers showing exactly how Sardis decides if an agent may spend. The hosted engine that moves money is private.
TypeScript SDK for Azeth — smart accounts, x402 payments, reputation, and service discovery
Client SDK for the Vybe x402 API. Pay-per-call USDC over HTTP and prepaid-credit WebSocket streaming for Vybe's Solana analytics API. Built for AI agents.
TypeScript Interface for Machine Payments Protocol
Alephant is an open-source AI Agent Gateway for routing, tracking, and controlling LLM usage across AI agents, members, and workflows, and for publishing agent capabilities as paid endpoints with x402 and MPP payment rails.
Specifications for the Machine Payments Protocol - powered by the "Payment" HTTP authentication scheme
Rust SDK for the Machine Payments Protocol
Website for the Machine Payments Protocol
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.