Commit 07d5052
committed
docs(x402): note v2 Payment-Signature header + caveats
Two costly footguns for new x402 integrators that aren't covered today:
1. Protocol version. The gateway is x402 v2, so payments must be sent in
`Payment-Signature` (not v1's `X-PAYMENT`). v1 SDKs that sign correctly
still receive 402 "Payment-Signature header is required". The current
"any x402 tooling that supports exact scheme will work" line implies
v1 compatibility — adding an explicit callout pointing v1 users at
`@graphprotocol/client-x402` (or a v2-aware upgrade).
2. Payment-on-failure. Two real cases where USDC is charged but the caller
gets no usable data:
- Valid subgraph_id with zero active indexer allocations → returns
`{"errors":[{"message":"subgraph not found: no allocations"}]}` with
payment settled.
- Any errors-shaped GraphQL response (bad shape, schema mismatch, etc.)
is still settled.
Both surprise first-time agent integrators. Added a `## Caveats` section
with a Graph Network Subgraph query agents can use to pre-check active
allocations before paying.1 parent a6518e0 commit 07d5052
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
67 | 95 | | |
68 | 96 | | |
69 | 97 | | |
| |||
0 commit comments