Check an x402 payment before paying
check_paymentDecide whether a specific x402 payment should go through: returns allow true/false with reasons. Checks the endpoint's trust verdict, that the amount is within your cap and not above the monitored price, and that the payTo wallet matches the one we've observed (catches swapped or hijacked wallets). Optionally (minOrganicShare) it also requires that enough of the seller's volume comes from independent buyers. Intended for right before a payment, with the amount, payTo, and network from the endpoint's 402 quote; allow is true only when every rule passes. Use check_endpoint instead if you only want an endpoint's grade without a quote in hand. Read-only and free; it doesn't make or block the payment itself. When allow is false, the reasons list explains why. API docs: https://github.com/Book0fEli/lumiere-paycheck/blob/main/docs/api.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Full URL of the x402 endpoint you are about to pay, including path | |
| payTo | No | Wallet address from the endpoint's 402 quote | |
| amount | No | Amount about to be paid, atomic units (USDC has 6 decimals: 10000 = $0.01) | |
| network | No | Network from the quote, e.g. eip155:8453 | |
| hasAccess | No | true if you have your own account, API key or sign-in with this seller. For endpoints that need the seller's sign-in on top of x402, allowCaution/requireVerified then don't block (we couldn't confirm delivery only because we can't sign in). | |
| maxAmount | No | Your hard cap for this payment in atomic units (USDC: 1000000 = $1). Payments above it are denied. | |
| allowCaution | No | false = deny endpoints with a caution verdict too, not just avoid (default true) | |
| priceTolerance | No | Optional, 0-0.5 (default 0.02 = 2%): how far above the endpoint's recent prices still counts as the same price, for sellers whose price drifts (pegged to BTC, gas or FX). Bigger jumps are denied as overcharges. | |
| minOrganicShare | No | Optional, 0-1: deny sellers where less than this share of 30-day volume comes from independent buyers (e.g. 0.5). Not applied to sellers whose buyers haven't been reviewed yet. | |
| requireVerified | No | true = only allow endpoints that delivered on a real test payment (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| allow | Yes | Pay only when true | |
| grade | No | ||
| notes | No | ||
| score | No | ||
| buyers | No | Who is really behind the seller's buyers. Never changes the grade. | |
| values | No | Automatic value checks on the latest paid response | |
| listing | No | Present only when the latest paid response differs from the listing's example or schema. The data is delivered. | |
| reasons | Yes | Why it was allowed or denied | |
| verdict | No | proceed | caution | avoid | free | insufficient_data | |
| delivery | No | ||
| forTeams | No | Short note about team plans (per-agent keys, spend limits, audit trail) | |
| observed | No | The latest payment quote our monitor saw | |
| monitored | Yes | Whether the endpoint is in the monitored catalog | |
| payToMode | No | ||
| reviewable | No | Denied only for reasons a person may approve | |
| afterPaying | No | How to report the outcome after paying (free, verified on-chain) | |
| authRequired | No | true: the seller needs its own sign-in on top of x402; send hasAccess: true if you have it | |
| buyerReports | No | What real buyers reported after paying. Never changes the grade; confirmations move the endpoint up our paid-test queue. | |
| gradeReasons | No | Every factor behind the endpoint's grade (same as check_endpoint's reasons) | |
| declaredPayTo | No | Payout wallets the seller declared itself | |
| gradeHeadline | No | Why the endpoint has its grade, in one sentence | |
| walletUnconfirmed | No |