Gymhopper — Subscription Gym Network

Fitness subscription network enabling seamless check-ins across partner gyms with Redis-powered access control.

Tags: SubscriptionMobilePayments
Tech Stack: C# MySQL Redis Stripe
Gymhopper — Subscription Gym Network

Introduction

Gymhopper gave fitness users access to a network of partner gyms across multiple cities under a single subscription — one membership, any gym in the network. I built the backend: user registration, gym network mapping, subscription lifecycle management, multi-city check-in access control, and the partner gym integration layer.

The Challenge & Solution

The critical path was check-in verification: when a user scans in at a partner gym, the system must confirm their subscription is active in under 50ms — gyms cannot hold a queue of people waiting for a slow API response. Going to the database on every check-in request would not scale once the network grew across multiple cities with concurrent check-ins. Redis was used to cache active subscription status by user ID, reducing check-in verification to a single in-memory lookup rather than a database query. The cache was invalidated on any Stripe subscription event (cancellation, payment failure, renewal) via webhook, making Redis the source of truth for access control at the gym door. Stripe webhook-driven state machine updates meant the system never needed to poll the payment API — subscription status in Redis was always consistent with actual payment state.

Technologies & Architecture

  • Redis: Subscription status cache keyed by user ID — sub-50ms check-in verification at the gym door without hitting the database on each access request. Cache invalidation driven by Stripe webhooks kept status accurate without polling.
  • MySQL: Persistent store for the read-heavy check-in history and gym network topology — relational joins across users, gyms, cities, and subscription tiers suited the structured access patterns of reporting and partner portal queries.
  • Stripe: Webhook-driven subscription state machine — payment events (renewal, failure, cancellation) triggered cache invalidation in Redis immediately, ensuring access control reflected real payment status without any polling lag.
  • C#: Backend API handling multi-city access control logic, partner integration endpoints, and the subscription lifecycle workflows including trial, active, suspended, and cancelled states.

Key Highlights

  • Flexible access
  • Merchant portal
  • Usage analytics

Impact

Redis caching delivered sub-50ms check-in verification across the gym network, eliminating the queue bottleneck at partner gym entrances. Stripe webhook-driven cache invalidation ensured subscription access control was always consistent with actual payment state — no polling, no stale access grants after cancellation.

Visit Project