Lockouts
A lockout is a monthly studio subscription—ongoing access to a private studio with recurring billing. This guide covers creating, updating, and canceling lockouts.
Finding Lockouts
There are a few ways to find existing lockouts:
- From the staff dashboard, click Lockouts for a filtered view
- From Reservations, filter by resource type to show only monthly studios
- Press
⌘Kand search for the member's name
Creating a Lockout
From the staff dashboard, click Create Lockout, or from Reservations, click Add Lockout.
1. Select the Member
Choose an existing user or create a new one. Creating a new user sends them an invite to set up their account.
2. Set the Start Date
Pick when the lockout begins. This can be in the past or future. If the start date is mid-month, you'll see an option to pro-rate the first payment.
3. Choose Location and Studio
Select the location first, then choose from the available studios at that location.
4. Set the Price
The form shows the base price, but you can adjust it. You'll see both:
- Card price — What they pay with a credit/debit card
- Bank account price — A discounted rate for ACH payments
5. Apply Discounts (Optional)
- Discount code — If there's a Stripe coupon to apply, select it here
- Member referral — If they were referred by another member, select that person
6. Set Their Access Code
The system generates an access code automatically, but you can customize it. This code works for all their reservations and stays the same until you change it.
Click Generate to create a new random code if needed.
7. Choose Insurance
Select one of these options:
- No insurance — The member must provide proof of their own coverage within 30 days
- Insurance plan — Adds coverage to their subscription at an additional cost
8. Review and Generate Payment Link
The summary shows everything you've configured. When ready, click Generate Payment Link.
This creates a pre-filled checkout for the member. You can:
- Show the QR code — If they're with you in person
- Copy the link — To paste into a message
- Email them — Sends a "Your studio is ready" email with the link
What the Member Sees
When the member opens the payment link, they see a checkout page with everything pre-filled:
- Studio details and pricing
- Option to add their own promo or referral code
- Payment method choice (bank account for discount, or card)
After they complete payment:
- The reservation shows as Pending until the start date
- They can see their first billing date and when access begins
- Their access code activates when the lockout starts
Future-dated lockouts: If the start date is in the future, the member receives a welcome email without an access code. When their billing date arrives, the system automatically activates the lockout — setting the start time, creating the access code, and sending a "Your studio is ready" email with their code. No staff action is needed; activation happens automatically when the first invoice is finalized.
Bank account payments: Members who pay with a bank account (ACH) get access immediately—they don't have to wait for the bank transfer to clear. The payment shows as Pending while processing (typically 3–4 business days), then updates to Paid once the transfer completes. If the bank transfer fails, the system automatically revokes access, removes their door code, and cancels the lockout—no manual cleanup needed.
Waitlist deposit: If the customer was on the waitlist for this location, their deposit automatically applies to the first payment. The checkout shows the reduced amount with "Waitlist deposit applied."
Staff Notifications
Staff automatically receive email notifications when lockouts are created or cancelled:
- On creation — The location's community manager receives an email with the customer's contact info, studio details, and start date
- On cancellation — The community manager receives an email with the cancellation details
These notifications help staff stay aware of who's moving in and out of their facility.
Updating a Lockout
To change a member's studio, adjust their price, or update their insurance, open the lockout from the reservations list.
What You Can Change
- Studio — Move them to a different studio at the same location
- Location — Transfer them to a completely different facility
- Price — Adjust their monthly rate up or down
- Insurance — Add, remove, or change their coverage level
- Billing Anchor Day — Change which day of the month they're billed (1–28)
When you change the studio or location, the price updates automatically based on that studio's rate.
Changing the Billing Anchor Day
The Billing Anchor Day dropdown lets you change which day of the month the member is billed. For example, moving from the 1st to the 15th shifts their billing cycle accordingly.
When you change the anchor day:
- The member is not charged for gap days between now and the new anchor date
- Their next invoice generates on the new anchor day
- The reservation start date updates to match
This field is disabled for cancelled lockouts or those scheduled to cancel.
Studio Pricing
The Studio Pricing section shows the base rates for the studio:
- Bank Account — The discounted ACH rate
- Card — The standard credit/debit rate
The member's current payment method is marked with "(currently subscribed)" so you can see which rate applies to them.
To set a custom price, check Override pricing and enter the amount. Unchecking the box reverts to the studio's standard pricing.
Price Preview
As you make changes, the form shows:
- Original price on the left
- New price on the right
- A detailed breakdown of what's changing
- Any credits the member has that will apply
Timing Options
Choose when the changes take effect:
- Immediate — Changes happen today with prorated charges
- Next billing cycle — Changes apply on their next billing date (no charge today)
If you choose immediate, the system calculates prorated amounts based on where they are in their billing period. Any credits on their account apply to the amount due.
Insurance Changes
If you're removing insurance or switching to "no insurance," you'll need to confirm the member has been informed they must provide proof of their own coverage within 30 days.
Saving Changes
Review all the details, add any notes, and click Save. The system updates the subscription in Stripe—you can verify the changes there if needed.
Canceling a Lockout
When a member needs to move out, open their lockout and click Cancel Lockout in the top right.
Cancellation Options
- Cancel immediately — Ends access and billing right now
- Cancel at period end — Keeps access until the current billing period ends
"Period end" means the end of their billing cycle. For example, if they pay on the 1st and you cancel mid-month, they keep access until the next 1st.
Changing Your Mind
If you chose "cancel at period end" and the member decides to stay, click Don't Cancel to keep the subscription active. This only works before the period actually ends.
Once you cancel immediately, the lockout is ended and shows the cancellation date.
Billing Status
When editing an existing lockout, the Billing Anchor section shows subscription health at a glance:
- Current Billing Period — Start and end dates for the current billing cycle, displayed in the location's timezone
- Transfers To — The location receiving revenue from this lockout, with a link to the Stripe connected account
- Last Payment — When the customer was last billed and how much
- Last Transfer — When funds were last sent to the location and how much
- Next Payment — When the customer will next be billed and the expected amount (pulled from the Stripe upcoming invoice preview)
- Monthly Subscription — Total monthly cost (studio + insurance)
- Cancels On — If scheduled to cancel, shows when access expires
All billing dates display in the location's timezone—not UTC—so what you see matches the member's local experience.
Understanding Transfer Status
For payments to transfer correctly to the location:
| Check | What It Means |
|---|---|
| Transfers To shows location name | ✅ Transfer routing configured correctly |
| Transfers To shows "Not configured" | ⚠️ Location missing Stripe account—transfers won't work |
| Last Payment exists but no Last Transfer | ⚠️ Payment charged but not transferred—investigate |
Troubleshooting with Validation Script
For deeper diagnostics, use the lockout validation script from the command line:
pnpm --filter @mg/api tsx scripts/validate-lockout.ts <reservationId>
The script checks the complete lockout-to-transfer pipeline and outputs a status report:
| Check | What It Validates |
|---|---|
| Reservation structure | Reservation exists with correct type and user |
| Resource assignment | Studio is assigned correctly |
| Location configuration | Location is linked properly |
| Stripe subscription | Subscription exists and is active/trialing |
| Subscription metadata | Contains correct purchaseType, reservationId, locationId |
| Payment method | Customer has valid payment method |
| Transfer setup | Location has connected Stripe account |
| Access codes | User has active codes for facility entry |
| Payment history | Records of paid invoices |
| Transfer history | Funds actually transferred to location |
Result Indicators
- ✅ PASS — Component configured correctly
- ❌ FAIL — Critical issue requiring immediate attention
- ⚠️ WARN — Potential issue to review
- ℹ️ INFO — Non-critical information
Common Failures
| Issue | Cause | Fix |
|---|---|---|
| "Location has no stripeAccountId" | Location missing Stripe connect | Set up connected account for the location |
| "No Stripe subscription ID stored" | Reservation not linked to Stripe | Re-create the lockout |
| "No access codes found" | User can't open the door | Generate or assign an access code |
| "No transfer found for charge" | Transfer webhook failed | Check Stripe dashboard or re-trigger |