> ## Documentation Index
> Fetch the complete documentation index at: https://help.coachiq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up Credit-Based Scheduling

> Step-by-step guide to creating credit-issuing products and configuring schedulers to accept credits for bookings

<Info>
  **Prerequisites**: Read [Credit System Explained](/scheduling/credit-system-overview) first to understand credit concepts and types (Master Credits vs Scheduler-Specific Credits) before implementing.
</Info>

## Overview: Two-step setup process

Setting up credit-based scheduling requires **two separate configurations** that link together:

<Steps>
  <Step title="Create credit-issuing products (Payment side)">
    **Where**: Payments → Products

    **What**: Configure products that issue credits when purchased

    **Two options**:

    * **One-Time Payment**: Issues all credits immediately upon purchase
    * **Subscription**: Issues credits per billing cycle (monthly/weekly/yearly)

    **Result**: Athletes can buy credits and receive them in their account balance

    See [Credit Products →](https://coachiq.mintlify.app/payments/credits-products)
  </Step>

  <Step title="Configure schedulers to accept credits (Schedule side)">
    **Where**: Schedule → Schedulers → Scheduler Settings

    **What**: Enable credit payment option on schedulers

    **Options**:

    * Credit-Only (must use credits)
    * Hybrid (credit OR direct payment)
    * Payment-Only (no credits accepted)

    **Result**: Athletes can redeem their credits when booking sessions

    See [Creating Your First Scheduler →](https://coachiq.mintlify.app/scheduling/creating-your-first-scheduler)
  </Step>
</Steps>

<Warning>
  **Critical linkage**: Products and schedulers must be linked! Configure **"Redeemable Schedulers"** in the product to specify which sessions accept those credits. If not linked, athletes can buy credits but can't use them.
</Warning>

***

## Testing your complete credit setup

Before launching to real athletes, thoroughly test the entire flow:

<Steps>
  <Step title="Create test athlete account">
    Set up dummy athlete for testing by creating an account through your athlete portal:

    * **Name**: Test Athlete
    * **Email**: A second personal email (different from your admin email)
    * **Tag**: "TEST" for easy filtering
  </Step>

  <Step title="Grant credits to test athlete">
    **Option A: Manual credit grant** (faster for testing)

    1. Open Test Athlete's profile in People → Clients
    2. Navigate to **Credits** tab
    3. Click **Master Credits** tab
    4. Look for **Credit Balance**
    5. Enter `10` credits
    6. Save

    **Result**: Test Athlete now has 10 credits from your product

    **Option B: Complete purchase flow** (comprehensive test)

    1. Get product purchase link from Products page (admin)
    2. Open link in incognito window and log in as athlete (athlete)
    3. Complete purchase using Stripe test mode.
    4. Verify credits appear in Test Athlete's account (admin)

    <Tip>
      **Stripe test mode**: Use test credit cards to avoid real charges. Test card: `4242 4242 4242 4242`
    </Tip>
  </Step>

  <Step title="Verify credit display in athlete view">
    Log in as Test Athlete (or access their athlete portal).

    Navigate to **Settings → Billing** (or wherever credit balance displays).

    **Verify athlete sees**:

    * ✅ "Available Credits" section
    * ✅ Correct credit balance (10 credits)
    * ✅ Product name listed (e.g., "10-Credit Package")
    * ✅ "Redeemable Sessions" list (if scheduler-specific credits)
      * Shows which schedulers accept these credits
      * Shows usage notation (0/∞ or numeric)
    * ✅ Credit Renewals date (if subscription)
    * ✅ Credit Expirations tracking (if expiration set)

    **Red flag**: If athlete can't see credits or product name, configuration issue exists
  </Step>

  <Step title="Test booking with credits">
    As Test Athlete, navigate to booking flow:

    1. Go to \*\*Scheduler \*\*page on your athlete portal
    2. Select your credit-enabled scheduler
    3. Choose date & time
    4. Proceed to payment step

    **Verify booking flow shows**:

    * ✅ "Use 1 Credit" option (or configured amount)
    * ✅ If hybrid: Both credit and payment options visible
    * ✅ Clear indication which payment method will be used

    5. Select **Use Credit**
    6. Confirm booking

    **Verify after booking**:

    * ✅ Session appears on calendar
    * ✅ Credit deducted (balance now 9 credits)
    * ✅ Credit transaction logged in athlete's credit history
    * ✅ Confirmation notification sent (email/SMS)

    <Check>
      **Success indicator**: Smooth booking flow, credit deducted automatically, athlete sees updated balance immediately.
    </Check>
  </Step>

  <Step title="Test insufficient credits scenario" stepNumber={5}>
    Deplete Test Athlete's credits completely:

    1. Book sessions or change balance = 0
    2. Attempt to book one more credit-only session
    3. **Verify system prevents booking**
    4. **Verify error message**: "Not enough credits"
    5. **(Optional) Verify**: Link to purchase more credits provided (if credit renew link is enabled)
    6. If hybrid scheduler: **Verify** can still book via payment

    **What this tests**: System properly enforces credit requirements and guides athlete to purchase
  </Step>

  <Step title="Test scheduler-specific restrictions">
    If you configured scheduler-specific credits:

    **Setup**:

    * Product: 5 credits for "Rising Stars Class" only
    * Test Athlete has credits from Product A

    **Test**:

    1. Attempt to book "Rising Stars Class" → **Should work** (uses Product A credits)
    2. Attempt to book "Elite Class" → **Should fail**
    3. Verify athlete sees clear messaging that they don't have the sufficient credits

    **Verify in Billing settings**:

    * "Redeemable Sessions" list shows correct schedulers for Product A

    **What this tests**: Scheduler restrictions working correctly, credit priority system functioning (scheduler-specific used first)
  </Step>

  <Step title="Test credit refund on cancellation (if setting is enabled)">
    Book a session as Test Athlete, then cancel it:

    1. Book session (1 credit deducted, balance = 9)
    2. Cancel session (within allowed cancellation window)
    3. **Verify**: Credit refunded back to balance immediately (balance = 10)
    4. **Verify**: Credit transaction logged as "Refunded for \[Session Name]"
    5. **Verify**: Athlete sees updated balance

    **Test outside cancellation window** (if configured):

    1. Book session
    2. Wait until past cancellation deadline
    3. Attempt cancel
    4. **Verify**: System prevents cancellation OR credit not refunded (per your policy)

    **What this tests**: Credit refund automation working, cancellation policies enforced
  </Step>

  <Step title="Test subscription renewal (if using subscriptions)">
    For subscription products:

    **Test scenario 1: Active subscription**

    1. Test Athlete has active monthly subscription (5 credits/month)
    2. Use all 5 credits this month
    3. Wait for renewal date OR manually trigger renewal (Stripe dashboard)
    4. **Verify**: Athlete receives fresh 5 credits
    5. **Verify**: Unused credits expired OR carried over (per your settings)
    6. **Verify**: "Credit Renewals" date updates to next month

    **Test scenario 2: Cancelled subscription**

    1. Cancel Test Athlete's subscription in Stripe
    2. **Verify**: Existing credits may become unusable
    3. **Verify**: Athlete cannot book using subscription credits after cancellation
    4. **Verify**: "Redeemable Sessions" may no longer display or show as inactive

    **What this tests**: Subscription lifecycle, credit issuance automation, Stripe integration
  </Step>

  <Step title="Test unlimited credits display (∞)">
    If you configured subscription with unlimited credits:

    1. Test Athlete has "Unlimited Monthly Membership"
    2. Navigate to Billing settings
    3. **Verify athlete sees**:
       * "Credit Balance: ∞" (infinity symbol)
       * "Redeemable Sessions: \[Schedulers] (0/∞)" notation
    4. Book 1-2 sessions
    5. **Verify**: Balance still shows ∞
    6. **Verify**: Usage tracking shows "2/∞" (used 2, unlimited remaining)

    **At renewal**:

    1. Trigger next month's billing
    2. **Verify**: Usage resets to 0/∞ (fresh unlimited period)
    3. **Verify**: Previous month's bookings don't affect new month's availability

    **What this tests**: Infinity notation displays correctly, usage resets per billing period
  </Step>
</Steps>

<Check>
  **All tests passed?** Your credit system is production-ready! Document any issues and retest after fixes before launching to real athletes.
</Check>

## Troubleshooting credit setup

<AccordionGroup>
  <Accordion title="Athlete purchased credits but they didn't appear">
    **Possible causes:**

    1. Payment didn't complete (declined card, Stripe error)
    2. Product not configured with "Add credits once purchased" enabled
    3. Credit granting system error

    **How to fix:**

    1. Check payment transaction status: Payments → Products
    2. Verify product configuration: Product  → Credits section → "Add credits once purchased" toggled ON
    3. Check credit amount field is set (not blank)
    4. Manually grant credits to athlete if payment succeeded: People → Athlete → Credits tab
    5. If system error: Contact CoachIQ support with customer and order info
  </Accordion>

  <Accordion title="Athlete has credits but can't use them to book">
    **Possible causes:**

    1. Scheduler not configured to accept credits (payment-only)
    2. Scheduler-specific credits don't match this scheduler (wrong product/scheduler linkage)
    3. Athlete has 0 credits (all used)
    4. Product's "Redeemable Schedulers" doesn't include this scheduler

    **How to fix:**

    1. Verify scheduler has credit payment enabled: Scheduler Settings → Payment → Credits option ON
    2. Check athlete's credit balance: Should show in their profile Credits tab
    3. Verify product configuration: Product Builder → Usage Limits → "Redeemable Schedulers" includes this scheduler
    4. Check credit type: If scheduler-specific, athlete needs credits from correct product
    5. Test booking yourself to replicate issue
  </Accordion>

  <Accordion title="Credit balance showing incorrect number">
    **Possible causes:**

    1. Recent booking/cancellation still processing
    2. Manual credit adjustment not saved properly
    3. Multiple packages purchased close together (timing)
    4. Subscription renewal timing issue

    **How to fix:**

    1. Review athlete's credit transaction history: Credits tab → Credit Logs
    2. Check for pending bookings that haven't deducted yet
    3. Look for recent cancellations that should have refunded credits
    4. If system error confirmed: Manually adjust balance with note
    5. Document issue and report to CoachIQ support if recurring
  </Accordion>

  <Accordion title="Hybrid scheduler not showing both payment options">
    **Possible causes:**

    1. Scheduler set to "Credit-Only" instead of "Hybrid"
    2. Athlete viewing has 0 credits (only payment option shows)
    3. Credit payment not enabled on scheduler
    4. Browser cache issue

    **How to fix:**

    1. Verify scheduler payment settings: Should show BOTH credit amount AND direct payment amount
    2. Test as athlete with credits: Both options should appear
    3. Test as athlete with 0 credits: Only payment option should appear
    4. Clear browser cache and retry
    5. Check scheduler "Pricing Model" dropdown is set to correct option
  </Accordion>

  <Accordion title="Athletes asking 'Why should I buy credits vs pay per session?'">
    **Communication problem**: Value proposition not clear enough

    **How to fix:**

    1. **Clearly state savings**: "Save \$50 with 10-Credit Package!" (use actual dollar amount)
    2. **Highlight convenience**: "No payment hassle at each booking—use credits instantly"
    3. **Emphasize commitment**: "Lock in your training schedule and stay consistent"
    4. **Use social proof**: "Our most popular option—90% of athletes choose packages"

    **On booking page**: Display comparison

    * Pay per session: $50 each = $500 for 10 sessions
    * 10-Credit Package: \$450 for 10 sessions
    * **You save: \$50** (bold this)

    **Visual**: Show side-by-side comparison with savings highlighted
  </Accordion>

  <Accordion title="Subscription credits not renewing automatically">
    **Possible causes:**

    1. Subscription inactive in Stripe (payment failed, cancelled)
    2. Product configuration error
    3. "Add credits once purchased" not enabled for recurring
    4. Stripe webhook issues

    **How to fix:**

    1. Check subscription status in Stripe dashboard: Should be "Active"
    2. Verify product is subscription type (not one-time)
    3. Check Product Builder → Credits → "Add credits once purchased" is ON
    4. Test: Manually trigger renewal in Stripe → Verify credits issued
    5. Check webhook connectivity: Payments → Settings → Webhooks
    6. If webhooks failing: Contact CoachIQ support
  </Accordion>

  <Accordion title="Unlimited credits (∞) not displaying correctly">
    **Possible causes:**

    1. Product "Unlimited credits" checkbox not enabled
    2. Display formatting issue
    3. Browser rendering problem

    **How to fix:**

    1. Verify product configuration: Product Builder → Credits → "Unlimited credits" checkbox ON
    2. Check athlete's view in Billing settings: Should show ∞ symbol
    3. Verify per-scheduler display: "0/∞" notation under Redeemable Sessions
    4. Test with different browser if rendering issue suspected
    5. Educate athlete: ∞ means unlimited THIS PERIOD, not forever
  </Accordion>
</AccordionGroup>

***

## Related articles

<CardGroup cols={3}>
  <Card title="Credit System Explained" icon="coins" href="/scheduling/credit-system-overview">
    Understand credit concepts, types, and business benefits (prerequisite reading)
  </Card>

  <Card title="Products Overview" icon="shopping-cart" href="/payments/products-overview">
    Master CoachIQ's product system and payment configuration
  </Card>

  <Card title="Creating Schedulers" icon="sliders" href="/scheduling/creating-your-first-scheduler">
    Set up bookable sessions before adding credit functionality
  </Card>

  <Card title="Manual Booking" icon="user-plus" href="/scheduling/manually-booking-athletes">
    How coaches manually book athletes and deduct credits
  </Card>

  <Card title="Cancellation Policies" icon="times-circle" href="/scheduling/canceling-bookings">
    Credit refund rules and cancellation policy configuration
  </Card>
</CardGroup>

***

<Check>
  **You now have**: A fully functional credit-based scheduling system with products issuing credits and schedulers accepting them. Athletes can purchase packages and seamlessly book sessions using their credit balance.
</Check>

<Info>
  **Need personalized setup help?** Our support team can review your credit configuration, test your setup, and optimize your package pricing strategy. [Contact Support](https://support.coachiq.com)
</Info>
