agentic-payments

Implement x402 and MPP machine-to-machine payments on Stellar using USDC.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/JHAMILCALI/Stellar-Build --skill agentic-payments-jhamilcali
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agentic-payments
Source: https://github.com/JHAMILCALI/Stellar-Build/tree/main/.claude/skills/agentic-payments
Command: npx skills add https://github.com/JHAMILCALI/Stellar-Build --skill agentic-payments-jhamilcali

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and machine clients need a way to pay for API access programmatically, but setting up per-request or high-frequency payments on Stellar involves choosing between protocols, handling auth-entry signing, trustlines, fee sponsorship, and facilitator configuration. ## Core Features & Use Cases - x402 Paid APIs: Monetize an Express API with HTTP 402 payments via the OZ Channels facilitator, with fee-sponsored clients that need zero XLM. - MPP Charge Mode: Accept per-request USDC payments settled directly on-chain via SAC transfers, with no facilitator dependency and optional server-side fee payment. - MPP Channel Mode: Support high-frequency agents with off-chain cumulative commitments, requiring only two on-chain transactions (deposit and close) per session. - Use Case: An API provider wants to sell weather data to AI agents at $0.001 per call. They add the x402 payment middleware to their Express server, and agent clients pay automatically in USDC on testnet without holding any XLM. ## Quick Start Ask the AI to set up an x402-paid Express endpoint on Stellar testnet that charges 0.001 USDC per request using the OZ Channels facilitator.

Frequently Asked Questions about agentic-payments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monetize an Express API with x402 payments on Stellar?▼

Install @x402/express, @x402/core, and @x402/stellar, then add paymentMiddleware with a route config specifying scheme, price, network, and payTo address. Register an ExactStellarScheme with an HTTPFacilitatorClient pointing at OZ Channels, authenticated with a Bearer API key.

What is the difference between x402 and MPP for machine payments?▼

x402 settles each request on-chain through the OZ Channels facilitator, which sponsors fees so clients need zero XLM. MPP Charge settles per-request SAC transfers with no facilitator, while MPP Channel uses off-chain cumulative commitments for high-frequency agents with only two on-chain transactions.

Does the x402 Stellar client work in a browser?▼

The @x402/fetch client with createEd25519Signer targets Node and assumes a raw secret key, so it does not run directly in a browser. Run the x402 client server-side behind a proxy endpoint, or use Wallets-Kit or Freighter with custom auth-entry signing.

Why does my Stellar x402 payment fail with op_no_trust?▼

The op_no_trust error means an account lacks a USDC trustline. Both the payer and the payTo recipient account need a changeTrust operation for USDC before any payment, since the SAC transfer settles the underlying classic asset.

How do MPP payment channels handle high-frequency agent requests?▼

The client deploys a one-way channel contract, deposits USDC once, then signs cumulative off-chain commitments per request. The server closes the channel with a single on-chain transaction settling the running total, so hundreds of requests cost only two on-chain transactions.

Why does OZ Channels return 401 on Stellar testnet?▼

OZ Channels requires an API key on both testnet and mainnet. Generate one at channels.openzeppelin.com/testnet/gen for testnet, set it as OZ_API_KEY, and pass it via createAuthHeaders as an Authorization Bearer token for verify, settle, and supported requests.