Back to home

    Site Map & Design

    All the page templates in Joinazo and how they connect together.

    Member Journey

    How a member discovers and joins a club.

    Home

    Search & browse

    Search / Category

    Filter results

    Club Profile

    View details

    Sign Up / Sign In

    Create account

    Checkout

    Join & pay

    Dashboard

    Manage memberships

    Host Journey

    How a club owner sets up and manages their group.

    Home

    Get started

    Sign Up

    Create account

    Host Setup

    Profile details

    Group Setup

    6-step wizard

    Dashboard

    Manage club

    Admin Panel

    Analytics & payments

    Nav Layouts

    The different navigation headers used across the platform.

    Nav 1

    Logo + search pill (3 modes) + action pill. Expanded search drops down as seamless grey panel.

    Logo
    Location
    Club Name
    Day & Time

    Nav 3

    Home page header with hero search below. Navbar has logo + action pill, search lives in the hero section.

    Logo
    Location
    Club Name
    Day & Time

    Stripe Payment Functions

    Edge functions and flows Cursor needs to build for Stripe Connect payments.

    Payment Flow

    Member clicks Join

    Membership or session

    Create Checkout

    Edge function

    Stripe Checkout

    Hosted payment page

    Webhook fires

    payment_intent.succeeded

    Record payment

    Insert to payments table

    Activate sub

    member_subscriptions

    create-checkout-session

    Creates a Stripe Checkout session using Stripe Connect (destination charges). Takes membership_id or session_id, finds the group's stripe_account_id, sets application_fee_amount (platform fee), and returns the checkout URL.

    STRIPE_SECRET_KEY

    Trigger: POST from checkout page when member clicks 'Join' or 'Subscribe'

    stripe-webhook

    Handles Stripe webhook events. Listens for checkout.session.completed, payment_intent.succeeded, invoice.paid, customer.subscription.deleted, and charge.refunded. Inserts rows into payments table, activates/cancels member_subscriptions, and processes refunds.

    STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET

    Trigger: Stripe sends POST to this endpoint on payment events

    create-subscription

    Creates a recurring Stripe subscription for monthly/yearly memberships using Stripe Connect. Sets up the customer, attaches payment method, creates subscription with transfer_data to the connected account.

    STRIPE_SECRET_KEY

    Trigger: POST when member selects a recurring membership

    create-connect-account

    Creates a Stripe Connect Express account for a group owner. Generates an onboarding link (account_links) so the owner can verify their identity and connect their bank. Saves stripe_account_id to groups table.

    STRIPE_SECRET_KEY

    Trigger: POST from group setup Step 8 when owner clicks 'Connect with Stripe'

    create-connect-login-link

    Generates a Stripe Express Dashboard login link so group owners can view their balance, payouts, and transaction history directly on Stripe.

    STRIPE_SECRET_KEY

    Trigger: POST from dashboard when owner clicks 'View Stripe Dashboard' or 'Withdraw'

    cancel-subscription

    Cancels an active Stripe subscription. Updates member_subscriptions status to 'cancelled'. Optionally processes a prorated refund via Stripe.

    STRIPE_SECRET_KEY

    Trigger: POST from member's subscription management or admin panel

    create-refund

    Creates a Stripe refund for a specific payment. Inserts a row into the refunds table with status 'pending', then updates to 'completed' once Stripe confirms. Supports full and partial refunds.

    STRIPE_SECRET_KEY

    Trigger: POST from admin refunds panel or group owner dashboard

    📋 Cursor Prompt for Stripe Setup

    Set up Stripe Connect payments for Joinazo. I need these Supabase Edge Functions:
    
    1. create-connect-account — Create Stripe Express account for group owners, save stripe_account_id to groups table, return onboarding link.
    
    2. create-checkout-session — Create Stripe Checkout with destination charges. Look up group's stripe_account_id, set application_fee_amount (5% platform fee), support both one-time and subscription payments.
    
    3. stripe-webhook — Handle events: checkout.session.completed, payment_intent.succeeded, invoice.paid, customer.subscription.deleted, charge.refunded. Insert to payments table, activate/cancel member_subscriptions, process refunds.
    
    4. create-subscription — Create recurring subscriptions via Stripe Connect with transfer_data to connected account.
    
    5. create-connect-login-link — Generate Express Dashboard link for group owners to view balance and payouts.
    
    6. cancel-subscription — Cancel Stripe subscription and update member_subscriptions status.
    
    7. create-refund — Process full or partial refunds, insert to refunds table.
    
    Environment secrets needed: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET
    
    All functions must include CORS headers, validate JWT tokens, and use the Supabase service role client for database writes. Use Stripe API version 2023-10-16 or later.

    All Page Templates

    0/23 checked