Skip to content

fix(x402): migrate CDP bazaar path to x402 protocol v2#270

Merged
Huygon764 merged 1 commit into
developfrom
fix/x402-cdp-migrate-v2
May 18, 2026
Merged

fix(x402): migrate CDP bazaar path to x402 protocol v2#270
Huygon764 merged 1 commit into
developfrom
fix/x402-cdp-migrate-v2

Conversation

@Huygon764
Copy link
Copy Markdown
Contributor

Migrate to v2

CDP indexer stopped picking up v1 (outputSchema) entries — verified by 3
successful v1 settlements on Base mainnet + Base Sepolia that never
appeared in /discovery/merchant after 15+ minutes. All entries CDP
indexed today are x402Version: 2 with extensions.bazaar at the top
level of PaymentRequired. The v1 ranking in CDP appears deprecated in
practice.

Types and wire format taken directly from
@x402/core/src/types/payments.ts so the shape matches what CDP's
facilitator expects:
  - paymentRequirements.amount         (was maxAmountRequired in v1)
  - paymentRequirements.network        CAIP-2 "eip155:8453"
  - paymentPayload.accepted            (chosen requirement, v2-only)
  - PaymentRequired.resource           ResourceInfo object {url, ...}
  - PaymentRequired.extensions.bazaar  top-level, not on accepts[]

PayAI path is untouched and stays on v1, which is what
facilitator.payai.network currently indexes (PolyPay listing is live
there). The same EIP-3009 signature works across versions, so the
bootstrap script and the UI keep sending v1 X-PAYMENT; only the CDP
forwarding step translates to v2.

Refs #259
@Huygon764 Huygon764 merged commit 76deaeb into develop May 18, 2026
1 of 2 checks passed
Huygon764 added a commit that referenced this pull request May 18, 2026
CDP indexer stopped picking up v1 (outputSchema) entries — verified by 3
successful v1 settlements on Base mainnet + Base Sepolia that never
appeared in /discovery/merchant after 15+ minutes. All entries CDP
indexed today are x402Version: 2 with extensions.bazaar at the top
level of PaymentRequired. The v1 ranking in CDP appears deprecated in
practice.

Types and wire format taken directly from
@x402/core/src/types/payments.ts so the shape matches what CDP's
facilitator expects:
  - paymentRequirements.amount         (was maxAmountRequired in v1)
  - paymentRequirements.network        CAIP-2 "eip155:8453"
  - paymentPayload.accepted            (chosen requirement, v2-only)
  - PaymentRequired.resource           ResourceInfo object {url, ...}
  - PaymentRequired.extensions.bazaar  top-level, not on accepts[]

PayAI path is untouched and stays on v1, which is what
facilitator.payai.network currently indexes (PolyPay listing is live
there). The same EIP-3009 signature works across versions, so the
bootstrap script and the UI keep sending v1 X-PAYMENT; only the CDP
forwarding step translates to v2.

Refs #259
Huygon764 added a commit that referenced this pull request May 18, 2026
* fix(x402): migrate CDP bazaar path to x402 protocol v2 (#270)

CDP indexer stopped picking up v1 (outputSchema) entries — verified by 3
successful v1 settlements on Base mainnet + Base Sepolia that never
appeared in /discovery/merchant after 15+ minutes. All entries CDP
indexed today are x402Version: 2 with extensions.bazaar at the top
level of PaymentRequired. The v1 ranking in CDP appears deprecated in
practice.

Types and wire format taken directly from
@x402/core/src/types/payments.ts so the shape matches what CDP's
facilitator expects:
  - paymentRequirements.amount         (was maxAmountRequired in v1)
  - paymentRequirements.network        CAIP-2 "eip155:8453"
  - paymentPayload.accepted            (chosen requirement, v2-only)
  - PaymentRequired.resource           ResourceInfo object {url, ...}
  - PaymentRequired.extensions.bazaar  top-level, not on accepts[]

PayAI path is untouched and stays on v1, which is what
facilitator.payai.network currently indexes (PolyPay listing is live
there). The same EIP-3009 signature works across versions, so the
bootstrap script and the UI keep sending v1 X-PAYMENT; only the CDP
forwarding step translates to v2.
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.

1 participant