Skip to content

Debugging & pitfalls

  • Missing or invalid payment-signature on retry — confirm the client sends the header name your middleware expects (case-insensitive in HTTP, but be consistent).
  • Wrong facilitator URLverify/settle must be reachable from your server, not the browser.
  • Amount / network / payee mismatch — requirements in the 402 body must match what the client signed.
  • Check facilitator logs or response bodies for settlement errors (insufficient allowance, wrong chain, expired authorization).
  • Ensure timeouts in your middleware are high enough for slow RPCs (@tallypay/server uses bounded fetch timeouts).
  • If the browser calls your API cross-origin, configure CORS for your API origin and avoid relying on cookies unless you control both sides.

Symptom: “works locally, fails in prod”

Section titled “Symptom: “works locally, fails in prod””
  • HTTPS and mixed-content rules for wallet libraries.
  • Environment variables for facilitatorUrl, payTo, and keys — use separate values for test vs mainnet.
  • Add optional apiKey (server + client) so TallyPay can stitch 402_ISSUED402_RECEIVEDsettlement into a single trace.
  • Propagate x-trace-id from responses in your own logs for support tickets.
  • Never log raw payment signatures or secrets.
  • Treat facilitator responses as untrusted input — map to your own error codes for clients.

If you want this list expanded with concrete error strings from your facilitator, suggest an edit once the docs repo is public—or reach out via tallypay.dev until then.