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

# SPA Memberships

> Hour-based SPA membership tiers — what customers buy, how sessions deduct hours, and the rules that govern purchase, usage, and expiry.

# SPA Memberships

A SPA membership lets a customer buy a block of SPA hours up front at a better
rate, then draw down those hours session by session. It is the salon's way of
rewarding regular SPA-goers and securing revenue in advance.

<Info>
  Memberships are **hours-based**, not visit-based or rupee-based. Every tier
  unlocks **all** SPA services — the only thing that limits the customer is how
  many hours they have left.
</Info>

## What it is

Think of a membership as a prepaid pool of SPA time. The customer pays once for
a tier (say, 15 hours), and from then on each SPA session simply subtracts its
duration from the pool. There is no per-session charge — the booking is recorded
at ₹0 because it was already paid for at purchase.

## How it works

<Steps>
  <Step title="Purchase (admin only)">
    A receptionist creates the membership for a customer from the admin portal,
    picks a tier, and takes payment. This generates a `membership_purchase` invoice
    and emails it with a welcome message.
  </Step>

  <Step title="Use it">
    When the customer comes in for a SPA service, a receptionist records the
    session. The session's duration is deducted from the remaining hours, and a ₹0
    booking (flagged as a membership session) plus a ₹0 `membership_session` invoice
    are created.
  </Step>

  <Step title="Stay informed">
    The customer can see their tier, hours used, hours remaining, expiry date, and
    full session history on their `/membership` page.
  </Step>

  <Step title="Expiry">
    When the validity period ends, the membership expires and any unused hours are
    forfeited. Reminders go out at 30, 7, and 1 day before.
  </Step>
</Steps>

### The tiers

<Tabs>
  <Tab title="Silver">
    * **Hours:** 8 hours (stored as `480` minutes)
    * **Price:** ₹10,000 (GST-inclusive)
    * **Validity:** 90 days
    * **Access:** every SPA service — Standard, Premium, and VVIP
  </Tab>

  <Tab title="Gold">
    * **Hours:** 15 hours (stored as `900` minutes)
    * **Price:** ₹15,000 (GST-inclusive)
    * **Validity:** 90 days
    * **Access:** every SPA service — Standard, Premium, and VVIP
  </Tab>

  <Tab title="Platinum">
    * **Hours:** custom — set per deal
    * **Price:** negotiated
    * **Validity:** custom
    * **Access:** every SPA service — Standard, Premium, and VVIP
  </Tab>
</Tabs>

Hours and price are prefilled from the tier but remain overridable at creation,
so staff can honour a negotiated deal.

<Info>
  Internally, hours are stored as **minutes**. Silver's 8 hours is `480` and
  Gold's 15 hours is `900`. The customer always sees hours; the database always
  works in minutes.
</Info>

## Rules

<Warning>
  **One active membership per customer** — enforced by a database constraint. A
  customer cannot hold two active memberships at once.
</Warning>

<AccordionGroup>
  <Accordion title="What limits what a customer can book?">
    Hours are the only constraint. No service is off-limits within a tier — every
    tier unlocks all SPA services, and the customer is limited solely by the hours
    they have left.
  </Accordion>

  <Accordion title="How does recording a session deduct hours?">
    Recording a session creates a ₹0 booking plus a `membership_session` invoice and
    reduces the remaining hours by the session's duration. A session cannot be
    recorded if it exceeds the hours left.
  </Accordion>

  <Accordion title="Do memberships earn loyalty gems?">
    No. Neither the purchase nor the sessions earn loyalty gems. See
    [Loyalty — Gems](/docs/features/loyalty-gems).
  </Accordion>

  <Accordion title="What happens at expiry?">
    Hard expiry. When the validity ends the membership moves to `expired` and unused
    hours are lost. There is no rollover, pause, or transfer.
  </Accordion>

  <Accordion title="What if the salon cancels a session?">
    Salon-cancelled sessions don't cost hours. If the salon cancels a membership
    session, the hours are not deducted.
  </Accordion>

  <Accordion title="When do expiry reminders fire?">
    Automated alerts fire at 30 days, 7 days, and 1 day before expiry, plus an
    immediate alert when less than 1 hour remains.
  </Accordion>
</AccordionGroup>

### Membership number format

```
RG-MEM-{YY}-{branch_number}-{5_random}
```

For example, `RG-MEM-26-1-90872`.

## Related links

<Columns cols={2}>
  <Card title="Memberships API" href="/docs/api-reference/memberships">
    Customer view plus admin create, list, inspect, cancel, and record-session endpoints.
  </Card>

  <Card title="Booking System" href="/docs/features/booking">
    How sessions become bookings (with the -M suffix).
  </Card>

  <Card title="Billing & Invoicing" href="/docs/features/billing-invoicing">
    The membership\_purchase and membership\_session invoice types.
  </Card>

  <Card title="Data Model" href="/docs/data-model">
    The spa\_membership and spa\_membership\_tier tables.
  </Card>
</Columns>


## Related topics

- [Customer Guide](/content/docs/product/customer-guide.md)
- [Memberships](/content/docs/api-reference/memberships.md)
- [Offers & Combos](/content/docs/features/offers.md)
- [Low-Level Design](/content/docs/system-design/low-level-design.md)
- [FAQ](/content/docs/faq.md)
