Skip to content

docs(specs): update auth-capture evm spec#2359

Draft
avidreder wants to merge 10 commits into
x402-foundation:mainfrom
avidreder:feat/update-auth-capture-spec
Draft

docs(specs): update auth-capture evm spec#2359
avidreder wants to merge 10 commits into
x402-foundation:mainfrom
avidreder:feat/update-auth-capture-spec

Conversation

@avidreder
Copy link
Copy Markdown
Contributor

@avidreder avidreder commented May 18, 2026

Description

Updates the auth-capture specs to make server-requested operations explicit:

  • Replace extra.autoCapture operation selection with payload.type for authorize, charge, capture, void, and refund.
  • Document the EVM mapping from each operation type to its AuthCaptureEscrow call.
  • Add compact per-operation payload field requirements, optional serverAuthorization, extra.serverAuthorizationRequired, smart contract operator guidance, and server self-facilitation guidance.

Tests

  • ReadLints diagnostics for touched markdown files: no linter errors.
  • Not run: full language test suites; docs/spec-only change.

Checklist

  • I have formatted and linted my code
  • All new and existing tests pass
  • My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits
  • I added a changelog fragment for user-facing changes (docs-only changes can skip)

Document server-routed authCapture operations via payload type and remove autoCapture as the operation selector.

Co-authored-by: Cursor <[email protected]>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@avidreder is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the specs Spec changes or additions label May 18, 2026
avidreder and others added 2 commits May 18, 2026 16:08
Use authorize as the server operation discriminator while preserving authorization for token payload fields.

Co-authored-by: Cursor <[email protected]>
Add serverAuthorizationRequired to advertised authCapture requirements when facilitators require server identity proof.

Co-authored-by: Cursor <[email protected]>
@A1igator
Copy link
Copy Markdown
Contributor

A1igator commented May 18, 2026

@avidreder Not sure what the plan with this PR is since it's a draft but this is not the best design. Server interacting with the escrow should be coded in the captureAuthorizer smart contract itself and we already do so with our contracts.

You're adding a very specific style of captureAuthorizer (facilitator EOA) helpers, which a) as I mentioned before should be discouraged even if supported: #1425 (comment) and b) will be very confusing for anyone using the smart contract captureAuthorizer because the new functions added in the spec would be broken and c) Not really sure how this is supposed to work merchant developer experience wise. Would they change their endpoint and hit the facilitator directly? right now schemes are set and stay at each endpoint and clients hit them.

If there is any demand for this kind of structure anyways despite my objections above and how the same functionality can be done via captureAuthorizer smart contracts more trustlessly, I'd at least recommend an optional companion doc not in the main spec itself to not pollute it for smart contract captureAuthorizer use cases which is where we see most demand.

Would love to know @fabrice-cheng's thoughts as well.

avidreder and others added 6 commits May 20, 2026 08:41
Use charge for the single-shot authCapture operation instead of authorizeAndCapture.

Co-authored-by: Cursor <[email protected]>
Move the EVM-specific serverAuthorization wording into the EVM binding and keep the base authCapture spec network-neutral.

Co-authored-by: Cursor <[email protected]>
Document facilitator routing through captureAuthorizer contracts that expose the escrow operation interface.

Co-authored-by: Cursor <[email protected]>
State that captureAuthorizer is provided by the server in the generic authCapture spec.

Co-authored-by: Cursor <[email protected]>
Document gas and wallet safety expectations for facilitators calling smart contract operators.

Co-authored-by: Cursor <[email protected]>
Use auth-capture as the scheme name in the auth capture specs and examples.

Co-authored-by: Cursor <[email protected]>
@avidreder avidreder changed the title docs: update authCapture EVM spec docs: update auth-capture EVM spec May 20, 2026
@avidreder avidreder changed the title docs: update auth-capture EVM spec docs(specs): update auth-capture evm spec May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

specs Spec changes or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants