GET
Get billing state

Overview

Combines two facts into a single read:
  1. The global paywall flag — is the 50-listing launch-phase threshold still active for the platform as a whole? See Paywall and launch phase for the rule and the one-way flip semantics.
  2. The caller’s subscription status — ACTIVE, TRIALING, CANCELLED, EXPIRED, PAST_DUE, or NONE when the user has never subscribed.
The client uses these together: while paywallActive === false no purchase prompt is needed; once it flips to true, only users with subscriptionStatus ∈ { ACTIVE, TRIALING } retain access to paywalled features.
The paywall calculator is cached in Redis for 60 seconds (key paywall:state:v1). Two requests within the same 60s window may return identical currentListings even if the live count just changed. The flip itself is one-way and durable — the cache TTL only affects how quickly clients observe a new flip, not whether the paywall stays on once it has flipped.

Authentication

Bearer <accessToken> required. requireAuth middleware applied. requireOnboarded is NOT applied — pre-onboarded users still need to be able to read the paywall flag (e.g. to gate the onboarding CTA itself).

Path parameters

None.

Query parameters

None.

Request body

None.

Response — 200 OK

After the flip + an active subscriber

After the flip + a trial user

Subscription status values

The full RC → local status table is documented in Paywall and launch phase — Subscription state.

Error responses

Example error — 401 UNAUTHENTICATED

See also

curl

Postman

See docs/postman/swappr.postman_collection.json → Billing → Get state.