How Privy enables agentic commerce with x402 and Stripe machine payments
Madeleine Charity
|Feb 20, 2026

Start building with Privy and Stripe's machine payments with our starter repo.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Privy has been building toward agentic wallets for some time now: wallets designed to operate server-side, sign transactions on behalf of software, and move value autonomously within human-defined guardrails. We’ve seen meaningful innovation in this direction, particularly in trading and other crypto-native environments. But broad, everyday commerce has remained out of reach.
An agent being able to sign a transaction is not the same as an agent being able to purchase something tangible in the real world. For agentic systems to work in practice, two things must be true: agents need a safe, programmable way to hold and move funds, and merchants need a straightforward way to accept machine-initiated payments without re-architecting their financial stack.
With Stripe’s machine payments and the x402 protocol, that second condition is beginning to take shape.
Last year, Privy shipped a reference recipe that made it easy to experiment with programmatic payments through a lightweight client-side integration compatible with x402 facilitators. It demonstrated that machine-initiated payments could be embedded directly into application flows.
x402 pairs naturally with programmable spend controls, which is where Privy’s policy engine becomes critical. Developers can define per-domain spend limits, agent-specific permissions, or workflow-level approvals that run off-chain but are enforced at signing time. The result is autonomy within clearly defined boundaries.
With Stripe’s recent launch of machine payments, we extend that model in our latest demo.
In this implementation, a Privy-powered agent wallet can pay any Stripe merchant that supports x402. The flow is simple:
Create an agent
Provision it with its own wallet
Fund it with USDC
Define a spending policy
Let it transact autonomously

Each agent receives a dedicated non-custodial Privy wallet. The agent can initiate actions, but it never has direct access to private keys. Keys are only reconstituted inside secure enclaves when a transaction is signed.
Before a signature is produced, Privy evaluates the transaction against the defined policy. In the demo, that policy is a per-transaction cap. A $0.10 API call is approved. A $5.00 purchase is rejected. Transactions that exceed the defined rules are denied before funds can move.
Because authorization is created only within those boundaries, the agent is unable to overspend.
x402 embeds payment directly into the HTTP request cycle: a service responds with 402 Payment Required, an agent attaches a signed authorization, and the request completes programmatically. Payment becomes part of how software communicates.
Stripe’s machine payments make this model practical for merchants.
Rather than building bespoke crypto infrastructure, merchants can enable x402 through middleware while continuing to rely on Stripe for balance management, reporting, and payouts. Settlement happens in USDC on Base, funds land in the merchant’s Stripe balance, and gas abstraction removes network complexity. Low-value transactions make pay-per-request APIs viable within Stripe’s existing financial stack.
Merchants do not need to become crypto-native to participate. They can accept agent payments using systems they already trust.
If every Stripe merchant chose to accept machine payments, agentic commerce could, in theory, scale through Privy wallets today.
But infrastructure alone does not guarantee adoption.
Widespread agentic commerce introduces real product and operational questions. How do you prevent abuse or runaway usage? How should pricing work for programmatic access? What does a refund look like in a machine-to-machine flow? How do you reason about identity, rate limits, and monitoring when the “customer” is software?
These are core design decisions that teams will need to address before machine payments become standard.
What’s changed is that the underlying stack now exists:
Privy provides programmable wallets with enforceable guardrails.
x402 provides a payment-native protocol for machine interactions.
Stripe provides merchant-grade settlement and distribution.
Agentic commerce is now technically viable. The remaining work is product design and merchant education.
AI agents are advancing quickly. If they are going to participate meaningfully in the economy, they need wallets that can move real value within enforceable constraints.
Privy believes in a future of agentic payments, but not without control. We’re building the programmable wallet layer that allows builders to experiment with autonomy safely, and we’ll continue innovating at the boundary between capability and constraint. If you’re building in this space and thinking through these problems, we’d love to chat.