AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Agents that can pay: building Restock with Stripe's Link and Managed Deep Agents

Collected Oct 8, 2026

LangChain published Restock, a sample office-supply agent that runs in Slack on Managed Deep Agents and pays for real purchases using Link, Stripe's consumer wallet, over the Machine Payments Protocol (MPP). The company described one request end to end: a user asking for a 12-pack of blue ink pens under $25, with Restock ordering them for $22.18 including fees.

Restock is assembled from four pieces. Link holds the user's payment methods and handles approval; MPP defines the payment exchange over HTTP, where a merchant replies with 402 Payment Required and payment instructions and the client retries with a payment credential; Zinc searches products and places retailer orders through its MPP order API; and Managed Deep Agents hosts the agent, handling Slack, human review, credentials and saved state. Custom tools cover Zinc search, the cart and payment.

The budget acts as a ceiling rather than a charge. The user approves how much to pay upfront, up to $25; Zinc takes that amount, pays the retailer and refunds the remainder. For the pens, the user chose $23, leaving a $22 retailer allowance after Zinc's $1 base fee. The retailer order came to $21.18 ($14.99 for the pens, $1.20 tax, $4.99 shipping); the user paid $22.18 and Zinc refunded $0.82. Prices in the post are illustrative.

The model never sees payment secrets. The Link session lives in a user-owned MDA Connection; the delivery address, notification email and Zinc API key sit in agent-owned Connections, and the Link CLI logs in inside MDA's managed sandbox. A Slack interrupt pauses the run until the user approves or rejects the cart, and nothing the model writes into a tool call can approve it. The payment tool reads a Link shared payment token from a private sandbox file, deletes it after use and returns only a public summary to the model.

The code is at langchain-samples/restock-agent. Restock supports US delivery and USD only, one office per deployment, and payment from the requester's own wallet. It has three RESTOCK_MODE settings: rehearsal (fictional products and simulated approval), link-test (real Zinc search and Link approval, no purchase) and live (real payment and retailer order).

Why it matters: teams building agents that spend money can start from Restock's sample code, but the approach depends on merchants exposing MPP-enabled APIs, so purchasing coverage is limited to that growing list.

Read at LangChain

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Build an agent that pays for real purchases. Restock runs in Slack on Managed Deep Agents and pays with Stripe's Link over the Machine Payments Protocol.