fix: keep live x402 inspect demo on 402 path#3
Closed
TateLyman wants to merge 1 commit into
Closed
Conversation
simonlucalandi
pushed a commit
that referenced
this pull request
May 18, 2026
…account for inspect mode The inspect-402 demo was stopping at HTTP 400 because the placeholder order body used a zero-UUID product_id and omitted item.beneficiary_account, which the live x402 server requires. Select the first fixed-denomination product (is_range=false, product_value_required=false) from the catalog response and include a demo beneficiary_account so the request reaches the intended 402 PAYMENT-REQUIRED challenge without ever sending PAYMENT-SIGNATURE. Verified against https://x402.cryptorefills.com: HTTP 402, PAYMENT-REQUIRED decoded for "Amazon.com Gift Card 5 USD" ($5.12999700 USDC on base eip155:8453, payTo=0x110c…6a66). Credit: original patch contributed by @TateLyman in #3.
|
Thanks @TateLyman — your diagnosis is correct: the live x402 server returns We verified your patch end-to-end against We've re-authored the diff and landed it on Appreciate the contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MODE=inspect-402beneficiary_accountfield in the no-payment order bodyWhy
pnpm inspectcurrently stops at a 400 validation error because the sample order omitsbeneficiary_account. Using a real fixed-denomination catalog item lets the demo reach the intended no-payment 402 challenge without sendingPAYMENT-SIGNATUREor moving funds.Validation
pnpm inspectreached HTTP 402 and decoded thePAYMENT-REQUIREDheaderpnpm exec tsc --noEmitgit diff --check