Loading…
Gating entrances with Stripe and NFC passes
Joshua Nussbaum
- Source
- Stripe
- Published
- Added to Yomu
Summary
The post presents a gym membership access system that replaces plastic cards, fobs, and physical keys with Apple Wallet and Google Wallet passes scanned by an NFC reader. It uses Stripe Checkout and subscriptions for payment, PassNinja as a single API layer for issuing passes, and a DotOrigin VTAP100 connected to a Raspberry Pi Zero 2W, relay, and door strike for entry control. After Checkout, the website verifies that the Stripe subscription is active, creates a pass whose nfc-message contains the Stripe subscription ID, and redirects the member to add it to a wallet. A Linux gate process reads that identifier from the reader's virtual serial port, retrieves the subscription from Stripe, and activates the relay for five seconds when the status is active; otherwise it denies access.
Context
Physical access devices create friction for members who must collect, carry, avoid losing, and return cards, fobs, or keys. Businesses also need front-desk staff to issue, track, and collect those devices.
Approach / What changed
Use Apple Wallet and Google Wallet passes with a DotOrigin VTAP100 NFC reader. A public website creates Stripe Checkout subscriptions and issues passes through PassNinja after confirming payment. A Linux process on a Raspberry Pi reads the Stripe subscription ID from the reader, checks its status through Stripe, and controls a relay connected to the door strike.
Takeaways
- The pass stores the Stripe subscription ID in its nfc-message field, allowing the gate process to identify the membership presented at the reader.
- The NFC reader appears to Linux as a virtual serial port, and Node.js reads each scanned pass through /dev/ttyACM0 using the serialport package.
- An active Stripe subscription triggers green feedback and a relay that unlocks the door for five seconds; other subscription statuses result in access denial.