Check an x402 payment before paying
check_paymentDecide whether an x402 payment should proceed before paying: verify endpoint trust, amount caps, wallet match, and optional organic share, returning allow with reasons.
Instructions
Decide 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) | |
| 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) |