When Agents Become Customers: Building Pay-Per-Use APIs with the Machine Payments Protocol
summary
Demonstrates a reference C# implementation that powers HTTP 402 with Machine Payments Protocol (MPP) so an agent-facing API charges per call and returns a unique-number API value only after payment. Uses Stripe sandbox and Shared Payment Tokens (SPTs) to exchange card credentials, issues an SPT valid ~10 minutes, charges 50 cents per call, and completes an authorized-and-captured payment visible in the Stripe dashboard. Compares MPP (card + wallets) to x402 (crypto, penny microtransactions) and the demo works end to end.
AI-written summary · about
