> ## Documentation Index
> Fetch the complete documentation index at: https://ifdocdemo.lumivescence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> The InFlow SDKs for Node.js, Python, Go, and Rust: packages, install commands, runtime versions, supported features, and examples.

The InFlow SDKs implement InFlow Payments (MPP and x402) for sellers and buyers in four languages. Each SDK also has a seller module for Visa Trusted Agent Protocol (TAP) verification.

| Language | Repository | Package | Runtime | Latest version |
| - | - | - | - | - |
| Node.js and TypeScript | `inflowpayai/inflow-node` | `@inflowpayai/*` on npm | Node 22 or later | See [the packages](#nodejs-and-typescript) |
| Python | `inflowpayai/inflow-python` | `inflowpay` on PyPI | Python 3.11 or later | <img src="https://img.shields.io/pypi/v/inflowpay?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest inflowpay version" noZoom style={{ display: "inline", margin: 0 }} /> |
| Go | `inflowpayai/inflow-go` | `github.com/inflowpayai/inflow-go` | Go 1.26 or later | <img src="https://img.shields.io/github/v/tag/inflowpayai/inflow-go?sort=semver&label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest inflow-go version" noZoom style={{ display: "inline", margin: 0 }} /> |
| Rust | `inflowpayai/inflow-rust` | `inflow-*` crates on crates.io | Rust 1.93 or later | <img src="https://img.shields.io/crates/v/inflow-mpp-seller?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest inflow crates version" noZoom style={{ display: "inline", margin: 0 }} /> |

All four SDKs are before version 1.0. A minor version can contain incompatible API changes. A patch version contains only compatible fixes. InFlow supports the latest stable release of each SDK.

For Enrollment (AEP) and Discovery (ODP), use the SDKs from the foundations of those protocols. See [AEP and ODP SDKs](#aep-and-odp-sdks).

## Environments

Each SDK takes an environment value. The default is production.

| Environment | API host |
| - | - |
| Sandbox | `https://sandbox.inflowpay.ai` |
| Production | `https://api.inflowpay.ai` |

The environment must match the dashboard that issued the API key. Every SDK reads the key from `INFLOW_API_KEY` in its examples. MPP sellers also need `MPP_SECRET_KEY`.

## Node.js and TypeScript

| Package | Role | What it contains | Latest |
| - | - | - | - |
| `@inflowpayai/x402` | Shared | Core types and an HTTP client for x402. | <img src="https://img.shields.io/npm/v/@inflowpayai/x402?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/x402 version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/x402-seller` | Seller | A facilitator client and a seller client. | <img src="https://img.shields.io/npm/v/@inflowpayai/x402-seller?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/x402-seller version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/x402-buyer` | Buyer | A subclass of the foundation `x402Client` for buyers. | <img src="https://img.shields.io/npm/v/@inflowpayai/x402-buyer?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/x402-buyer version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/mpp` | Shared | MPP definitions, wire types, a codec, and an HTTP client. | <img src="https://img.shields.io/npm/v/@inflowpayai/mpp?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/mpp version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/mpp-seller` | Seller | The InFlow, Tempo, Stripe, and Visa CARD seller methods for `mppx`, InFlow subscriptions, and more than one charge on one endpoint. | <img src="https://img.shields.io/npm/v/@inflowpayai/mpp-seller?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/mpp-seller version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/mpp-buyer` | Buyer | The InFlow buyer method for `mppx`, with a buyer endpoint driver. | <img src="https://img.shields.io/npm/v/@inflowpayai/mpp-buyer?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/mpp-buyer version" noZoom style={{ display: "inline", margin: 0 }} /> |
| `@inflowpayai/tap-seller` | Seller | Local verification of trusted-agent request signatures. | <img src="https://img.shields.io/npm/v/@inflowpayai/tap-seller?label=latest&labelColor=1A1A1A&color=CAFA3A" alt="Latest @inflowpayai/tap-seller version" noZoom style={{ display: "inline", margin: 0 }} /> |

| Use case | Command |
| - | - |
| x402 seller on Express | `pnpm add @inflowpayai/x402-seller @x402/express @x402/core @x402/extensions express` |
| x402 seller on Fastify | `pnpm add @inflowpayai/x402-seller @x402/fastify @x402/core @x402/extensions fastify` |
| x402 seller on Next 16 App Router | `pnpm add @inflowpayai/x402-seller @x402/next @x402/core @x402/extensions next` |
| x402 buyer | `pnpm add @inflowpayai/x402-buyer @x402/core` |
| MPP seller | `pnpm add @inflowpayai/mpp-seller mppx@^0.8.17` |
| MPP buyer | `pnpm add @inflowpayai/mpp-buyer mppx@^0.8.17` |

The packages declare `engines.node: >=22.0.0`.

## Python

The distribution and the import namespace are both `inflowpay`. Extras select the protocols and the framework.

| Extra | What it adds |
| - | - |
| `mpp` | The MPP payment library. |
| `x402` | The x402 payment library. |
| `evm`, `svm` | The x402 external-wallet dependencies. |
| `mcp` | The MCP dependencies for both protocols. |
| `fastapi` | The optional FastAPI integration. |
| `tap` | TAP seller verification. |

| Use case | Command |
| - | - |
| MPP seller | `pip install 'inflowpay[mpp,fastapi]' uvicorn` |
| x402 seller | `pip install 'inflowpay[x402,fastapi]' uvicorn` |
| MPP buyer | `pip install 'inflowpay[mpp]'` |
| x402 buyer | `pip install 'inflowpay[x402]'` |
| TAP seller | `pip install 'inflowpay[tap,fastapi]' uvicorn` |

The clients do not depend on FastAPI. They also work with other asynchronous frameworks. The HTTP client is `httpx`.

## Go

```bash theme={null}
go get github.com/inflowpayai/inflow-go@v0.3.1
```

| Package | Role |
| - | - |
| `mpp/seller` | MPP seller. `Protect` returns a standard `http.Handler`. |
| `mpp/buyer` | MPP buyer. |
| `x402/seller` | x402 seller, with the upstream `nethttp` middleware. |
| `x402/buyer` | x402 buyer. `x402/buyer/eip7702` adds EIP-7702 support. |
| `tap/seller` | TAP seller verification. |

The Go SDK works with `net/http`. Set `Environment: inflow.Sandbox` for tests.

## Rust

| Crate | What it contains |
| - | - |
| `inflow-core` | Shared code for the other crates. |
| `inflow-mpp` | Shared MPP code. |
| `inflow-mpp-seller` | Signed offers, validation, and settlement for InFlow, Tempo, Stripe, and Visa CARD charges. |
| `inflow-mpp-buyer` | An explicit credential workflow for MPP challenges. |
| `inflow-x402` | Shared x402 code. |
| `inflow-x402-seller` | x402 seller. |
| `inflow-x402-buyer` | x402 buyer. |
| `inflow-x402-axum` | Optional Axum and Tower protected endpoints that use the upstream x402 middleware. |
| `inflow-tap-seller` | TAP seller verification. |

Add the crates to `Cargo.toml`.

```toml theme={null}
[dependencies]
inflow-mpp-seller = "0.4.0"
```

For an MPP seller, add `inflow-mpp-seller`, `inflow-mpp`, and `serde_json`. The MPP seller handler runs inside any HTTP framework that uses the Tokio runtime of your application.

## Feature differences

Check this table before you choose a language.

| Feature | Node.js | Python | Go | Rust |
| - | - | - | - | - |
| MPP seller subscriptions | Yes | No | Yes | No |
| More than one InFlow offer on one endpoint | Yes | No | Yes | Not stated |
| MPP over MCP | Yes, for buyers | Yes, for buyers | No | Yes, with your own MCP client |
| Stripe and Visa CARD seller methods | Yes | Yes | Yes | Yes |
| Framework integration | Express, Fastify, Hono, Next.js | FastAPI | `net/http` | Axum and Tower, for x402 |

Stripe acceptance is for sellers only. The InFlow buyer SDKs do not create Stripe tokens. The Rust x402 Axum layer rejects automatic `upto` endpoints, because the upstream middleware settles the full authorized amount.

## Examples

Each repository has runnable sandbox examples in its `examples` folder.

| Language | Examples |
| - | - |
| Node.js | `x402-seller-express`, `x402-seller-hono`, `x402-seller-fastify`, `x402-seller-next`, `x402-buyer-fetch`, `x402-buyer-axios`, `x402-buyer-x402-evm`, `x402-buyer-x402-svm`, `x402-facilitator`, `mpp-aep-seller-express`, `mpp-card-seller-express`, `mpp-seller-express`, `mpp-seller-hono`, `mpp-buyer-fetch`, `mpp-buyer-manual` |
| Python | `examples.mpp_seller`, `examples.mpp_buyer`, `examples.x402_seller`, `examples.x402_buyer`, `examples.tap_seller` |
| Go | MPP seller, MPP buyer, x402 seller, x402 buyer, and TAP seller |
| Rust | `mpp-seller`, `mpp-buyer`, `x402-seller`, `x402-buyer`, `payment-status`, `tap-seller` |

Run a Python example from the repository with `uv run --locked python -m examples.mpp_seller`. Run a Rust example with `cargo run --locked -p inflow-examples --bin mpp-seller`. Run a Go example with `go run ./examples/mpp-seller`.

`mpp-aep-seller-express` puts AEP enrollment in front of an MPP endpoint. `mpp-card-seller-express` accepts USD payments with Visa network tokens.

The `mpp-seller-express` and `mpp-seller-hono` examples serve these endpoints on `http://localhost:3000`.

| Endpoint | Price in the MPP example |
| - | - |
| `GET /api/widgets` | 0.01 USDC |
| `POST /api/upload` | 0.10 USDC |
| `GET /api/subscribe` | 1.00 USDC for each month |
| `GET /api/checkout` | 1.0 USD or 0.0095 USDC |
| `GET /free` | Free |

## AEP and ODP SDKs

Use these SDKs for Step 2 (Enrollment) and Step 3 (Discovery) of the seller integration.

| Protocol | Go | Java | Node.js | Python | Rust |
| - | - | - | - | - | - |
| ODP | `odp-go` | `odp-java` | `odp-node` | `odp-python` | `odp-rust` |
| AEP | `aep-go` | `aep-java` | `aep-node` | `aep-python` | `aep-rust` |

The ODP SDKs are in the `offering-protocol` organization on GitHub. The AEP SDKs are in the `aep-foundation` organization.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.