Skip to main content
Anchor Browser can automatically pay websites and APIs that use the x402 protocol. Payments are signed by Amazon Bedrock AgentCore Payments and retried inside the same browser session.
This feature is in preview. Enabling it authorizes the browser to make real payments from the configured payment instrument.

Enable automatic payments

Set session.x402 to true. It defaults to false.
Once connected through CDP, navigate normally. No wallet key or payment header is required in your automation code.

Payment flow

  1. Anchor creates a dedicated AgentCore PaymentSession for the browser session.
  2. The browser receives an HTTP 402 Payment Required response from an x402 resource.
  3. It selects a payment method compatible with the configured instrument.
  4. AgentCore verifies the session budget and generates the cryptographic payment proof.
  5. The browser retries the original request once with PAYMENT-SIGNATURE for x402 v2 or X-PAYMENT for x402 v1.
  6. The merchant verifies and settles the payment, then returns the protected resource.

Limits and failure behavior

  • Each browser session has a maximum x402 spend of $0.01 USD.
  • The payment authorization expires after 480 minutes, even if the browser remains open longer.
  • Only document navigation, fetch, and XHR requests are handled automatically.
  • If the merchant response is malformed, no compatible network is offered, the budget is exhausted, or AgentCore rejects the payment, the original 402 response is returned to the page.
  • x402 controls payments to third-party resources. It does not replace Anchor credits or pay for the browser session itself.

Security

Your automation code never receives wallet credentials. Automatic payments are available only when session.x402 is explicitly enabled and remain subject to the spending and expiration limits described above. Learn more in the AgentCore Payments overview and browser integration guide.