Key Takeaways
- Restock is a sample agent that pays for real purchases. It runs in Slack on Managed Deep Agents, finds products, builds a cart, and checks out through an API that supports the Machine Payments Protocol (MPP).
- Payments stay safe and within budget. Link, Stripe's consumer wallet, handles the payment, so the agent never sees a card number. The user approves a spend request up to a set amount, and the agent can't spend above it.
- Build your own agent that can pay. Start from Restock's sample code, and let us know what you build.
Agents are already good at finding things to buy. Paying is harder: it moves real money, needs credentials the model should never see, and is hard to undo.
To show how to build an agent that pays, we built Restock, a sample office-supply agent that runs in Slack on Managed Deep Agents. It searches real products, builds a cart, and pays through Link, Stripe's consumer wallet, which gives agents the safest way to pay.
This post follows one request from the first message to the confirmed order:
We're running low on pens. Can you find a 12-pack of blue ink pens for the office, under $25 altogether?
Restock orders the pens for $22.18, fees included. Prices in this post are illustrative.
Choosing how to pay
An agent can pay by driving the retailer's checkout in a browser, but that's fragile. Pages change, sites block automated checkouts, and payment details have to be entered without exposing them to the model.
An API that supports the Machine Payments Protocol (MPP) avoids that: it tells the agent exactly what to pay and accepts the payment directly. The tradeoff is coverage, since the agent can only buy through MPP-enabled APIs. That list is growing, with tool aggregators like Apify and Mercator joining vertical ones like Zinc for retail. Restock uses Zinc, but the pattern doesn't depend on it.
Source: https://www.langchain.com/blog/agents-that-can-pay-with-stripe-link