Skip to content

docs(routes): document dynamic pricing model and webhook verification/retries - #1223

Open
letstokenize wants to merge 2 commits into
mainfrom
docs/routes-pricing-and-webhooks-guide
Open

letstokenize wants to merge 2 commits into
mainfrom
docs/routes-pricing-and-webhooks-guide

Conversation

@letstokenize

Copy link
Copy Markdown
Contributor

Summary

  • src/pages/docs/routes/quotes.mdx: Document the dynamic, quote-based Routes pricing model (variable route/liquidity cost, chain-specific settlement/withdrawal costs, and live exchange rates for cross-asset pairs), contrast binding transfer quotes (destinationAmountMin, quote.expiresAt) with indicative unsubsidized deposit-address estimates, clarify what to show end users (sourceAmount, destinationAmount, fees[]), and explain 1:1 delivery via subsidize: true.
  • src/pages/docs/api/webhooks-guide.mdx & vocs.config.ts: Publish a canonical Tempo Webhooks guide under Data API › Webhooks › Guide covering subscriptions/scopes, headers (tempo-event-id, tempo-event-type, tempo-signature), event types (routes:transfer.updated, routes:deposit.updated, onchain events, ping), ordering and reconciliation (data.version, data.updatedAt, credit only on completed), exact HMAC-SHA256 verification (TypeScript, Python, Go) with a verified canonical test vector, zero-downtime secret rotation, POST /v1/webhooks/{id}/ping, retryable vs. non-retryable failures, backoff schedule (up to 30 attempts), auto-disable at 20 net failures, and 7-day manual replay.
  • src/pages/docs/routes/delivery.mdx: Cross-link the new webhooks guide from Routes delivery tracking.

Verification

  • pnpm check (Biome + styles + oxlint)
  • pnpm check:types
  • pnpm check:anchors (798 links across 315 pages)
  • pnpm og:goldens:check
  • pnpm test (80 test files, 1,777 tests passing, including sidebar coverage and SEO metadata)
  • pnpm build & pnpm check:markdown (0 findings, 347 pages audited)
  • Verified the canonical HMAC-SHA256 test vector in Node (node:crypto) and Python (hmac/hashlib)

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread src/pages/docs/api/webhooks-guide.mdx Resolved
Comment thread src/pages/docs/routes/quotes.mdx Resolved

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest commit fixes both of my earlier nits, and I found no other bugs. A human should still confirm that the new webhook and pricing claims match the live service, because nothing in this repo can back them up.

What was reviewed:

  • The Python verifier now checks isascii() before isdigit() and compares bytes, so malformed headers return False. The heading now reads "Binding and indicative quotes".
  • The new Webhooks "Guide" link in vocs.config.ts is the only sidebar entry for the page.
  • Not checked: the header names, whsec_ secret format, retry and backoff schedule, auto-disable threshold, replay window and pricing model. No local spec or source mentions them, so a reviewer has to compare them against the service.
Extended reasoning...

This docs-only change adds a 355-line webhooks guide with HMAC-SHA256 verifier samples and a sidebar link. It also expands the Routes quotes and delivery pages with pricing, subsidy and status-field guidance. It changes no runtime code. The only security-sensitive part is the verifier sample code that readers will copy into their own receivers. I deferred because the page makes many concrete claims about protocol behavior, limits and pricing, and no OpenAPI spec or source in the checkout confirms them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant