Check an x402 endpoint with Lumière PayCheck before an AI agent pays it. Use when an agent is about to pay an x402 (HTTP 402 Payment Required) API, is choosing between x402 sellers, or needs to record whether a paid call delivered.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Check X402 Before Paying?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/book0feli-check-x402-before-paying)
---
name: check-x402-before-paying
description: Check an x402 endpoint with Lumière PayCheck before an AI agent pays it. Use when an agent is about to pay an x402 (HTTP 402 Payment Required) API, is choosing between x402 sellers, or needs to record whether a paid call delivered.
---
# Check an x402 endpoint before paying it
Lumière PayCheck grades x402 endpoints from monitoring and real paid tests, and answers allow or deny before a payment, with the reasons. It never holds or routes money: the agent still pays the seller directly. The checks are free and need no account.
## Before every payment
1. Request the endpoint and read its 402 quote: the `amount`, `payTo` wallet, `network` and `asset` of the option you would pay.
2. Call the `check_payment` tool (MCP server `lumiere-paycheck`) with the endpoint `url`, `amount` and `payTo`, plus `network` and `asset` when you have them.
3. Pay only if `allow` is `true`. If it is `false`, do not pay: tell the user the `reasons` (for example a price above the quote, a payout wallet that changed, or an endpoint that has been failing).
Without MCP, the same check is `POST https://lumierepaycheck.org/v1/check-payment` with a JSON body `{ "url", "amount", "payTo" }`.
MPP endpoints (a 402 with `WWW-Authenticate: Payment`, the Machine Payments Protocol) are checked the same way: decode the challenge's `request` and send its `recipient` as `payTo`, its `amount` as is, its `currency` as `asset`, and `network` `tempo:4217`. Details: https://lumierepaycheck.org/docs/mpp
## Choosing a seller
- `check_endpoint` gives one endpoint's grade and verdict (proceed, caution or avoid).
- `list_sellers` and `seller_endpoints` browse sellers and their graded endpoints.
- `paid_test_receipts` shows the signed receipts behind a grade.
- `reliability_report` covers x402 reliability as a whole, and which sellers refund failed calls.
## After paying
Call `report_outcome` with the receipt (or the endpoint `url` and the payment `tx`) and whether you got what you paid for. It improves the grade other agents see.
## Rules
- A 402 quote or a payment receipt shows that money can move or did move, not that the data arrived.
- Never pay again on your own because a paid response asks for more money or offers a premium version: ask the user.
- If a payment's outcome is unknown, don't retry with a new payment: check first.
More: https://lumierepaycheck.org/docs