- Home
- Skills
- APIs & Backend
- l402 endpoint health
l402 endpoint health
Report HTTP status and whether a challenge has a macaroon and an invoice.
$9
l402 endpoint health
Example session with this skill installed
Check the health of my L402 server running at http://127.0.0.1:8081 and verify the payment challenge works.
- Read your context and instructions
- Compiled the l402 endpoint health
I have probed the L402 endpoint at http://127.0.0.1:8081. The health check passed, and the server successfully issued a 402 Payment Required challenge with the required metadata.
L402 Endpoint Diagnostic Report
| Probe Target | Endpoint Path | Status Code | Result |
|---|---|---|---|
| System Health | /health | 200 OK | Healthy (Body: "OK") |
| Payment Challenge | /paid/hello | 402 Payment Required | Challenge Detected |
| Macaroon Field | Header Data | N/A | Found |
| Invoice Field | Header Data | N/A | Found |
Privacy Guard: No macaroons, preimages, or BOLT11 invoices were logged or displayed during this check. All sensitive payment tokens remain local to the server challenge.
Next steps
- Proceed with payment implementation now that the challenge-response handshake is confirmed.
- Check your Lightning node logs if the invoice field was missing (though it was found in this test).
- Update your client to use the
agent-bitcoinlibrary to handle the confirmed macaroon.
Connects securely to your tools. The creator never sees your data.
About this skill
Debugging L402 endpoints manually is tedious and prone to accidental leakage of sensitive credentials. This skill automates the verification of L402-enabled servers, ensuring they correctly issue payment challenges without compromising security.
What it does
- Health Check probes the
/healthpath to confirm the server is reachable and responding with a standard 200 status. - Challenge Verification attempts a GET request on protected paths like
/paid/helloto trigger the required 402 Payment Required status. - Header Parsing validates that the
WWW-Authenticateheader contains the necessary macaroon and BOLT11 invoice fields. - Credential Protection ensures that no macaroons, preimages, or invoices are logged or printed to the output.
How it works
- Target Probe starts with a standard GET request to the user-provided base URL to check connectivity.
- Health Validation executes a request to
{base}/healthand captures the HTTP status code and response body. - Challenge Test sends a request to the protected endpoint to induce a 402 error.
- Metadata Extraction uses
parse_www_authenticateto verify the presence of payment metadata without displaying the actual secrets.
Frameworks & tools
This skill utilizes the agent-bitcoin library for L402 header parsing and Python's standard urllib for low-level network requests. It can also fall back to curl for quick diagnostic checks.
Why this beats prompting it yourself
Writing prompts to handle L402 logic often leads to the LLM trying to "complete" the payment or leaking the macaroon strings in the chat logs. This skill enforces a "probe-only" mode that protects your wallet secrets while providing a structured diagnostic report.
Use cases
- Verify a new L402 server deployment is correctly configured.
- Confirm an endpoint is properly requesting payment before initiating a transaction.
- Debug 500 errors vs 402 challenges in Lightning-gated APIs.
- Monitor the uptime of specific pay-to-access paths.
Known limitations
Does not support signing into Agensi or completing payments. It only reports on the presence of headers, not their cryptographic validity.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 9 days ago
- Software
Python 3.10+agent-bitcoin package
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.