L402 Auth Diagnoser

Diagnose 401/402 paid retry failures and get next auth plan — 9 sats

About

Debug paid retries that still fail after invoice settlement. Provide retry status/error and request headers to identify likely auth mismatches and generate the next retry plan.

Try It

9 sats via L402.

API Usage

curl -X POST https://maximumsats.com/api/l402-auth-diagnose \
  -H "Content-Type: application/json" \
  -d '{"endpoint_payment_hash":"<target_hash>","retry_status":401,"retry_error":"invalid_auth_format","attempt_headers":{"Authorization":"L402 <hash>"}}'

Sample Response

{
  "ok": true,
  "diagnosis": {
    "retry_status": 401,
    "likely_causes": [
      "Target rejected auth format; replay likely needs a different proof location or macaroon:proof Authorization."
    ]
  },
  "next_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_diagnose at maximumsats.com/mcp