💳 Amazon Bedrock AgentCore lets AI agents pay AWS Marketplace x402 sellers on the regular AWS bill
In brief
- 💳 AgentCore payments can now settle agent purchases from AWS Marketplace in US dollars on the AWS bill.
- 🔌 Agents pay x402-enabled APIs, data and content per request; no stablecoin wallet or API key needed.
- 🛡️ A spending cap per session, an approved-seller list and CloudTrail records limit the spending.
- 🧪 Launch seller example: Tavily; a GitHub sample shows the flow.
Amazon Web Services has extended Amazon Bedrock AgentCore payments, generally available since August, to AWS Marketplace. Until now agents paid for APIs, MCP servers and web content with stablecoin wallets; now an agent can discover x402-enabled software, APIs, data and content in the Marketplace and pay per request in US dollars, with the charge appearing on the AWS bill of the developer’s account. x402 is an open protocol in which a seller answers a request with the HTTP status 402 “Payment Required” and a signed price quote. Developers limit what an agent may spend with a budget per payment session and a list of approved sellers; purchases can be traced in AWS CloudTrail and Cost Explorer. Tavily, a live web-search provider, is named as one of the Marketplace sellers. 💳
🔄 **The flow in five steps.** First, the agent discovers: it calls three read-only gateway tools in order (search listings, get a listing, list its fulfillment options); the search returns only endpoints that accept x402, and the last call gives the seller’s endpoint URL and the payment protocols it accepts. Second, it gets a quote: it calls the endpoint without payment, the seller answers with HTTP 402 and puts a signed quote in the PAYMENT-REQUIRED header; AWS Marketplace checks the signature against the seller’s registered key, so a quote with an altered price is rejected. Third, it pays: the agent passes the quote to the ProcessPayment API with the payment type AWS_BILLING_X402; if budget remains in the session, AgentCore payments issues a payment token, otherwise the call fails and the developer is not charged. Fourth, it redeems: the agent repeats the request with the token in the PAYMENT-SIGNATURE header and receives the content; the token is valid for about five minutes, so steps two to four run in a single pass. Fifth, settlement: on the first purchase from a seller AWS Marketplace creates an agreement for the AWS account, later charges are metered against it asynchronously and show up monthly as a Marketplace line item per product. Organisations with a Private Marketplace let agents buy only the products it allows.
🧰 **Setup and controls.** The developer creates a Payment Manager with an AWS Billing connector; this needs the service-linked role AWSServiceRoleForMarketplaceAgenticCommerce. For each task the developer creates a payment session with a spending limit and gives the agent its ID. Limits and approved sellers are set through AgentCore policy. The sample setup separates roles so that the session role can set budgets but cannot pay, while the agent role can pay but cannot create sessions; the agent therefore has no way to raise its own budget. For discovery there is an optional AWS Marketplace connector in AgentCore Gateway, whose role is limited to three read-only Marketplace actions; whoever skips it sets a SELLER_URL and pays only that one address.
📏 **Limits at launch.** Billing through AWS Billing supports the x402 “exact” scheme, in which the seller quotes a fixed price for each request. The “upto” scheme with a spending ceiling, which AgentCore payments added at general availability in August, is not mentioned for this path.
🧪 **The sample.** The open-source GitHub sample in the agentcore-samples repository holds scripts for the payment manager, the gateway and an agent built with the Strands framework. The default session budget is $0.05 and the per-request cap $0.02. In the test run against a $0.01 seller, the agent compared two listings, bought once and spent $0.01 in total; its task was to answer what was announced about agentic payments this week, with sources. The Tavily line item takes a moment to appear on the bill.
🕰️ **Background.** AgentCore payments started as a preview with Coinbase and Stripe and, according to AWS, became generally available on 18 August, with wallets from Coinbase and Stripe Privy, the Machine Payment Protocol (co-authored by Stripe and Tempo) and the “upto” scheme. Partners and customers named at that time include Cloudflare and Amazon CloudFront for paid web content, as well as Anchor Browser and Travala.