DEV Community

From Contract to Request: What AWS Marketplace x402 Changes for Enterprise Buying

TL;DR

On November 19, AWS Marketplace began letting agents pay x402-enabled sellers per request, in US dollars, on the buyer's existing AWS bill.

The per-seller sign-up, payment method, and API key disappear.

Procurement used to review and approve a vendor before any money moved. Now an agent's first request to a seller creates the agreement, so that review has to happen earlier, as limits the system enforces.

Per-request pricing makes a long tail of tools worth buying that never justified a contract. I paid Deepgram $0.000155 for one speech request.

AWS's own sample splits the role that sets budgets from the role that pays. Enterprises still have to build the layer that names the employee behind a charge.

Launch limits matter for enterprises: fixed per-request prices only, public offers only, and settlement that appears on the monthly bill.

The step procurement used to own

Picture Priya, who leads procurement for a software company. Today, when an engineer's agent needs a paid data API halfway through a task, a ticket opens. Security reviews the vendor. Legal reads the terms. Someone enters a card or raises a purchase order. An API key lands in a vault. That often takes weeks.

A 2026 benchmark of nearly 70 procurement organizations put average supplier onboarding at 18.8 days, from under three days to more than 91, and APQC data, as reported by eLogic, puts the median time to get a supplier contract in place at 40 days. (Priya is an illustrative composite.)

With agentic payments on AWS Marketplace, the same agent finds a listing, receives a price, pays it, and gets the result in seconds. The vendor relationship still exists, but it begins inside a request. The review Priya relied on happens before the purchase, and in this flow the purchase comes first.

The thesis: an agent can now start buying from a seller in the middle of a task, and nobody sees the purchase before it happens. A company therefore has to decide ahead of time which sellers its agents may use, how much they may spend, and who is accountable for each charge, and it has to build those decisions into the system so they are enforced on every request.

What AWS launched

On November 19, AWS Marketplace began supporting agentic payments over the x402 protocol. Agents discover and buy select products and pay per request in US dollars through AgentCore payments, which became generally available in August. Charges settle on the customer's existing AWS bill, with no crypto wallet.

Discovery runs through a Marketplace connector on an AgentCore Gateway, and payment runs through an AWS Billing connector in AgentCore payments. The technical walkthrough and the AgentCore payments prerequisites describe two phases.

Setup happens once, and the buyer's AWS account administrator does it. The administrator creates the service-linked role that lets Marketplace create agreements and meter usage for the account, creates a payment manager with an AWS Billing connector, and creates separate IAM roles for setting budgets and for paying. The administrator also creates a gateway with the Marketplace connector, so agents can search listings. Engineers and other employees never need access to the AWS account. Their agents reach the gateway and buy only within the limits the administrator set.

At runtime the flow is:

  • The user's agent client connects to the gateway and lists its tools. The docs say any MCP-compatible client works, and Claude Code, Codex, OpenCode and Amazon Quick are examples. A company can list the approved gateway in AgentCore Registry so clients find it there. I tested Registry discovery with a placeholder record, not with this gateway.
  • The Marketplace connector's tools search for listings that accept x402 and return the seller's endpoint.
  • The agent calls the seller's endpoint with no payment, and the seller answers with HTTP 402 and a signed quote.
  • The agent passes the quote to AgentCore payments. Payments checks the session budget, Marketplace checks the signature against the seller's registered key and that the buyer may buy the product, and a payment token comes back. A quote with an altered price is rejected. If the session has no budget left, the call fails and the buyer is not charged.
  • The agent retries the seller with the token, which lasts about five minutes, and receives the content.
sequenceDiagram
  participant A as Agent
  participant S as Seller
  participant P as Payments
  participant M as Marketplace
  A->>S: request, no payment
  S-->>A: 402 with signed quote
  A->>P: pay this quote from the session budget
  P->>M: verify signature, check the buyer may buy
  M-->>P: signed payment token
  P-->>A: payment token
  A->>S: request with token
  S-->>A: result
  M-->>M: meter the charge, settle on the monthly bill

Settlement is asynchronous. The first purchase from a seller creates the agreement, and each charge appears on the monthly bill as a line item for that product.

What collapses

Step in buying a paid API Human path today Agent path on Marketplace
Find the seller Search, vendor demos Gateway connector returns listings that accept x402
Onboard the vendor Security review, contract, sign-up Marketplace's seller review, plus the company's own review expressed as a Private Marketplace allowlist
Set up payment Card or purchase order The buyer's existing AWS bill
Get credentials API key issued, stored, rotated None. The payment token is the credential
Limit spend Contract value or card limit A budget on each payment session
See the cost Invoice from the vendor A line item on the AWS bill

The launch announcement calls the sign-up, the payment method, and the API key per-seller setup. Each of them also stopped something: a sign-up needed a person, a card had a limit, and a key had to be issued before anything ran.

What it unlocks

The first unlock is a long tail of tools that never justified a contract. A per-request price can sit far below the point where an annual agreement makes sense. In my runs, a document parse from Upstage cost $0.006 and a speech request to Deepgram cost $0.000155, and AWS's walkthrough buys from a $0.01 seller. No annual agreement carries those prices. That market differs from seats and subscriptions, and the buyer is an agent.

Second, there are no keys to distribute. The agent does not hold a seller credential, so there is nothing to rotate or leak. I wrote about the same direction for credentials, and this launch applies it to purchasing.

Third, controls become code. AWS's guidance treats the two controls as separate levers. Policy decides who calls which tool with what parameters, and payment sessions decide how much can be spent and for how long. The sample setup goes one step further: the role that creates sessions can set budgets but cannot pay, and the role that pays cannot create sessions, so the agent has no way to raise its own budget. I built the same split into a broker and an adapter, following the five-role pattern in that guidance.

Fourth, sellers gain a new kind of customer. A seller registers with Marketplace, integrates the x402 SDK, and charges agents per request with no sign-up flow or billing system. AWS Marketplace collects the payment and disburses it like any other sale.

What it moves onto the buyer

An enterprise gains speed and takes on three decisions it did not have before, plus one limit.

First, the agreement. When an agent buys from a seller for the first time, Marketplace creates an agreement between the company's AWS account and that seller, so the seller's terms now bind the company. Nobody at the company reads those terms at that moment. Legal has to review sellers ahead of time and put the approved ones on a Private Marketplace allowlist, which limits agents to the products it allows. I did not test the allowlist.

Second, the bill names a product and not a person. After one sub-cent purchase, the cloud's audit records I looked at held a gateway call with the token's subject and, about ten seconds later, a metering event with the product and quantity. No field joined them. The AWS blog says transactions are auditable in CloudTrail and Cost Explorer, and that holds for the product and the amount. It does not hold for the employee, so attribution needs a layer of its own. The adapter, broker and ledger in the diagram below are the one I built.

Third, a session cap bounds one session. A monthly cap per employee needs a count kept somewhere, and I found no native per-user monthly limit in the documentation. The ledger in the diagram below keeps that count. The broker checks the employee's running total before it creates a session.

Finally, one caveat: private offers are not supported for these products at launch, so a negotiated discount cannot apply to an x402 purchase.

Where the rules sit

These decisions land in different places, and so do the records. In the setup I ran, the adapter and broker were AWS Lambda functions and the ledger was a DynamoDB table. Solid lines show the purchase path, and dotted lines lead to the records each step writes.

