L402 Auth Builder

Generate paid retry auth variants from challenge data — 9 sats

About

Build ready-to-use L402 retry auth variants for another paid endpoint. Provide the target endpoint's payment_hash directly, or pass challenge/header data and let the tool extract it.

Try It

9 sats via L402. First call returns invoice; second call with payment_hash returns auth variants.

API Usage

curl -X POST https://maximumsats.com/api/l402-auth-build \
  -H "Content-Type: application/json" \
  -d '{"endpoint_payment_hash":"<target_hash>","macaroon":"Ag...","proof":"<preimage_or_token>","url":"https://example.com/api/paid","method":"POST","headers":{"Content-Type":"application/json"},"body":{"prompt":"hello"}}'

Sample Response

{
  "ok": true,
  "endpoint_payment_hash": "<target_hash>",
  "auth_plan": {
    "replay_order": [
      "query_payment_hash",
      "x_payment_hash_header",
      "authorization_l402_hash",
      "authorization_l402_macaroon_proof"
    ]
  }
}
Also available via MCP as l402_auth_build at maximumsats.com/mcp