Skip to main content
Public and checkout routes use per-client sliding windows via rateLimit(identifier, { maxRequests, windowMs }) in lib/rateLimit.ts. Identity comes from getClientIdentifier(req) (IP / forwarded headers).

Integrator budgets

Public catalog GETs (…/storefront, …/products, GET /api/store/{subdomain}) currently have no route-level rate limit — still cache-friendly; do not hammer them from scrapers.

429 shape

Embed example:
Some routes also emit Retry-After / X-RateLimit-* headers via rate-limit-guard helpers.

Guidance

  • Debounce buy buttons.
  • Call Markt.init() once per page.
  • Cache catalog responses client-side for short TTL.
  • Payment verify polling should back off — prefer webhooks for settlement.