Webhooks

Commercial access state is managed centrally.

This page explains how subscription and access state behave operationally. It is not a public callback API for partner systems.

Operational Surface

Subscription and auth state handling

Inbound

revenuecatWebhook

Receives subscription lifecycle events and applies access-state changes.

Sync

syncToKV

Pushes hashed auth state into the Worker cache after key or subscription changes.

Worker

Hashed auth cache

The Worker validates credentials against prewarmed hashed auth-cache entries.

Lifecycle

Expected commercial access transitions

Purchase / Renewal

Activate paid access

Successful purchase and renewal events move the account into active commercial access.

Expiration / Billing Issue

Downgrade access

Expired or failed billing state reduces access according to the managed commercial rules.

Post-update sync

Refresh Worker auth state

After state changes, auth-cache data is synced so Worker behavior matches the updated account status.

What To Document Publicly

Keep partner-facing docs clear about boundaries

Document

How subscription state affects access

Partners need to understand that subscription state controls access and rate-limit behavior.

Document

That key state is managed centrally

Trial and commercial credential behavior, rotation, and validation are managed centrally.

Do not expose as partner API

Internal sync details

Internal auth-state sync routes are implementation details, not partner endpoints.

Do not expose as partner API

Test-only handlers

Fallback and test utilities should stay out of partner-facing product documentation.