Technology · November 17, 2026
Machine Payments Turn APIs Into Commerce Surfaces
By Hailey Armstrong · Principal UX Designer
Photo by Albert Stoynov on Unsplash
The API is becoming a place where a transaction happens
The next important change in API design is not another framework. It is the removal of the assumption that access and payment happen in separate systems.
The Machine Payments Protocol (MPP), co-authored by Tempo and Stripe and published as an IETF-oriented specification, defines a payment exchange directly over HTTP: a client requests a resource, the server returns 402 Payment Required with a challenge, the client fulfills that challenge, and the server returns the resource with a payment credential and optional receipt. Stripe describes the model as a way for agents to pay for API calls, browser sessions, physical services, and recurring access without a pre-existing billing relationship.
That is a protocol change, but it creates an architecture change. If an agent can buy an API response, then the API is no longer only a technical interface. It is also a catalog item, a meter, an authorization boundary, a ledger entry, and a support artifact.
My recommendation is straightforward: do not bolt MPP onto an existing endpoint as a payment middleware feature. Treat payment as part of the endpoint contract from the beginning. The teams that win will expose narrow, inspectable, replay-safe capabilities—not an unrestricted API with a price tag attached.
MPP changes the request lifecycle, not just the billing method
MPP’s crucial idea is that payment is negotiated at the resource boundary. The server does not redirect a user to a checkout page or require an account before the first request. It advertises a challenge; the client chooses a payment method and retries.
A simplified exchange looks like this:
GET /v1/browser-sessions?duration=10m HTTP/1.1
Host: api.example.com
HTTP/1.1 402 Payment Required
Cache-Control: no-store
WWW-Authenticate: Payment id="ch_7f2...", method="stripe", intent="charge", request="..."
GET /v1/browser-sessions?duration=10m HTTP/1.1
Authorization: Payment <credential>
Idempotency-Key: 34d8c1c4-...
HTTP/1.1 201 Created
Payment-Receipt: <receipt>
The MPP protocol overview makes several details normative enough to matter in production:
402means the payment barrier is being presented or can be retried;401remains for non-payment authentication failure.- A payment proof must be single-use. Cryptographic binding prevents tampering, but the implementation still needs replay state or settlement-layer guarantees.
- The unpaid request must not perform business side effects. A server may record the challenge, but it must not create the browser session, send the mail, or mutate the account before payment succeeds.
- Non-idempotent requests need an idempotency key because a paid client is still a retrying distributed system.
- Challenges and payment credentials are sensitive and time-dependent; the protocol calls for
no-storebehavior and forbids logging credentials.
Those are not payment-provider details. They are API semantics. A team that adds a payment check after its controller has already reserved inventory or started a job has implemented the flow backwards.
The real product is the paid capability
MPP makes a useful distinction between an API resource and a payment intent. The protocol describes one-time charge, ongoing session, and recurring subscription intents. This matters because an agent is not buying “access” in the abstract. It is buying a bounded capability with a duration, quantity, scope, or outcome.
That makes product design part of API design. Before exposing a paid endpoint, define the unit being sold. This is the same state-and-contract problem that appears in agentic commerce systems once a shopping agent moves from recommendation to execution:
| Capability | Better unit of value | Failure that must be explicit |
|---|---|---|
| Browser automation | One browser session with a duration and resource limits | Session never starts after payment, or exceeds the authorized duration |
| Data retrieval | One named dataset slice or query budget | Result is incomplete, stale, or larger than the challenge described |
| Model inference | A bounded request or metered token/session allowance | Partial output, timeout, or usage beyond the approved ceiling |
| Physical fulfillment | One order with immutable line items and destination | Payment succeeds but fulfillment cannot accept the order |
| Recurring service | A subscription period with cancellation and renewal rules | Renewal is charged without a valid authorization or service window |
The table is an architectural test. If the engineering team cannot describe the paid capability without saying “whatever the client asks for,” the endpoint is too broad for autonomous payment.
Stripe’s launch description for MPP names early examples including Browserbase charging for headless-browser sessions and services accepting payment for physical mail or food orders. The significance is not that these are unusual demos. It is that different businesses can keep their existing payment, tax, refund, and reporting stack while changing the unit and timing of authorization.
The right abstraction is therefore not “agent checkout.” It is a capability with a payment policy:
{
"capability": "browser-session",
"resource": "/v1/browser-sessions",
"price": { "currency": "usd", "maximum": 1200 },
"limits": { "duration_seconds": 600, "concurrency": 1 },
"refund": "unused-time-only",
"requires": ["verified-agent", "user-intent"]
}
This manifest is illustrative, not an MPP replacement. Its job is to force a team to answer questions that a conventional API key hides: what is the maximum spend, what is the authority scope, when does value begin, and what can be refunded?
Payment is not identity: agents need both
A valid payment proves that a payment flow succeeded. It does not, by itself, explain who the agent is, which human or business authorized it, or whether the request is within policy.
This is where MPP needs to be combined with agent identity rather than treated as a complete trust model. Visa’s card-based MPP specification and SDK announcement describes tokenized credentials, agent identity verification, and fraud controls as separate layers around the MPP flow. Mastercard’s Know Your Agent discussion makes the same architectural point from a different angle: merchants need to know both the agent and the person behind it, alongside proof of intent and transaction controls.
This is also why payment-facing tools should be held to the same scrutiny as other agent tools. The existing MCP security discussion is relevant here: a paid tool expands the blast radius of weak authorization, ambiguous inputs, and poor audit trails.
- Who is calling? Is this agent registered, attributable, and within its allowed environment?
- Who delegated authority? Can the service connect the agent to a user, organization, or accountable billing entity?
- What may it do? Is the requested capability, amount, destination, and time window inside the policy?
- Was this exact action paid for? Is the payment challenge valid, unexpired, single-use, and bound to the request body?
Do not collapse those into one bearer token. A payment credential should not become a permanent API key, and an agent identity should not silently become unlimited spending authority.
A useful policy record is closer to this:
principal: agent_123
on_behalf_of: customer_456
capability: browser-session
max_amount: USD 12.00
valid_until: 2026-11-17T18:00:00Z
allowed_destinations: [example.com]
approval: user-intent-789
payment_proof: challenge-bound, single-use
The policy is valuable even when the payment rail changes. MPP is designed to be payment-method agnostic; its core separates challenges and credentials from the concrete method used to settle. Visa’s card extension demonstrates why that separation matters: a card rail can participate without redefining the whole HTTP exchange.
UCP and MPP solve different layers—and should stay separate
It is tempting to treat every agent protocol as competing checkout standards. That framing makes implementation harder.
Google’s Universal Commerce Protocol (UCP) overview describes a commerce abstraction for discovery, checkout, order management, capability discovery, and payment handlers. Its sample integration publishes a /.well-known/ucp manifest and uses idempotency keys, request IDs, payment handlers, and capability schemas.
MPP is narrower: it standardizes how a client and a service negotiate payment for an HTTP resource. UCP describes a commerce journey and its capabilities. A retailer may use UCP to expose checkout and order operations, then use an MPP-compatible payment method or another handler inside that journey. An API provider may need MPP without supporting product discovery, discounts, or fulfillment at all.
The architecture should preserve that layering:
| Layer | Question | Example control |
|---|---|---|
| Discovery | What can this service do? | /.well-known/ucp, API schema, capability manifest |
| Intent | What does the caller want to execute? | Immutable request body, request ID, user intent |
| Policy | Is this principal authorized for this scope? | Agent identity, amount/destination/time limits |
| Payment | Has the exact capability been paid for? | MPP challenge, credential, receipt |
| Execution | Can the service safely perform it once? | Idempotency key, reservation, outbox |
| Settlement | How are refunds, disputes, and reconciliation handled? | Payment provider ledger and internal transaction record |
This separation avoids a common failure mode: building a huge “agent commerce” gateway that owns discovery, identity, payment, fulfillment, and every provider-specific policy. Keep the protocol boundaries visible so each layer can evolve without making the resource contract opaque.
The dangerous edge is the paid retry
Autonomous clients retry. Networks time out. Payment providers return ambiguous states. A human checkout can ask the user to try again; an agent may retry automatically and accidentally pay twice or execute twice.
MPP’s security guidance is unusually practical here. A payment proof must be single-use, a challenge must be bound to the request when a body is present, and non-idempotent methods need an idempotency key. The server should model payment and execution as a state machine rather than a boolean:
CHALLENGED
-> PAYMENT_PENDING
-> PAID
-> EXECUTING
-> SUCCEEDED
PAYMENT_PENDING -> PAYMENT_FAILED
PAID -> EXECUTION_FAILED -> REFUND_REQUIRED
PAID -> DUPLICATE_RETRY -> RETURN_PRIOR_RESULT
The PAID state is not permission to execute forever. It is a recorded authorization for a specific challenge, capability, request digest, and policy window. On a retry, the service should return the prior result when the idempotency key matches, reject a changed body, and avoid generating a fresh payment challenge if the original payment was already consumed.
That last behavior matters for user trust. A client that receives a fresh challenge after a payment was successfully consumed may authorize a second charge. The protocol’s distinction between retryable 402 failures and 403 outcomes for already-consumed proofs gives implementers a vocabulary for preventing that loop. Your internal ledger still needs an atomic uniqueness constraint; HTTP status codes cannot substitute for transactionality.
What teams should build now
The protocol is early, and no merchant needs to expose every endpoint to agents immediately. But the design work is useful before adoption. I would do three things.
Do not charge for an opaque endpoint. Start with one narrow, high-value capability whose inputs, output, limits, and refund behavior can be written down. Make the challenge describe that capability precisely.
Do not treat agent traffic as anonymous bot traffic. Add an identity and intent record that lets fraud, support, and finance answer who acted, for whom, under which authority, and with what limit. Mastercard’s framework shows why authentication and payment controls must coexist rather than be inferred from a crawler user-agent.
Do not make payment the last middleware check. Put the challenge before side effects, bind it to the request body where needed, and make execution idempotent. Test timeouts between authorization and execution, duplicate credentials, changed request bodies, expired challenges, and refunds after partial fulfillment.
The business case is not that every API becomes a marketplace. It is that machine clients can discover and purchase bounded capabilities without a bespoke account workflow. That makes small, composable services economically addressable by software agents—but only if their contracts are as explicit as their prices.
MPP does not make an API trustworthy by itself. It supplies a standard payment exchange. The product and engineering work is deciding what the exchange authorizes, who can authorize it, and how the service proves that it executed exactly once. That is why machine payments turn APIs into commerce surfaces: the interface now carries value, policy, and accountability in the same request.