Membership Cards
A membership ID is what lets anyone use My City Deal at all. Every card is a one-year subscription, and without an active ID a person cannot create an account, book a table as a guest, or order food online. Cards are issued by the platform super-admin from Admin โ Memberships.
What the card unlocks
Actions once the platform has switched the gate on (see Rollout switch):
| Action | Needs an active card? |
|---|---|
| Create a customer account | Yes โ the ID is required at sign-up and can only sign up one account |
| Book a table as a guest | Yes โ the ID is typed in on the booking form |
| Book a table while signed in | Yes โ your account is checked against its own card on every request |
| Order delivery or takeaway | Yes โ checked when the order is created |
| Browse the menu, search restaurants | No, browsing stays open |
Booking with your card
- Scan the QR code on the printed card. It opens the site with your membership ID already filled in (the
?mid=link). - On sign-up, or in the guest block of the booking form, the ID sits in the first field.
- As soon as the ID is recognised, the name printed on the card appears and the name fields lock โ they are not editable, because the card, not the person typing, decides the name on the record.
- If the card has expired or was cancelled, you see that message under the field and nothing is booked.
When a membership expires
Expiry is re-checked on every booking and every order, so a card that lapses stops working the same day โ there is no grace window hiding in an old login session. When that happens:
- the app says "Your membership expired on โฆ โ renew it to keep booking."
- a renewal adds 12 months to the existing end date, so days you did not use are not lost while the card was still live
- if the card had already lapsed, the new year starts from the day of renewal
For the admin desk
Admin โ Memberships issues and manages cards.
| Field | Rule |
|---|---|
| Membership ID | The number printed on the card. Uppercased and trimmed on save; a duplicate is refused with "That membership ID already exists" |
| Name on the card | Becomes the customer's name at sign-up; shown back to them by the lookup |
| Phone / email / note | Optional desk notes, never sent to the person typing the ID |
| Status | ACTIVE, EXPIRED (date passed) or CANCELLED (revoked by an admin) |
Actions on a card: Renew 1 year, Link account (hand the card to somebody who registered before cards existed โ by their email) and Cancel card. Cancelling stops that member's bookings and online orders immediately, including for someone who is already signed in.
The list is searchable by ID or name and shows how many cards expire within 30 days, so the desk can renew before a member hits the wall.
!!! warning "Lookup reveals only the name"
The public POST /membership/lookup endpoint that powers the form returns the holder's
name, the status and the expiry date โ no phone number, no email address โ and it is
rate-limited, because anyone who can type an ID can probe it.
Rollout switch
The gate ships switched off and is turned on with MEMBERSHIP_ENFORCEMENT=on on the API.
That is deliberate: the day the code is deployed the memberships table may not exist yet, and
no existing account holds a card, so a gate that defaults to "on" would lock every customer out
of sign-up, bookings and orders.
Order of operations for going live with cards:
- apply the migration (
npx prisma migrate deploy) โ it creates themembershipstable and nothing else, so it is safe to run before or after the code deploy - issue cards to the accounts that already exist
- set
MEMBERSHIP_ENFORCEMENT=onโ if the table is not there yet, the API refuses to boot and says exactly that in its log, rather than serving a half-blocked site
Until step 3 the field is still on both forms, prefilled from the card's QR link, and it still
fills in the name โ it is simply labelled optional for now, and POST /membership/lookup
answers without reading the database. The subscription length is
MEMBERSHIP_TERM_MONTHS (default 12).
Next: Account & Security for who can see your card details, and Help & Support if a card is lost or stolen.
Ready to grow your restaurant?
Join 50+ restaurants on MyCityDeal and start receiving bookings today.