Division Membership Integration

How to check and enforce membership across all SphereUs℠ divisions

How It Works

All SphereUs℠ divisions share the same User entity through Base44's unified authentication. When a user pays $50/year from any division (or SphereUs.com), their membership status is instantly available to all divisions.

Key Points:

  • Users can browse division content without membership
  • Membership required to use any division features
  • One $50/year payment unlocks all 13 divisions
  • Marketplace items are separate, per-transaction charges
Implementation for Division Agents

Step 1: Check Membership Status

import { base44 } from "@/api/base44Client";

// Check if user is authenticated and has membership
const user = await base44.auth.me();

if (!user) {
  // Not logged in - redirect to login
  base44.auth.redirectToLogin(window.location.href);
  return;
}

// Check membership tier
const hasMembership = user.membership_tier === 'member' || 
                      user.membership_tier === 'premium';

if (!hasMembership) {
  // Redirect to SphereUs.com pricing page
  window.location.href = 'https://sphereus.com/pricing';
  return;
}

Step 2: Gate Feature Access

// Example: Button that requires membership
<Button 
  onClick={() => {
    if (!user || user.membership_tier === 'free') {
      window.location.href = 'https://sphereus.com/pricing';
    } else {
      // Access feature
      handleFeatureAction();
    }
  }}
>
  Use Feature
</Button>

Step 3: Show Upgrade Prompt

// Display membership gate UI
{user?.membership_tier === 'free' && (
  <div className="bg-amber-50 border-2 border-amber-200 rounded-xl p-6">
    <h3 className="text-xl font-bold mb-2">
      Membership Required
    </h3>
    <p className="text-gray-700 mb-4">
      Subscribe to SphereUs℠ for $50/year to access 
      all division features and the marketplace.
    </p>
    <a href="https://sphereus.com/pricing">
      <Button>Subscribe Now - $50/year</Button>
    </a>
  </div>
)}
Available User Fields
{
  id: "user-uuid",
  email: "user@example.com",
  full_name: "John Doe",
  role: "user" | "admin",
  membership_tier: "free" | "member" | "premium",
  membership_expires: "2025-12-31",
  stripe_customer_id: "cus_...",
  solana_wallet_address: "..."
}
Testing Checklist

Logged Out: Features should redirect to login page

Free Tier: Show upgrade prompt when accessing features

Member/Premium: Full access to all division features

Cross-Division: Verify membership status syncs across divisions

Important Notes

Payment Processing

All payments go through SphereUs.com. Do NOT implement separate payment flows in division apps. Always redirect to https://sphereus.com/pricing

Marketplace Items

SphereUs℠ Marketplace listings are separate charges. Users need membership to browse/buy, but each marketplace item is charged individually.

No API Calls Needed

You don't need to call any APIs. Base44's auth.me() automatically includes membership_tier. Just check the field and redirect accordingly.

Questions about integration? Contact SphereUs Support