Paid access & payments: from “I’ll add you by hand” to automatic
The spec behind the most critical module of the Wow PM platform. If it breaks, either paying students are locked out or paid content leaks for free, so it is written around the edge cases.
The course lived in Notion. Every purchase meant checking the payment, sharing a page by hand and writing a welcome message. Nobody could say who had access, which button sold, or whether a student who paid had actually been let in.
- A paying student gets access with no manual step, even if they pay before registering.
- Zero leakage: paid lessons are protected by the backend, not by hiding buttons.
- Every sale is attributed to the button and traffic source that produced it.
- Admins can grant, revoke and resend in one click, with history kept.
As a student, I want access as soon as I pay, so I can start straight away.
- Given a successful payment, then an active Enrollment is created with amount, currency and source.
- The “purchase” welcome email is sent and its status is recorded.
- All published lessons open on the next visit; no admin action needed.
As a buyer without an account, I want my access to appear when I sign up.
- Given an Enrollment with my email and no user ID, when I register with that email, then the course is unlocked.
- The existing Enrollment is matched by email; nobody has to touch it.
As an admin, I want to grant access by type, so the student gets the right message.
- Type is required: purchase, moved from Notion, gift or other; each type sends its own email.
- Granting to someone who already has access does nothing; a separate “resend email” action exists.
As an admin, I want to revoke access without losing the history.
- Revoking sets the status to revoked with a date; the record is kept for tax purposes.
- The student sees the preview and a lock on their next visit.
| Case | Expected behaviour | Why it matters |
|---|---|---|
| Payer email differs from login email | If the buyer was logged in when they clicked “buy”, the payment is linked to that account through the checkout reference. | The most common support case once email is the customer ID. |
| Another product sold on the same Stripe account | The webhook only accepts payments from this course’s payment link; other purchases are ignored. | Without the filter, buying the PM course would unlock this course for free. |
| Webhook endpoint temporarily unreachable | Stripe retries for up to about three days; a daily health check flags webhook errors and failed welcome emails. | Money taken but access not granted is the worst outcome for trust. |
| Access with an expiry date | Empty expiry means forever; an expired Enrollment behaves like no Enrollment. | Supports time-boxed access without a separate product. |
| Guest opens a paid lesson link | Redirected to login and back to the same lesson; the return address is validated to block open redirects. | Shared links keep working without opening a security hole. |
| Owner’s test purchases | Test accounts are flagged and excluded from statistics and sales numbers; they can see draft lessons. | Clean revenue and conversion data from day one. |
| Non-payer inspects the page or the network | Lesson tables are readable only by admins at database level; a backend function decides what to return. The original Notion link is never sent to non-payers. | Hiding a button is not protection; the backend is. |
Each sale stores which button led to it (paywall, end of preview, locked tile, hub pricing) and the traffic source of that session. Upsell blocks log views as well as clicks, so click-through rates are honest. With consent, checkout starts are logged too, giving a funnel from preview to payment.
Automatic access for the PM course (granted manually for now; the data model already supports it). Automated refunds. A public “What’s new” page for students.
Sanitised excerpt from the platform’s technical documentation (private GitHub repository, Oct 2026). Payment links, endpoints, secrets and personal data removed.
Hanna Klimushka · Senior Product Manager · London · hanna-leads-tech.base44.app