Skip to content

docs: fix x402 buyer examples#2983

Open
vikions wants to merge 1 commit into
MetaMask:mainfrom
vikions:fix/x402-buyer-examples
Open

docs: fix x402 buyer examples#2983
vikions wants to merge 1 commit into
MetaMask:mainfrom
vikions:fix/x402-buyer-examples

Conversation

@vikions

@vikions vikions commented Jul 12, 2026

Copy link
Copy Markdown

Description

Updates the x402 buyer examples to match the current Smart Accounts Kit and @metamask/x402 APIs.

The examples now:

  • Read facilitator addresses from the correct facilitatorAddresses field.
  • Use the supported redeemer parameter instead of passing execution rules directly.
  • Let the delegation provider use the session account as the redelegation's from address.

These changes make the examples consistent with the published SDK behavior.


Note

Low Risk
Documentation-only changes to example snippets; no runtime code, auth, or data paths are modified.

Overview
Updates the x402 buyer guides so copy-paste examples match the published Smart Accounts Kit and @metamask/x402 behavior.

In advanced-permissions, payment requirements and samples now use extra.facilitatorAddresses instead of facilitators, and requestExecutionPermissions passes facilitator allowlisting via the top-level redeemer option (documented as mapping to a redeemer rule) rather than a manual rules array.

In recurring-payments, createx402DelegationProvider no longer passes from: permission.from; the guide states the provider derives the open redelegation from address from the session account.

Reviewed by Cursor Bugbot for commit 9d1a2ba. Bugbot is set up for automated code reviews on this repo. Configure here.

@vikions vikions requested review from a team as code owners July 12, 2026 11:28
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

@vikions is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

@shahbaz17

Copy link
Copy Markdown
Member

cc @AyushBherwani1998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants