Skip to content
Back to skills

Check X402 Before Paying

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 22, 2026
ai-agentsgoapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add Book0fEli/lumiere-paycheck --skill check-x402-before-paying --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Check X402 Before Paying?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Check X402 Before Paying
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/book0feli-check-x402-before-paying/badge)](https://www.skillsdirectory.com/skills/book0feli-check-x402-before-paying)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.