awal x402 pay: after GET returns 402, settle with POST (do not submit payment on GET)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with the awal x402 pay command and reproduce the bare-GET failure against an endpoint that returns 402 with a bazaar extension declaring POST. Compare its paid retry with awal x402 details, which already detects input.method: "POST". Done means discovery still uses GET, while the authorized payment is submitted with the advertised method and never attached to the discovery GET.
Written by the indexing model from the issue text.
Description
Summary
npx awal x402 pay <url> defaults to GET. When a resource correctly returns 402 on GET for discovery but only settles on POST, awal authorizes payment then resubmits on GET. Servers that refuse to settle money on GET (correct security posture) reject with errors like Payment was authorized but rejected by server. No funds move; the agent path still looks broken unless the caller passes -X POST -d '{}'.
Resource owners should not settle on GET (logs, prefetch, intermediary retries on money routes). The missing behavior is in awal: after a GET 402, use the bazaar/extensions method (POST) for the paid retry.
Environment
awal2.12.1 (npx awal)- Base mainnet USDC
- Endpoint pattern:
POST /api/x402/scout-credits/{topup_id}(intent-bound pay URL; no session headers required) - Host used in dogfood:
https://flint.network
Repro
- Create an intent-bound pay URL that:
- Answers GET with HTTP 402 +
PAYMENT-REQUIRED+ bazaar extensions saying method POST - Settles only on POST with a valid payment payload
- Answers GET with HTTP 402 +
- Run bare stock:
npx awal x402 pay "https://example.com/api/x402/scout-credits/<id>" --max-amount 1000000 --json
- Observe failure after authorization:
X402 submission failed: Payment was authorized but rejected by server
- Run recipe form (works):
npx awal x402 pay -X POST -d '{}' "https://example.com/api/x402/scout-credits/<id>" --max-amount 1000000 --json
awal x402 details <url>already auto-detects method POST and shows bazaarinput.method: "POST".
Expected
Bare awal x402 pay <url> should discover via GET, read accepted method from 402/bazaar, then authorize and settle on POST. Never attach a payment payload to a discovery-only GET.
Actual
Discovery works. Settlement still uses the discovery verb (GET). Payment authorized, then rejected. Wallet balance unchanged.
Ask
Teach awal x402 pax (default GET) to honor bazaar/extensions method for the paid attempt after a 402, matching what awal x402 details already detects.
Workaround
awal x402 pay -X POST -d '{}' <pay_url>
Provenance
FLINT Network / Firstmate dogfood, 2026-09-11 PT. Example settled recipe receipt: fsr_01M29Y5K7HGEN1S1NJJXXVMY4V.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 822
- Avg merge
- 13h 31m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coinbase/agentkit
-
coinbase-agentkit 0.7.x fails on fresh install: imports solana.rpc.api, which solana>=0.37 removed Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
All issues in coinbase/agentkit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·