flowchart TB
  ID["Company identity provider<br/>Signs the user in"] -.-> GW
  AG["Agent"] -->|"token"| GW["AgentCore Gateway<br/>Verifies the user and group"]
  GW --> AD["Adapter (Lambda)<br/>Asks the seller and pays"]
  GW -.-> L1["Gateway event:<br/>user and tool"]
  AD <-->|"402 quote, token"| SE["Seller"]
  AD -->|"reserve"| BR["Broker (Lambda)<br/>Owns the budget:<br/>caps and kill switch"]
  BR <--> LG[("Ledger (DynamoDB)")]
  LG -.-> L2["Ledger row:<br/>user, seller, amount"]
  BR -->|"capped session"| PM["AgentCore payments"]
  AD -->|"pay"| PM
  PM --> MP["AWS Marketplace<br/>Seller allowlist (not tested)"]
  ADM["Account administrator<br/>One-time setup"] -.-> PM
  MP -.-> L3["Metering event:<br/>product and quantity"]
  -.-> L4["Monthly bill line"]

Read it from the top. The company's identity provider signs the user in, and the gateway checks the token and the user's groups before any tool runs, so group membership decides who may call which tool.

The adapter gets the seller's quote. The broker checks it against the employee's caps and reserves the amount in the ledger before anything is paid, and then AgentCore payments issues a token inside a session capped at that amount. The administrator's one-time setup, including the seller allowlist, sits behind the payment path, so employees never touch it.

For governance, the useful part is the records. The gateway event names the user and the tool. The metering event names the product and quantity, and it shares no field with the gateway event. Only the ledger row holds the person, the seller and the amount together, which is why a per-employee view has to be built from it. The seller allowlist is the one rule I could not exercise, so I have not seen it block an agent.

Who the buyer is

Agents run in more than one way. An engineer drives an interactive client such as Claude Code or Codex and signs in as themselves. An autonomous agent runs a scheduled or event-driven job, and a persistent agent runs continuously inside the company's cloud. Any of them can run anywhere, and each carries one of two identities: the user's, passed down from sign-in, or the agent's own, issued as a service identity.

The path in the diagram works for both, because the gateway needs a verified token and the ledger records whichever identity arrives. An agent with its own identity still needs a named human or team as its owner, since a charge has to end at a person who answers for it.

I tested only the interactive case with the user's identity. Agent-owned identities and long-running agents I did not test.

Running it in production

The Lambda and DynamoDB choice was for a proof, and it also works as a starting point. What I would change is the surrounding setup. This list is my recommendation and I did not test it at scale.

  • Keep the three pieces separate. The broker is the only writer of the ledger, and its Lambda role is the only one that can create payment sessions. The adapter's role can read the ledger and call the payment API. Do not merge them to save a function.
  • Put the ledger in DynamoDB with point-in-time recovery and deletion protection on. Reservations are conditional writes, so two concurrent requests cannot both spend the last dollar. The table is the system of record for attribution, so back it up as one.
  • Keep the audit trail in object-locked storage in a separate logging or security account, so the security team governs it. Run the payment manager in a dedicated account, and use its JWT mode if more than one team shares it.
  • Reconcile monthly, once the AWS bill lands. Export the ledger to S3 on a schedule and query it in Amazon Athena next to the bill's Data Exports, which carry the Marketplace product and seller. Match totals by seller and month, then build the per-user view on top, for example as Athena views or a QuickSight dashboard. The bill names the product and seller, and the ledger names the person. I am describing this design and have not built it.

What I observed

I bought from two sellers in a personal account across several runs: Upstage's document parser at $0.006 and Deepgram's speech API at $0.000155. Those runs give the numbers here.

A document parse took between 19 and 22 seconds, and about twelve of those were the seller's own work. The payment call took about a second. A speech request took between three and five seconds.

After the first purchase from each of those two sellers, the agreement showed as active. Settlement is monthly and asynchronous per the docs, and no bill line existed for my purchases when I wrote this, so I have not seen a line item and I have not tested how a Private Marketplace allowlist handles an agent that asks for a seller outside it.

A practical way to adopt it

Stage What to put in place
Before any agent buys Private Marketplace allowlist, legal sign-off on the sellers, a dedicated account for the payment manager
First pilot Small per-session caps, a handful of sellers, one team
Before scale A per-employee ledger and a reconci
Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.