You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mirror of node-commerce 6fcf928. Two related changes for compat with v1-only
x402 parsers (notably Coinbase awal at payments-mcp.coinbase.com, hardcoded to
read maxAmountRequired):
1. payment_required_header + build_402_body run accepts[] through
alias_amount_fields. Each entry gets BOTH `amount` (v2 spec) AND
`maxAmountRequired` (v1 spec). Strict v2 parsers ignore the alias; v1-only
parsers find their field. Idempotent + symmetric.
2. build_discovery_probe_response accepts an optional `x402_sample`
(X402SampleProbe). When set, the probe response also carries:
- `payment-required` header (base64 PaymentRequired with sample accepts)
- `accepts` array in the body
Lets x402 discovery clients find merchant's x402 support from an empty-body
POST. Awal x402 details now extracts requirements end-to-end.
489 tests pass, ruff + ty clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments