l402 endpoint health

    by agent-bitcoin

    1

    Report HTTP status and whether a challenge has a macaroon and an invoice.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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 TargetEndpoint PathStatus CodeResult
    System Health/health200 OKHealthy (Body: "OK")
    Payment Challenge/paid/hello402 Payment RequiredChallenge Detected
    Macaroon FieldHeader DataN/AFound
    Invoice FieldHeader DataN/AFound

    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

    1. Proceed with payment implementation now that the challenge-response handshake is confirmed.
    2. Check your Lightning node logs if the invoice field was missing (though it was found in this test).
    3. Update your client to use the agent-bitcoin library 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 /health path to confirm the server is reachable and responding with a standard 200 status.
    • Challenge Verification attempts a GET request on protected paths like /paid/hello to trigger the required 402 Payment Required status.
    • Header Parsing validates that the WWW-Authenticate header 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

    1. Target Probe starts with a standard GET request to the user-provided base URL to check connectivity.
    2. Health Validation executes a request to {base}/health and captures the HTTP status code and response body.
    3. Challenge Test sends a request to the protected endpoint to induce a 402 error.
    4. Metadata Extraction uses parse_www_authenticate to 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Network Access
    Environment Variables
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    Manual testing often results in accidental exposure of macaroons or invoice data in logs. This skill provides a 'probe-only' diagnostic that confirms the L402 challenge flow is functioning without ever displaying or storing sensitive secrets.

    No, this skill is strictly a diagnostic tool designed to verify that the 402 Payment Required status and necessary headers are present; it does not have the capability to sign transactions or pay invoices.

    You will receive the production-ready skill code, documentation for integration, and a set of pre-configured diagnostic probes for common L402 paths like /health and /paid.

    The skill performs a dual-stage check: first, it validates basic connectivity via the /health path, and then it confirms the L402-specific challenge by verifying the presence of macaroons and BOLT11 fields in the WWW-Authenticate header.

    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.