Generate paid retry templates for flaky L402 endpoints — 7 sats
Generate robust retry plans for paid L402 endpoints. Returns query/header/auth variants plus copy-paste curl commands so you can confirm which auth shape the target accepts.
Fast path: request invoice, pay, then rerun with payment_hash.
7 sats via L402.
payment_hash.
Accepted payment_hash locations: body, query string, X-Payment-Hash, Authorization header.
'; res.innerHTML=html; }else if(r.ok){ var order=(d.replay_order||[]).join(' -> '); res.innerHTML=(order?'Try order: '+escapeHtml(order)+'
'+escapeHtml(JSON.stringify(d,null,2))+''; }else{ res.innerHTML='
Error: '+(d.error||r.status)+'
'+(d.detail?escapeHtml(String(d.detail)):'')+''; } res.style.display='block'; }catch(e){res.innerHTML='
Network error
';res.style.display='block'} btn.disabled=false;btn.textContent='Generate replay plan'; })()">Generate replay plan# 1) Request invoice + payment_hash
REQ=$(curl -sS -X POST https://maximumsats.com/api/proof-replay \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/api/paid","method":"POST","headers":{"Content-Type":"application/json"},"body":{"prompt":"hello"}}')
echo "$REQ" | jq .
PAYMENT_HASH=$(echo "$REQ" | jq -r '.payment_hash')
# 2) Pay invoice, then retry with payment_hash
curl -X POST "https://maximumsats.com/api/proof-replay?payment_hash=${PAYMENT_HASH}" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/api/paid","method":"POST","headers":{"Content-Type":"application/json"},"body":{"prompt":"hello"}}'
{
"status": "payment_required",
"price_sats": 7,
"payment_request": "lnbc...",
"payment_hash": "<hash>"
}
# after payment:
{
"ok": true,
"payment_hash": "<hash>",
"replay_order": [
"query_payment_hash",
"x_payment_hash_header",
"authorization_l402_hash",
"authorization_l402_macaroon_proof"
],
"variants": [
{
"name": "query_payment_hash",
"curl": "curl -X POST 'https://example.com/api/paid?payment_hash=<hash>' ..."
}
]
}
proof_replay_generate at maximumsats.com/mcp. Quickstart: /blog/l402-proof-replay-quickstart