Build a Paid Membership Site
A collective of five podcasters and writers runs its members-only site, and a payment provider timeout left 70 people with bonus episodes they had stopped paying for. You will build the replacement, from tiers and recurring payments to gated posts, search and private podcast feeds, and prove with a simulated month of provider failures that nobody keeps access they stopped paying for.
The brief
The client
I run a members-only site for five podcasters and newsletter writers who share one audience, with about 1,900 paying members. On the first of the month our payment provider's API timed out for two hours and about 120 renewals came back as errors. Our nightly job read an error as a cancellation for some members and skipped the rest, so 70 people kept the bonus episodes for three weeks without paying.
The bonus episodes reach members through a private podcast feed per member, and nothing ever switches a feed off: a link posted in a forum was still being fetched by hundreds of listeners after the member behind it had been refunded. Access is a tier comparison pasted into six places (the post page, the archive list, search, the Friday email, downloads and the feed), and nobody can tell me what a given member could read last Tuesday.
I need the same answer to "may this member read this" on every way of reading, a membership I can trust when the provider's messages arrive twice or late, and an answer for support that comes from a record.
The problem
Every way of reading content carries its own copy of the access check. A new way to read means a new copy, and each copy is a place to forget a condition. The private feed is the worst case, because a podcast app fetches it on a timer with no login and nobody notices when it should have stopped.
Payment status arrives as a message the provider sends to our site when something happens. Messages arrive twice, arrive out of order, and sometimes never arrive. A member whose payment succeeded can be marked failed by a stale message, and a member who stopped paying keeps access because no job looks at them. Refunds and disputes are fixed by hand, in two places that disagree.
With five creators the cost is direct. One leaked bonus episode and the creator who made it asks whether to stay. Support has no record to answer "why could this member read that post", so it answers from memory.
The client's name and figures are invented for this brief; the rules and the failures are ones that real businesses of this kind work with.
The spec
Requirements
- Let a creator define up to three tiers with a price and benefits, and change or retire a tier without changing what current members pay.
- Let a member join a tier and pay through a payment provider, with access starting when the payment succeeds and not before.
- Keep every membership correct when the provider sends duplicate, late and out-of-order messages, when two requests arrive at the same moment, and when the process dies at any moment, and settle a membership from the provider's own records when a message never arrives.
- Follow a retry schedule for declined renewals, keep a grace period before access ends, and let a lapsed member return without a stuck state.
- Let a member cancel or change tier at the end of the paid period, refund a member, take access away while a dispute is open and when it is lost, and let an operator suspend and reinstate a member.
- Give the same answer to who may read what on every way of reading: posts, lists, counts, search, previews, files, private feeds and the weekly email.
- Let a creator publish posts for a tier with a public teaser that reveals nothing gated, and let a member subscribe to a private feed that stops working when access ends.
- Warn a member once per failed renewal and send a weekly digest that lists only what the member may read.
- Let support say why a member could read a post at a past moment, from recorded facts.
- Erase a member's personal data on request and keep the payment records the business has to keep.
Deliverables
- Your repository starts the product with one command, plus a simulator that plays the members, the clock and a podcast app.
- A README that takes a reviewer from a fresh clone to a member who joins, reads a gated post, stops paying and loses the post and the private feed, in 15 minutes, and lists the command for each test.
- The table "Who may read what" and the worked billing month from the first Phase, in the README.
- Documentation for the people who connect to the product: how a creator publishes a post, how a podcast app uses a private feed link, and what the payment provider sends and how the product checks it came from the provider.
- A test suite that covers the races, the duplicate, late and out-of-order messages, the process deaths, the leak matrix and the simulated month, with the results of the final run committed.
- A way to run the client's day faster than real time and to cause the outside failures: a fake payment provider and a fake mail provider that each decline, delay, duplicate, reorder, go quiet or refuse on demand, with a seeded run that repeats.
- An operations note stating what an operator must be able to do: look up a membership and a payment, refund, suspend and lift, settle a membership against the provider's records, retry a failed warning, erase a member, and ask why a member could read something at a past moment.
- A short note on what the build leaves open: the refund rule's legal status. The 14-day refund is the site's own guarantee, since the legal EU right of withdrawal lapses once a member asks for immediate access.
Out of scope
- Conversations, replies and reactions. Members read here and do not write.
- Live events, RSVPs and capacity. Seat limits are a different problem from access.
- A moderation queue, moderation decisions and statements of reasons. One operator suspension stands in for a takedown that is not about money.
- Creator payouts, balances, fee splits and tax reports. They are a second domain.
- Tax of any kind. Prices are whole euro cents with no VAT line.
- A login system. Treat the person behind each request as already identified.
- A real payment provider account, and card numbers. You build a fake provider that copies documented behaviour, so card data never touches the product.
- App store billing. A second money path adds a channel and teaches nothing new here.
- A web front end for members. The simulator plays the browsers and podcast apps.
- Direct messages, recommendations and ranking beyond newest first.
- Legal advice. The README names the legal questions the build leaves open and says it is not legal advice.
Architectural constraints
- Amounts are whole euro cents and exact to the cent.
- No card number is ever stored or seen by the product.
- The price a member pays is fixed when they join, and a later price change never reprices them.
- Access starts only from a successful payment, and it ends no later than 7 days after the paid period when no payment arrives.
- The answer to who may read what is the same on every way of reading, and when the product cannot work out the answer, it shows public content only.
- A gated post shown to someone who may not read it reveals none of its title, body or file names.
- When the product and the provider disagree about a payment, the provider's record wins.
- A payment is counted once however many times its message arrives, and payments are ordered by when they happened and not by when they arrived.
- Nothing is lost and nothing is done twice when the process dies at any moment.
- Charge dates follow the join date in Europe/Amsterdam time.
- A member's name and email are erased on request, while payment, tax and traceability records stay, identified by member ID.
Prerequisites
You have built one application with a database, in any language and framework. You do not need experience with payments or distributed systems, and you do not need to know how a members-only site sells access to its creators' work; the first Phase explains the business and the words the brief uses. The brief explains each outside behaviour at the Checkpoint that first needs it. Your tests must be able to send requests at the same moment, because a test that sends them one after another never shows a race and passes on code that is wrong. Having once been paid late, or twice, by a system that trusted the order messages arrived in will make most of this brief feel familiar.
Free to start. An account is what keeps track of the checkpoints you finish.
Work out the access and billing rules by hand
Produces a worked billing month and a table that says who may read what in every case, which later Checkpoints are checked against. Builds nothing yet.
Acceptance criteria
The README has a section titled "A billing month" with at least 12 worked rows. Each row gives the starting facts, the dates and the result, in Europe/Amsterdam time. The rows cover charge dates, retries, grace, lapse, late news, cancels, tier changes and refunds. Every date is written out and not described, and each limit (the start of the 15th, the end of grace, the end of the refund period) is worked just before it, at it and just after it.
Charge dates come from the join date and not from the previous charge. The rows show the next three charge dates for joins on 15 Mar 2026, 31 Jan 2027, 31 Jan 2028 and 29 Feb 2028. A member who joined on 31 Jan 2027 is charged on 28 Feb 2027 and again on 31 Mar 2027. A member who joined on 29 Feb 2028 is charged on 28 Feb 2029. One row shows the date that charging one month after the previous charge gives for the 31 Jan join, and why it is wrong. One row shows that a clock reading of 21:30 UTC on 14 Apr 2026 is 23:30 in Amsterdam, before the 15th begins, that 22:00 UTC is 00:00 and the 15th begins, and that 22:30 UTC the same day is after midnight on the 15th.
A member who joined on 15 Mar 2026 at 700 cents has a paid-through date of 15 Apr 2026 and an access-until time of 22 Apr 2026. A first renewal attempt that fails softly at 15 Apr 2026 10:00 puts the membership in grace until 22 Apr 2026 10:00. Retries come 24 and 96 hours after the first failure, which is 16 Apr 2026 10:00 and 19 Apr 2026 10:00. A hard decline gets no retry and the same grace. One row lists the state at 22 Apr 2026 09:59, at 10:00 and at 10:01. One row shows a success reported by the provider as happening at 09:50 that reaches the product at 10:05, after the lapse, and renews the membership. A success reported as happening at 10:05 does not.
A cancel made on 20 Mar 2026 ends the membership on 15 Apr 2026 and not on the 22nd. A change to a dearer tier made on the same day charges the new price at the renewal on 15 Apr 2026 and nothing before it. A refund of a payment made at 15 Apr 2026 10:00 is accepted at 29 Apr 2026 09:59 and at 10:00 and refused at 10:01. A dispute opened gives the creator 7 days to respond. Each row states which of the client's words (waiting for first payment, active, in grace, on hold, lapsed, ended) the membership is in at the time asked.
Architectural guidance
Dates and money are where a subscription business loses members or revenue without anyone noticing. A member billed on the 28th for years because they joined on the 31st pays early every month and complains once, long after the cause is forgotten. A retry that lands on the same instant access ends makes the outcome depend on which of the two happens first. Working the examples out first fixes the answer before the product can disagree with itself, and every later Checkpoint that touches a date is checked against this table.
Acceptance criteria
The README has a section titled "Who may read what". It is a table with one row per case. Each row gives the facts about the member (membership state, tier, creator, any hold), what that member may read, what that member may not read, and a one-line reason. The table fixes one example world: creator A with three tiers, A1 (lowest), A2 and A3 (top), and creator B with one tier, B1. A higher tier covers the lower tiers of the same creator. Content for everyone is called public content.
The table has at least 13 rows, and a reviewer can find each of these cases in it. A member with no membership reads public content only. A membership waiting for first payment reads public content only. An active member on A1 reads public content and A1, and does not read A2 or A3. An active member on A3 reads public content and A1 to A3. An active member of creator A does not read B1. An active member of both creators reads the union of both. A membership in grace still reads its tiers. A membership on hold reads public content only. A lapsed membership reads public content only. An ended membership reads public content only. A membership past its access-until time, when no word of a lapse ever reached the product, reads public content only. A member on a tier the creator has since retired keeps the tiers it had. A case in which the product cannot work out what the member may read gives public content only.
Below the table the README lists every way the product shows content: a single post, a post list, a post count, search results, a file download, a private podcast feed and the weekly email. It states that the same table decides all seven, and that a tier is never compared by hand in any of them.
Architectural guidance
A rule that lives only in people's heads gets applied once per way of reading, each time as the version its author remembers, and the way nobody lists in a design meeting (here the private podcast feed) gets the weakest one. Writing the rows first forces the awkward cases to be decided by hand: grace, a hold, a lapse the product never heard about. A row left out of the table is a case that every later check skips.
Architectural walkthrough
How a members-only site sells access to its creators' work
The client runs one members-only site for five podcasters and newsletter writers who share an audience of about 1,900 paying members. A creator defines up to three tiers, each with a price and benefits. A member joins a tier and pays through a payment provider, and each month the provider tries to take the renewal.
Members read posts on the site, search the archive, download files, get a weekly email, and listen to bonus episodes through a private podcast feed of their own. A podcast app fetches that feed on a timer with no login. A post has a public teaser that reveals nothing from behind the gate.
The provider tells the site what happened by sending messages. A message can arrive twice, late, out of order or never. When a renewal is declined, the site retries it on a schedule and gives the member a grace period of 7 days before access ends. A member can cancel or change tier at the end of the paid period, ask for a refund, or dispute a charge with their bank. The client keeps payment records for 7 years, which is the Dutch rule for business records.
The words this brief uses:
Tier: a level of membership with its own price and benefits.
Membership state: where a membership stands: waiting for first payment, active, in grace, on hold, lapsed or ended. The client's meanings are set out under the next heading.
Renewal: the charge that continues a membership into the next paid period.
Grace period: the days after a failed renewal when access continues. Here it is 7.
Dispute: a member asking the bank to reverse a charge. Access is taken away while it is open and when it is lost.
Private feed: a podcast feed with one link per member.
Teaser: the public part of a gated post.
Provider message: the payment provider's report that something happened to a payment.
Why the client's words are fixed first
The client's trouble starts with words that mean different things to different people. Support says a member is "active" when the member has paid, and the nightly job says it when the member has not been marked cancelled. A rule that two people read two ways gets built twice, and the version nobody wrote down ends up in the product. This Phase fixes the client's rules in writing, with dates and numbers, so that every later Checkpoint can be checked against them and not against what the builder remembers.
These are the client's words, and every Checkpoint uses them. A membership is waiting for first payment when a member asked to join and the first payment has not succeeded. It is active inside a paid period. It is in grace when a renewal failed and the member is still inside the 7 days before access ends. It is on hold while a dispute is open or an operator has suspended the member. It is lapsed when grace ran out without a payment. It is ended when it was cancelled, refunded or lost in a dispute. A member whose first payment failed never started. Every membership has an access-until time, the moment it stops giving access unless a payment pushes it out: the end of the paid period plus 7 days, or 7 days after the first failure of a renewal.
Two things go wrong when the rules stay in people's heads. A creator's bonus episode reaches a member who stopped paying, because one of six places that check access forgot the grace rule. A member who joined on 31 Jan is charged on the 28th every month for years, because the first person to add a month to a date never met February. Both cost the client money and trust, and neither shows up until a member writes in.
Sell tiers and start memberships from payments
Produces tiers with dated prices, a fake payment provider that misbehaves on demand, and memberships that start only from a successful payment, even when the provider's messages arrive twice or late and the process dies mid-payment. No renewals yet.
Acceptance criteria
A creator publishes a tier with a name, a benefits text, a price in whole euro cents and a rank, and sees the tier listed. Ranks start at 1, are unique within a creator, and a higher rank covers the lower ones. A creator can hold three active tiers, and a fourth is refused. A price of 7.5, a price of 0 and a negative price are refused, and 750 is accepted. You can create the five creators with two or three tiers each, priced between 300 and 1,500 cents with an average of about 700.
A creator changes a price with an effective date. Asking for the price at an instant before that date returns the old price, and at or after it returns the new one. A creator retires a tier: it is no longer offered to new members, it frees a slot toward the limit of three, and members already on it keep it. The retired tier can still be read.
A creator who holds two tiers sends two requests for a third tier at the same moment. Exactly one is accepted and one is refused, and the creator ends with three tiers. A publish that fails halfway through, forced by a test whose method the README states, leaves no tier behind.
Architectural guidance
A creator who edits a price and sees every member's past receipt change has rewritten history. A fractional amount can drift to 6.999999 euros and nobody sees it. Two requests for a third tier at the same moment can both be told there is room, which leaves a creator with four.
Acceptance criteria
You have a fake payment provider you can start with one command. It has its own clock that you can set to any instant, and it remembers every charge it was asked for and what became of it. The README lists what you can make it do: charge a member an amount in cents on request, report what happened to any charge, refund a charge that succeeded, and open and close a dispute on a charge. A charge it has never heard of is not found, and a refund of a charge that did not succeed is refused.
A charge request is answered at once without the outcome. The outcome always arrives afterwards as a message from the provider to the product: charge succeeded, charge failed (soft or hard), charge refunded, dispute opened, dispute closed (won or lost). Every message says what it is about and the time it happened at the provider. A message sent twice is identical both times. Every message is signed so the product can check it came from the provider. When the product asks again for a charge it may already have caused, the provider says the charge exists and charges once. Asking again with a different amount is refused and charges nothing.
Each of these behaviours is switched on by you, and each is shown working with a seeded random source, so the same seed repeats the same run. Declines happen at a chosen rate, soft or hard. At a duplicate rate of 100% every message is sent twice. Within a reorder window of a chosen number of minutes of the provider's clock, messages are delivered in shuffled order. A charge request can be answered after a chosen number of seconds, including long enough that the product gives up after the card was charged. The provider can stay silent for a chosen span of its clock, sending nothing while its answers about charges stay correct. The provider waits 5 seconds for an answer. A message the product does not answer with success within that time is sent again, over hours and for up to 3 days, with growing gaps between tries. The README says how to compress that schedule on the provider's own clock for tests, and a message that never gets a success answer stops being sent when the 3 days are over.
Architectural guidance
A fake that answers at once and in order cannot show the worst payment bug, which is the call that times out after the provider has already charged the card. A fake that never goes quiet cannot show the member who paid and appears unpaid because the message never came. The client's own incident was two hours of provider timeouts that left about 120 renewals returned as errors. A provider you can slow down, silence, duplicate and reorder on demand is how the rest of the project gets tested against that day.
Acceptance criteria
The product accepts messages from the payment provider. A message with the provider's valid signature is acknowledged with a success answer in under 5 seconds. A message with no signature, a wrong signature, or a valid signature over content that was changed by one byte is refused and has no effect, whatever it says. A correctly signed message that cannot be read is refused. A correctly signed message of a kind the product does not know is acknowledged and has no effect.
The provider gives up waiting after 5 seconds and sends the message again later. A test makes handling the message take 30 seconds longer than usual, the README says how, and the provider still gets its answer in under 5 seconds. The effect of the message then appears once, and a resend that arrives meanwhile adds nothing.
The README documents, for the provider's side, where messages are sent and how the product checks that one came from the provider.
Architectural guidance
A provider sends a message again when the answer is slow or fails, so every slow moment becomes a second copy of the same message. A product that checks the signature against a re-written version of the message instead of what it received rejects some genuine messages, and nobody can tell which. A product that accepts an unsigned message lets anyone on the internet mark a member as paid.
Acceptance criteria
An operator can look up the payment for a charge that is due and see its status and each attempt to collect it, with the attempt number, the time it happened at the provider and the time the product heard about it. The README says how a test creates a payment that is waiting for the provider's answer.
A success message marks the payment succeeded. A failure message marks that attempt failed and records whether the decline was soft or hard. The same message delivered twice in a row, and the same message delivered at the same moment from two places, changes the payment once: the operator sees one success and one count of money.
A payment whose attempt 1 failed at 1 Mar 2026 09:00 and whose attempt 2 succeeded at 2 Mar 2026 10:00 ends as succeeded in both arrival orders. When the success is handled first and the failure of attempt 1 reaches the product at 2 Mar 2026 10:03, the failure is kept as history on attempt 1, the payment is never treated as failed, and the final status matches the normal order. Messages that report the same time give the same result in every arrival order. A signed message about a payment the product does not know changes nothing and is answered with success so the provider stops resending it. An operator can list such messages.
A test runs the fake provider with its duplicate rate at 100% and a 5 minute reorder window, over enough payments that both happen. Every payment ends in the right status and is counted once.
Architectural guidance
Providers promise to deliver a message at least once and promise nothing about order, so a duplicate or a reordered pair is normal traffic. A product that takes the status of whichever message arrived last turns a delayed failure into a lost customer, and one that does not recognise a repeat counts the same payment twice. Take this case: attempt 1 fails on 1 Mar 2026 at 09:00 and the retry succeeds on 2 Mar 2026 at 10:00. A provider outage holds the first message back until 10:03. A product that treats the latest arrival as the truth now shows the member as failed, although they have paid. A test that handles one message at a time cannot show two copies arriving at the same moment, so it passes on code that fails in production.
Acceptance criteria
A member who is already identified asks to join a tier. The response shows a membership that is waiting for first payment. It is not active, the member has no access, and nothing has started. The product asks the provider to charge the tier's price in force at that moment and keeps that amount for this member. The join date in Europe/Amsterdam fixes every later charge date.
An operator can look up a member's membership with a creator and see its state in the client's words, its paid-through date and its access-until time. When the provider's success message for the first payment has been handled, the membership is active with a paid-through date one month after the join date and an access-until time 7 days after that. A member who joins on 15 Mar 2026 has a paid-through date of 15 Apr 2026 and an access-until time of 22 Apr 2026. The same success message delivered twice starts the membership once.
With the provider silent for a day, the membership stays waiting for first payment. When the first payment fails, soft or hard, the member never started: the provider shows exactly one charge request for it, and the member can join again. A second join for the same creator while a membership is waiting, active, in grace or on hold is refused, and a join on a retired tier is refused. The same join sent twice at the same moment creates one membership and one charge.
A creator changes a tier's price from 700 to 900 effective now. The member who joined at 700 is still charged 700, and the next member to join pays 900.
Architectural guidance
Starting access when the member presses join gives access to someone whose card was declined, while starting it from the provider's success message makes the provider's word the only way in. A first payment has no retries and no grace period, because the person is waiting on the page and there is nothing yet to take back. The price is fixed at the moment of joining because a later edit to the tier must not change what an existing member owes. Pressing join twice is common, and two requests that overlap must not charge a card twice.
Acceptance criteria
The README names a command that kills the product's process at a chosen point of a join and starts it again, and lists the points. Each point below ends with the same result: a member who paid is active exactly once with the dates from the previous Checkpoint, a member who did not pay has no access, and no payment is counted or charged twice.
The process dies after the provider's success message was answered and before the membership shows as started. After the restart the membership is active once, and the operator sees one payment counted once. The process dies after the join was accepted and before the provider was asked to charge. After the restart the operator sees the payment waiting, no charge has happened, the member has no access, and the provider shows at most one charge once the product carries on. The process dies after the provider was asked and before the product saw the answer. After the restart the provider shows one charge, and the success message or a lookup of the provider's records later completes the membership once.
A run of joins in which the process is killed and restarted repeatedly at random instants ends with every member the provider charged active once, no member active without a successful payment at the provider, and no member with two memberships for one creator.
Architectural guidance
A death after charging and before anything remembers it did makes the next try charge again. Deaths like these are easy to miss in tests because a process rarely dies where the author is looking, so the check forces the death at each point and asks what the member and the client see afterwards.
Architectural walkthrough
A payment provider tells the product what happened by sending it a message, and the arrival of a message is not the same as the truth. Messages arrive twice, arrive in the wrong order, and sometimes never arrive. A product that writes whatever came in last marks a member who paid as failed because a delayed message finally turned up. A product that starts a membership when the member presses join gives access to someone whose card was declined.
The provider also gets slow. A call that times out gives the product no answer, and the card may already have been charged. A product that reads the timeout as a decline charges the member a second time on the next try. A provider also sends a message again whenever the product answers slowly, so a product that does its work before it answers turns every slow moment into a second copy of the same message.
Two decisions about money run through the Phase. An amount is a whole number of euro cents, because 7 euros held as a decimal can become 6.999999 and nobody sees it. The price a member pays is fixed when they join, so a creator who raises a tier's price never reprices existing members.
The last failure is a process that dies. If it dies after taking a payment and before giving the member what it paid for, the member has paid and has nothing, and nobody finds out until they write in. If it dies after charging a card and before anything remembers it did, the next try charges again. Tests that send requests one after another cannot show either, and cannot show two requests that overlap: they never do, and the test passes on code that is wrong.
Charge, retry and end access on schedule
Produces renewals on the anniversary, retries, a grace period, lapse and return, cancels and tier changes at the end of the paid period, holds for refunds, disputes and suspensions, and settlement when a message never arrives. Nothing is gated yet.
Acceptance criteria
The date and time the product believes is one that tests and the simulator can set, and the README says how. The README also names how to make the product process a given day. On each member's charge date in Europe/Amsterdam, a payment is created for the amount fixed when the member joined, whatever the tier costs now. A member who joined on 15 Mar 2026 at 700 cents has a payment created on 15 Apr 2026 for the period 15 Apr 2026 to 15 May 2026. With the provider stopped, an operator already sees the payment waiting for the provider's answer.
When the provider reports success, the membership stays active with a paid-through date of 15 May 2026 and an access-until time of 22 May 2026. Running the day's charges twice on the same day, and running them from two places at the same moment, leaves one payment for the period. Running them on 14 Apr 2026 creates nothing. A clock reading of 21:30 UTC on 14 Apr 2026 creates nothing, and 22:30 UTC the same day creates the payment.
Charge dates come from the join date and not from the previous charge. A join on 31 Jan 2027 is charged on 28 Feb 2027 and then on 31 Mar 2027. A join on 31 Jan 2028 is charged on 29 Feb 2028. A join on 29 Feb 2028 is charged on 29 Mar 2028 and on 28 Feb 2029.
The fake provider delays its answer by 30 seconds and the product gives up after 10. The payment stays waiting for an answer, the membership's state and dates are unchanged, nothing is treated as a failure, and running the day's charges again does not charge again. A message for that charge that arrives later is handled as in the previous Phase. The process is killed after the payment was created and before the provider was asked: after the restart the member is charged once.
Architectural guidance
A process killed halfway through a renewal either leaves no trace, so the member is never charged and nobody knows, or leaves a charge the product cannot see, so it charges again. A call that times out gives no answer, and treating it as a decline, as the client's nightly job did, took three weeks of access from nobody and gave it to 70 people. The next charge comes from the join date because adding a month to the last charge slides a 31 Jan member to the 28th permanently, and they are billed early every month after.
Acceptance criteria
A soft decline of the first attempt at 15 Apr 2026 10:00 puts the membership in grace and sets its access-until time to 22 Apr 2026 10:00, 7 days after the first failure. A retry is made at 16 Apr 2026 10:00 and another at 19 Apr 2026 10:00, which is 24 and 96 hours after the first failure. Running a retry twice, or from two places at once, creates one attempt and one charge, and the fake provider sees one charge per attempt.
If attempt 2 succeeds, the membership is active again with a paid-through date of 15 May 2026 and an access-until time of 22 May 2026, and attempt 3 is never made. The period starts on 15 Apr 2026 although the payment arrived on the 16th. If attempts 2 and 3 both fail, nothing more is tried. At 22 Apr 2026 09:59 the membership is still in grace. At 22 Apr 2026 10:00 it is lapsed, and the provider is never asked to charge this member again.
A hard decline schedules no retry, and the membership still enters grace until 22 Apr 2026 10:00. A membership whose renewal has no recorded outcome keeps access until 22 Apr 2026 00:00 Amsterdam time and then lapses. Silence alone never marks a payment failed.
A success that the provider says happened at 22 Apr 2026 09:50 and that reaches the product at 10:05, after the lapse, renews the membership: it is active again. The same success reported as happening at 10:05 does not renew it. It is kept, the membership stays lapsed, and the README lists it as money taken after the lapse. A lapsed member who joins again gets a new membership waiting for first payment and a new join date, and the lapsed membership does not block the join.
Architectural guidance
A decline is the provider's answer and a timeout is no answer, and treating them alike is how 70 people kept bonus episodes for three weeks. The retries come 24 and 96 hours after the first failure while grace ends at 168 hours, so the last retry is three days clear of the lapse and the two cannot race. A member whose messages all went missing loses access on a known date, and a late success that happened before the lapse still counts, because a payment is dated by when it happened and not by when the product heard of it. A retry that runs twice charges a card twice.
Acceptance criteria
A member whose paid-through date is 15 Apr 2026 cancels on 20 Mar 2026. An operator sees the cancel date 15 Apr 2026. The membership stays active until then. A second cancel changes nothing, and two cancels sent at the same moment leave one cancellation. On 14 Apr 2026 the membership is still active. On 15 Apr 2026 no payment is created, the provider is not asked to charge, and the membership is ended, with the reason cancelled visible to an operator. Access ends on the 15th and not on 22 Apr 2026.
The same member on a 700 cent tier asks on 20 Mar 2026 to change to a 1,200 cent tier. Nothing is charged, the membership keeps its tier and amount, and an operator sees the pending tier and the change date 15 Apr 2026. On 15 Apr 2026 the renewal charges 1,200 cents and the membership is on the new tier. A change to a cheaper tier works the same way and charges the lower amount at the renewal.
A cancel made after a change is scheduled removes the change. A change to the member's current tier, to a tier of another creator, or to a retired tier is refused. A cancel or a change on a membership that is waiting for first payment, lapsed or ended is refused.
Architectural guidance
Cancel and tier change share one rule, that the change waits for the end of the paid period, because the member has paid for that period and the rule leaves no proration to get wrong. A cancel that is only a note nobody acts on keeps charging a member who left, and one that takes effect at once takes away days the member paid for. A cancelled membership must end on its own date and not on the access-until time, or a member who cancelled keeps reading for seven more days. The charge for the new tier and the move to the new tier have to land in the same moment, or the member reads a tier they have not paid for.
Acceptance criteria
An operator refunds the payment that funds the current period. The full amount in cents goes back through the provider, the membership is ended with the reason refunded, and the provider is never asked to charge this member again. For a payment made at 15 Apr 2026 10:00, a refund requested at 29 Apr 2026 10:00 is accepted and one requested at 10:01 is refused, with nothing sent to the provider and the membership unchanged. Refunding the same payment twice, or twice at the same moment, refunds it once.
When a dispute opens, the membership goes on hold and the dispute shows a respond-by date 7 days after it opened. When the dispute closes in the member's favour, the membership returns to the state it was in. When it closes against the member, the membership is ended with the reason dispute lost. A dispute-closed message that reaches the product before its dispute-opened message gives the same result as the normal order.
An operator can suspend a member for a creator, which puts the membership on hold, and can lift the suspension. A membership stays on hold for as long as any hold stands. A suspended membership with an open dispute is on hold once. A dispute won while the suspension stands changes nothing, and the membership returns only when the last hold is gone. A dispute lost while the member is suspended ends the membership, and lifting the suspension afterwards changes nothing.
The day's charges and lapses skip a membership that is on hold. A hold lifted after the membership's access-until time has passed leaves it lapsed and not active. A refund or dispute message for a payment the product does not know changes nothing.
Architectural guidance
A refund, a lost dispute and a suspension are three causes that each take access away, and three separate places that act on them give three chances to forget one. A member can be suspended and disputed at once, and lifting one must not give access back while the other still stands. Without that rule, the first member to win a dispute while suspended is reinstated by accident. A refund that goes through twice returns the money twice.
Acceptance criteria
Every day, for each renewal that has had no outcome for more than 24 hours by the product's clock, the product asks the provider what became of the charge and brings its own view in line with the answer. An operator can also ask for this for one member on request. The correction has the same effect on the membership as the provider's message would have had.
With the fake provider silent for a day, a charge that succeeded at the provider with no message is counted as succeeded at the provider's own time and not the day it was found, and the membership renews. A charge that was declined softly is counted as failed, the membership enters grace with its access-until time set from the provider's time, and a retry whose time has already passed is made at once. A charge the provider has no record of is requested again, and the provider shows one charge.
A payment the product shows as failed, where the provider shows it succeeded at a later time, is corrected to succeeded. A question to the provider that times out or fails changes nothing, and the next day asks again. Asking twice about a renewal whose answer already agrees changes nothing, and a message the provider resends after the correction adds nothing.
A test creates 120 renewals with no outcome, with the fake provider delaying 30 seconds and staying silent, where the provider charged most successfully and declined the rest softly. After the run, a membership is renewed for every charge that succeeded and in grace for every one that declined, no attempt is waiting for an answer, no membership has lost access, and each renewal was counted once.
Architectural guidance
The product knows what it was told, and the provider knows what happened. When a message never arrives, a member who paid shows as unpaid until a person notices, and the client's incident was 120 such renewals in one afternoon. A correction dated by the day it was made instead of the provider's time reorders history: a late success then looks later than the lapse and is refused. A correction that fixes the payment but leaves the membership behind helps nobody. A message the product received and then lost in a crash is a different gap, and the next Phases cover it.
Walkthrough: one member's renewal has been waiting for an answer since 15 Apr 2026 10:00 and no message came. The provider lists a charge for that attempt that succeeded at 10:00:03. The product says waiting and the provider says paid, so the member is about to lose access for a payment that went through.
Architectural walkthrough
What a failure means for access, and for how long, is the question this Phase answers. A declined card, an error from the provider and a call that never gets an answer look alike in a log and are three different facts. A decline is an answer: the provider looked and said no. An error or a timeout is no answer, and the charge may have gone through. The client's nightly job read errors as cancellations for some members and skipped the rest, and 70 people read bonus episodes for three weeks on the strength of that confusion. A timeout must change nothing about a membership. The attempt stays unresolved until the provider's message or a lookup brings the real answer.
The end of a paid period is a moment on a clock and no message announces it. Nothing arrives to say that 15 Apr 2026 has come, so the product has to notice. A month of renewals also has to run in seconds in the tests, which means the date the product believes must be one you can set.
Access depends on one time, the access-until time. It sits 7 days after the end of the paid period, a payment pushes it out, and a hold, an end or a lapse cuts it short. A member whose messages all go missing therefore loses access on a known date and does not keep it forever.
The schedule is the client's. The first attempt is on the charge date. After a soft decline, retries come 24 and 96 hours after the first failure, and grace ends 7 days after the first failure. A hard decline, one that retrying will not fix, gets no retry and the same grace. The last retry sits three days clear of the lapse, so a retry result and the lapse cannot land in the same minute. A payment that happened just before the lapse but reaches the product just after it still counts, because the time that matters is when it happened and not when it arrived.
The charge date comes from the day the member joined, in Europe/Amsterdam, clamped to the length of the month. A member who joined on the 31st is charged on the 28th in a short February and on the 31st again in March. Adding a month to the previous charge date would slide that member to the 28th for good.
Two requests at once and a process that dies are the other failures here. A refund requested twice at once must refund once. A process killed halfway through a renewal must leave a member who is charged once, and not zero times or twice. No Checkpoint in this Phase can show a member a gated post, because none exists yet. The operator's view of the membership is where each result is read.
Decide who may read what
Produces the answer to what a member may read at any moment, and a record that explains it for a past moment. Publishes no posts yet.
Acceptance criteria
An operator can ask what a member may read right now, and the README says how. The answer lists public content and every tier the member may read, by creator. It always includes public content. An unknown member, and a member with nothing in force, get public content only.
A tier covers every tier of the same creator with an equal or lower rank, retired tiers included, and never a tier of another creator. In the example world from the first Phase, a member on A2 reads public content, A1 and A2, and not A3 or B1. A member on A3 reads public content and A1 to A3. A member on A2 of creator A and B1 of creator B reads public content, A1, A2 and B1.
The test suite has one test per row of the README's table "Who may read what", at least 13, named after the row, and the number of tests equals the number of rows. Each test builds the member through the real flow (a join, the provider's messages, the clock) and not by setting the member's state directly, then asserts that every tier the row allows is listed and every tier the row forbids is absent. The rows cover waiting for first payment, active on the lowest and the top tier, both creators, grace, hold, lapsed, ended, a retired tier with a current member, and a member past their access-until time for whom no word of a lapse ever reached the product, who gets public content only.
A hold lifted before the member's access-until time brings the tier back, and a hold lifted after it does not. A test makes the product unable to work out the member's rights, the README says how, and the answer is public content only with one error logged and no failure for the caller.
Architectural guidance
A bug that shows a paying member too little costs an apology, and a bug that shows a stranger a gated post costs the creator who made it. So every doubt must resolve to less. The creator adding a fourth tier changes the order of tiers, and a product with its own copy of that order in several places misses one of them. One test per row of the table means a row nobody tests is a row nobody builds.
Acceptance criteria
What a member may read follows the membership through every change in the previous Phase, and the operator's answer is checked at stated moments of the clock. A member who joins on tier A2 with an access-until time of 22 Apr 2026 reads A1 and A2 until then. A renewal moves the end to 22 May 2026 and does not change what was read before. A change from A3 to A1 that takes effect on 15 May 2026 keeps A3 readable until that moment, and from the renewal on, only A1 and below.
A lapse at 22 Apr 2026 10:00 takes away every tier of that creator at that moment and leaves another creator's tiers alone. A refund or a lost dispute does the same at the time it happened. A hold takes reading away from its start, and lifting it gives back the same tiers with their original end time, with nothing new added. A hold lifted after the end time gives nothing back.
A membership lapses at 22 Apr 2026 10:00, and the late success that happened at 09:50 reaches the product at 10:05. The product is made to apply the late success before the lapse, and then the lapse before the late success. Both orders leave the member reading their tiers at 10:06 and until 22 May 2026. The same news delivered twice, and delivered twice at the same moment, leaves the same answer and nothing doubled.
Architectural guidance
Payment news reaches the product in whatever order the provider sends it, and two copies of the same news may arrive together. Take this case: a membership lapses at 10:00, and at 10:05 the product hears about a payment made at 09:50. A product that applies whatever it handled last ends with a paying member locked out. A product that handles the same news twice grants twice.
Acceptance criteria
An operator can ask whether a member could read a tier, or public content, at a stated instant, and the README says how. The answer is yes or no with the facts behind it. The instant comes from the question and never from today's clock.
For a yes, the answer lists the membership period that covered the instant: the tier it was for, the creator, its start and end times, and the payments and provider messages that created it, each with the time it happened. When the right came through a higher tier (A1 asked, membership on A2), the answer says so. For public content the answer is yes because the content is public. For a no, the answer gives one reason: no membership existed, the membership ended (what ended it, why and when), a hold was in force (its start, its reason), or the end date had passed (the date).
A test builds member M through the real flow with these facts: a start on 15 Mar 2026 for A2 with an access-until time of 22 Apr 2026 10:00, a suspension from 1 Apr 2026 to 3 Apr 2026, and a lapse at 22 Apr 2026 10:00. Asked about A2, the answer is no for 10 Mar 2026 because there was no membership, yes for 20 Mar 2026 naming the start, no for 2 Apr 2026 because of the hold, yes for 18 Apr 2026, and no for 25 Apr 2026 because the membership lapsed. Asked about A1 on 20 Mar 2026 the answer is yes through A2. Asked about A3 the same day it is no.
The answer for 18 Apr 2026 is identical before and after a later renewal. The answer for a member the product has never seen is no, because no membership existed, and the call does not fail. Every yes lists at least one payment or message the operator can look up elsewhere.
Architectural guidance
If the answer for Tuesday changes after Thursday's renewal, it is worth nothing in an argument with a creator who asks why a member read a post they should not have. The answer must not depend on any rule that may have changed since.
Acceptance criteria
The README names a command that kills the product's process at a chosen point and starts it again, and lists the points. A member is refunded, and the process is killed at each point from the refund being accepted to the member losing reading rights. After every restart the operator's answer for that member is public content only, and the member's other creators are untouched.
The same holds for a dispute lost, a suspension and a cancel reaching its end date. A suspension accepted just before the process dies still takes reading away after the restart. A member who is later reinstated gets their tiers back once, with the original end time.
A run of refunds, suspensions and lost disputes in which the process is killed and restarted repeatedly at random instants ends with every affected member on public content only, nobody cut off who should keep reading, and nothing applied twice.
Architectural guidance
A refund that was accepted but never carried out is a member who was refunded and still reads, which is what happened when a refunded member's feed link kept serving hundreds of listeners. The death that matters comes after the product accepted the news and before it acted. A date at which access ends covers a lost lapse, and it does not cover a lost suspension, which has no date. The check forces the death at each point and asks what the member can still read.
Architectural walkthrough
The client lives with the same question answered in six places: the post page, the archive list, search, the Friday email, downloads and the private feed. Six answers drift, and the one that drifts furthest is the one nobody reviews. This Phase fixes the answer to the question, by member and by moment, before any post exists, so the Phase after it can ask the same question of every way of reading.
A creator's higher tier covers the lower tiers of the same creator, and the order of tiers changes when a creator adds a fourth. Every place that carries its own copy of the order has to be found and fixed on that day, and one is always missed. The answer also has to lean toward less when anything is in doubt. A bug that shows a paying member too little costs an apology. A bug that shows a stranger a gated post costs the creator who made it, and that creator asks whether to stay.
Payment news reaches the product in whatever order the provider sends it. A lapse handled after the renewal that follows it takes away what the member just paid for. The same news handled twice must change nothing the second time. A process that dies after a refund was accepted and before reading was taken away leaves a refunded member reading, which is the client's forum-link incident again.
Support has to say why a member could read a post last Tuesday. A status that shows only what is true now cannot answer, and a record edited after the fact answers with today's facts for a day that is gone.
Publish gated content
Produces posts with a public teaser, lists, counts and search that show only what a member may read, private podcast feeds and downloads that stop when access ends, and a test that finds no leak. The weekly email comes in the next Phase.
Acceptance criteria
A post list, a post count and search are each asked on behalf of a member, and a list and a search take a page. Pages hold 50 items, newest first, and no page except the last is ever shorter than 50. A list, a search and a count each report a total taken only from the posts that member may read.
The fixture holds 1,200 posts. Creator A has 600: 120 public, 200 for A1, 160 for A2 and 120 for A3. Creator B has 600: 120 public and 480 for B1. The count is 240 for a stranger, 440 for a member of A1, 600 for a member of A2, 720 for a member of A3 and 1,200 for a member of A3 and B1. The list for a stranger has 5 pages, the fifth holds 40 items, the sixth is empty, and the total on every page is 240 and never 1,200.
The term "harvest" appears in 200 gated posts that match it better than the 60 public posts that contain it. A stranger's first page of results holds 50 public posts, the second holds 10, and the total is 60. A member who may read every tier gets 260 results. A term that appears only in gated posts returns no results and a total of 0 for a stranger, and no gated title, body or snippet appears anywhere in the response. When the product cannot work out the member's rights, each of the three gives the stranger's answer.
A creator can change who a post is for, with the same check as publishing. After a post moves from A3 to public content, a stranger finds it in the list and in search and the stranger's count rises by 1. After it moves back, the count falls by 1 and search no longer finds it. A change that fails halfway leaves the post as it was in every way of reading. After many random changes, the list, the count and search agree on every one of the 1,200 posts.
Architectural guidance
A list that fetches 50 gated posts and drops the ones the viewer cannot see returns short pages that reveal how much was dropped, and a count taken before the drop tells a stranger that 960 gated posts exist. A search result is a copy of the post's text, so a snippet of a gated body is the body. A change of who a post is for that updates the post but not what search finds keeps showing a post the creator has since hidden.
Acceptance criteria
A member with a tier of a creator asks for a private feed for that creator and is shown the feed link once. The link cannot be guessed from other members' links (at least 128 bits of randomness). A member with no tier of that creator is refused. Asking again replaces the link, and the old link answers 410 at once.
Fetching the link needs no cookie and no header. Every fetch decides at that moment. It returns an RSS 2.0 feed of that creator's gated posts the member may read, newest first, with one enclosure per file, answered 200 with Cache-Control: private, no-store. When the member holds no tier of that creator at that moment, the fetch answers 410 with no items and no gated text. A link nobody issued gets no feed. The same link answers 200 again after a hold is lifted. When word of a lapse never reached the product, the link answers 410 once the access-until time has passed. When the product cannot work out the member's rights, it answers 410.
The podcast app simulator polls one member's link every 30 to 60 minutes of the clock, seeded, with no login, for 72 hours. The member is refunded at hour 40. Every poll before the refund gets 200 with the same items, and every poll after it gets 410. Hundreds of simulated clients holding that same link, standing in for a link posted in a forum, all get 200 before the refund and all get 410 after. Fetching a feed leaves no record of a gated read.
Architectural guidance
A link that was checked once when it was issued keeps working for as long as the app keeps polling, which is how a refunded member's link kept serving hundreds of listeners. The link works for whoever holds it, so sharing cannot be stopped, only ended when access ends.
Walkthrough: a member's app polls at 09:10 and 09:55 and gets the episodes. The refund arrives at 10:20. The poll at 10:40 must get 410, and if the member is reinstated later, the same link must work again without the member doing anything.
Acceptance criteria
A file attached to a post can be read by exactly the members who may read the post. When a creator changes who the post is for, the file follows. Asking for a file by its plain address, without a download link, serves nothing, and file addresses cannot be guessed.
A member who may read a file is given a download link that works for 300 seconds and only for that member. Someone who may not read the file is given no link. Opening the link checks the member's rights at that moment. A link issued while the membership was active and opened after the membership ended is refused and sends no bytes. The same link is refused after 300 seconds. A file link inside a private feed runs the same check on every download.
Each file served in full records who downloaded which file and the tier and membership that allowed it. An operator can list these downloads. The test as a stranger, as a member of another creator, and when the product cannot work out the member's rights, shows that none of them gets bytes.
Architectural guidance
A download link that keeps working by itself outlives the membership behind it, and a link inside a forwarded email hands the file to whoever receives it. A file that can be fetched by its plain address is served to everyone who learns its name. Only a check at the moment of the download can say whether the person may still have the file.
Acceptance criteria
A leak suite builds the example world and the 1,200 posts. Every gated post carries a marker built from who it is for and its number, such as MARK-A2-0412, in its title, its body and the name of its file. The suite runs one cell for every row of the README's table "Who may read what", at least 13, against each of six ways of reading: a single post, the post list across all pages, the post count, search across all pages, a file download and the private feed. That is at least 78 cells. The suite prints the matrix with a leak count per cell and saves it in your repository.
A leak is any marker of a tier outside the row's allowed set found in the body or headers of any response, and any count or total that includes a post outside the set. Every cell must show zero leaks. Every cell also asserts what the row should see: the count, list total and search total equal the expected number from the previous Checkpoints (240 for a lapsed member, 720 for a member of A3), so a suite that returns nothing to everybody fails. Each test builds the member through the real flow.
A second pass runs every way of reading for a request the product cannot identify and with the product unable to work out the member's rights. Each returns public content only, and the feed answers 410. A member active on A3 whose membership is then ended gets zero leaks on all six ways.
The README names, for each way of reading, one deliberate change to your build that makes it ignore who is asking. With each change made in turn, the suite fails, the failing cells are in that way's column and in the gated rows only, and the other five columns stay green. With the changes reverted, the suite passes. The matrix has a seventh column for the weekly email, empty until the next Phase fills it.
Architectural guidance
A leak is one gated word in one response nobody looked at, so the test searches whole responses for planted markers. A suite that returns nothing to anybody passes a leak check, which is why every cell also asserts what the row should see. A suite that has never failed has not been tested, and breaking each way of reading in turn is the only way to show that it fails where it should.
Walkthrough: take the row "lapsed" and the way "search". Build the member with a start and a lapse, search for the term every post contains, and read every page. Expect a total of 240, the public posts, and no MARK string of a tier on any page. Now change your build so that search ignores who is asking and run again. The total becomes 1,200, the search cells turn red for every gated row, and the list, count, post, file and feed cells stay green. One red column and only that column shows the check is real.
Architectural walkthrough
Content leaves the product in seven ways: a single post, a post list, a post count, search results, a file download, a private podcast feed and the weekly email. The post page gets its access check on the first day. The others get theirs when someone remembers, and the one nobody lists in a design review is the one that leaks. The client's incident lives there: a podcast app fetched a private feed on a timer after the member behind it had been refunded, and hundreds of listeners kept getting episodes.
A leak does not need a gated post to appear in full. A list that fetches 50 posts and drops the ones the viewer cannot see returns pages of uneven length. A count taken before the drop tells a stranger how many gated posts exist. A search that shows a snippet of a gated body has published the body. A teaser made by trimming the first paragraph of a gated post is a copy of the gated text. None of these shows up when a test looks at one post at a time.
A request from someone the product cannot identify, or for whom it cannot work out the rights, gets public content only. There is no case in which a missing answer means everything.
A private feed adds a second kind of risk. A feed link works for whoever holds it, so a link posted in a forum is read by strangers. The only moment the product can decide anything is the moment of each fetch, because a podcast app fetches on a timer with no login. A download link that keeps working by itself outlives the membership behind it.
The last Checkpoint proves the checks work: a test that has never failed has not been shown to catch anything, so each way of reading is broken on purpose and the test must go red in that way alone.
Notify members and prove the month
Produces payment warnings, the weekly digest, erasure of a member's personal data and a simulated month of 1,900 members with the provider misbehaving. Payouts, tax and moderation stay out of the project.
Acceptance criteria
You have a fake mail provider you can start with one command. It records every message it accepts in a readable log. It can be told to answer after a chosen number of seconds once the message is already accepted, and to refuse messages. It lets the product find out whether a message was accepted without sending it again. Both behaviours are seeded so a run repeats.
A member whose renewal fails gets one warning for that renewal, however many attempts fail. A renewal that fails on attempts 1, 2 and 3 sends one warning, one line in the mail log. The next month's failed renewal sends a second. A soft decline's text says a retry will follow, and a hard decline's text says none will. The same failure news delivered twice, and delivered twice at the same moment, sends one warning.
The product waits at most 10 seconds for the mail provider and tries again up to 3 times, 60 seconds apart. With the fake set to answer after 20 seconds, the product stops waiting after 10, tries again, and when it finishes the log holds exactly one line for that warning. With the fake set to refuse, the three tries end with the warning marked failed where an operator can see it, and no line in the log. After the setting is cleared and an operator retries it, the log holds one line. The process is killed after the fake accepted the message and before the product noted it, and after the restart the log still holds one line.
The README states what the product does when it cannot know whether a mail left: which of a missing warning and a doubled one it prefers, and why.
Architectural guidance
A payment that fails three times produces three failure messages from the provider, and the member must still get one warning, because the business fact is the failed renewal and not the attempt. A mail provider that times out after sending leaves the product not knowing whether the mail left. Retrying blindly sends two emails and never retrying sends none, so the product needs a way to learn the truth or a stated preference. A process killed between sending and noting it sent has the same problem in a smaller window.
Acceptance criteria
On Fridays at 08:00 Europe/Amsterdam by the clock, each active member gets one digest email listing the title and a link to the post page of every post published in the last 7 days that the member may read at the moment of sending. The subject states the number of posts listed. The email contains links to post pages only: no file link and no private feed link. Running the Friday twice, and two sends for one member at the same moment, produce one email per member.
The fixture week holds posts for public content, for each tier of creator A and for B1. A member on A2 gets an email listing exactly the public posts and the A1 and A2 posts of creator A. A member on A1 and B1 gets exactly the public, A1 and B1 posts. A member who may read public content only gets the public posts. No email body holds the marker of a post outside the member's rights.
A member on A2 whose membership ends at 08:00:30, while the digest is being prepared, gets an email with the public posts only. When the product cannot work out the member's rights, the email lists public posts only and one error is logged. A member with nothing new that week gets no email, and an operator can see that they were skipped. A post moved from A1 to A3 after it was published is listed only for members who may read A3. The process is killed in the middle of a Friday's run, and after the restart every active member has received one digest and no member has received two.
Architectural guidance
An email is a way of reading, and it is also a message people forward, so what it shows has to be decided at the moment of sending and not at the moment the digest was prepared. A digest built when the digest was prepared mails gated titles to a member whose membership ended in between. What a post is for can change after it is published, so a list built from how the post looked at publishing goes stale. A file link or a private feed link in a forwarded email hands the file to whoever receives it, so links go to pages that check the viewer on click.
Acceptance criteria
An operator asks for a member to be erased and the request is accepted. Every membership of that member ends at once with the reason cancelled and the provider is never asked to charge the member again. The member's name, email and billing country are removed from their contact details, along with the text of any suspension note. After that no contact details exist for the member, the member gets no digest, and a join with that member's ID is refused and creates nothing.
Payments, attempts, refunds and disputes are kept. A member with several payments, a refund and a dispute has the same counts afterwards, and each payment still shows the member's ID, amount, dates and billing country. Anything the product kept from the provider's messages about this member holds no email after the erasure and still holds the amounts and times. The member's private feed link no longer serves a feed, and the records of what the member read and of the warnings and digests sent to them are deleted.
A warning or digest that was waiting to go out before the erasure sends nothing after it: the mail log is unchanged. A dispute-won message that reaches the product after the erasure leaves the membership ended. Erasing the same member twice, and twice at the same moment, changes nothing the second time. With part of the erasure forced to fail (the README says how), the rest still completes, an operator can ask for the erasure again, and afterwards all of it is done without anything that was meant to stay being removed. The process is killed in the middle of an erasure, and after the restart everything is done and nothing was done twice.
After the erasure finishes, a search through a dump of everything the product stores for the member's name and email finds neither. The README states that payment records are kept for 7 years because Dutch law requires a business to keep its records that long (Belastingdienst), that the client's duty is the reason the records stay, that the billing country stays on each payment, that the mail provider keeps its own log which erasure does not reach, and that none of this is legal advice.
Architectural guidance
A person's name and email are the data the law lets them take back, and the payment records are the data the business has to keep. Both promises have to hold at once, and they meet in every payment, which belongs to a person. Erasure also races with work already in flight: a warning waiting to go out before the erasure has to find nothing to send to, and a dispute won afterwards has to leave the member ended. An erasure that fails halfway and is asked for again must finish the job without removing anything that was meant to stay.
Acceptance criteria
One command starts the product, the fake payment provider, the fake mail provider and the simulator. The simulator sets the product's clock and the fake provider's clock to the same instant. A setup run, not counted, walks the clock from 1 May 2026 to 30 May 2026 and joins 1,900 members across the five creators so that 450 renew on 10 Jun 2026 and 50 renew on each of the other 29 days of June. The counted month then runs from 1 Jun 2026 to 30 Jun 2026 on the compressed clock. The README records the measured time, and the target is under 10 minutes on your laptop.
The fake provider is seeded with these faults. It sends 10% of its messages twice. It delays messages by up to 5 minutes of its clock, so some arrive out of order. On 10 Jun 2026 it declines 6% of the day's renewals, 27 of 450, softly on the first attempt, and it answers the first 120 charge calls of that day after 30 seconds, which the product gives up on after 10. Of the 27 declined, 18 succeed on attempt 2, 4 on attempt 3 and 5 decline all three. On 20 Jun 2026 it sends no message for 24 hours of its clock and then sends them, and a message that reports a charge the settlement already counted adds nothing. The process is killed and restarted at random moments at least 20 times during the month. 10 members whose renewal date is 25 Jun 2026 are erased on 12 Jun 2026. A member who renewed on 14 Jun 2026 is refunded on 15 Jun 2026.
The simulator also plays the readers. Each day it probes 200 sampled members and 50 strangers on the six ways of reading, 45,000 probes in the month, and on each of the four Fridays (5, 12, 19 and 26 Jun 2026) it reads the digests of the 200 sampled members, 800 more. 200 sampled members' private feed links are polled every 30 to 60 minutes of the clock. 300 clients holding the refunded member's feed link all get 410 from their next poll after the refund takes effect. The expected answer for every probe comes from the fake providers' records and the README's table, and never from the product's own records.
The run passes only when all of these hold, and a result file in your repository states each number. The leak count is 0 on all seven ways of reading. For every membership the product agrees with the fake provider's records: 1,884 are active with a renewed period, 5 are lapsed from 17 Jun 2026, 10 are ended with no June charge, 1 is ended as refunded after its June charge, and none differs. The fake provider recorded 1,885 succeeded renewal charges and the product counted exactly 1,885 renewals. It counted 41 failed attempts, and the mail log holds 27 warnings, one per failed renewal. The 5 members who lapsed lose their tier content at their access-until time at the latest, and no probe shows them gated content afterwards. The 120 delayed calls leave 120 attempts waiting for an answer, none treated as failed and none with lost access until a message or a settlement resolves them. On 20 Jun 2026 the 50 renewals stay waiting and keep access, and by the end of 22 Jun 2026 no attempt is waiting. The mail log holds no digest twice. A second run with the same seed produces the same numbers.
Architectural guidance
A product that passes its separate tests can still fail when the provider duplicates, delays and drops messages at once and the process dies in the middle, because each defence assumed the others held. The expected answers come from the fake providers' records so that a wrong belief inside the product cannot grade itself.
Walkthrough: one of the 27 members is declined at 10 Jun 2026 10:00. Their access-until time becomes 17 Jun 2026 10:00, and they get one warning. Attempt 2 on 11 Jun 2026 declines again, which is a second failed attempt and no second warning. Attempt 3 on 14 Jun 2026 succeeds, so the fake provider lists a succeeded charge dated 14 Jun 2026. The expected state is an active membership with a paid-through date of 10 Jul 2026 and the member's tier content on every probe from 10 Jun 2026 onward, and the mail log shows one line for the member.
Architectural walkthrough
An email is a way of reading and a thing that can be sent twice. As a way of reading, it shows content, so what it shows must be decided at the moment of sending. A digest assembled when the digest was prepared mails gated titles to a member who stopped paying in between. As a thing that can be sent twice, it has to survive a mail provider that times out after the mail went out. The product cannot tell whether the mail left, and a retry that guesses wrong sends a second email.
A renewal that fails on attempt 1, 2 and 3 is one failure for the member and three for the provider's messages. The member must still get one warning. Next month's failed renewal is a new failure and gets its own.
Erasure removes a person's name and email and keeps the payment records the business has to keep, including the billing country on each payment. Dutch law requires a business to keep its records for 7 years (Belastingdienst), and that is the client's legal duty here. The README names that duty and says it is not legal advice. Erasure also races with everything else: a warning waiting to go out before the erasure must not mail an address that no longer exists, and a dispute won after the erasure must not bring the member back.
The last Checkpoint runs everything at once. 1,900 members go through a compressed month while the payment provider declines, duplicates, reorders, delays and goes quiet, and the process is killed at random moments. Each defence in the project assumed the others held, and this is the first time none of them can.
Architectural walkthrough
Six answers to one question
The old site compared tiers in six places, so six places could disagree. The post page checked the member, the archive list checked them differently, and the Friday email checked them when the digest was prepared and not when it was sent. A new way to read content meant a new place to forget a condition. The price of that is a creator whose bonus episode reaches someone who stopped paying, and a creator who asks whether to stay.
Check your own build for the same weakness. Pick any way of reading, remove who is asking from it, and see whether a single test goes red. If the answer is no for any of the seven, a stranger can read what a member paid for.
Leaks that no single post shows
A gated post does not have to appear in full to leak. A list that drops the posts a stranger cannot see after fetching them returns short pages, and a count taken before the drop tells the stranger how many gated posts exist. A search that shows a snippet of a gated body has published the body. A teaser made by trimming the first paragraph is a copy of the gated text. The client's private feed is the worst case, because a podcast app fetches it on a timer with no login. A link checked once when it was issued kept serving hundreds of listeners after the member behind it was refunded.
Read the responses of your own build as a stranger would, whole, and search them for words from a gated post.
Messages are not the truth
The provider tells the site what happened by sending messages, and messages arrive twice, arrive out of order, and sometimes never arrive. A site that writes whatever arrived last marks a member who paid as failed because a delayed message finally turned up. A site that waits for a message that never comes leaves a member who paid shown as unpaid until a person notices. A call that times out gives no answer, and the card may already have been charged. The client's nightly job read those timeouts as cancellations, and 70 people read bonus episodes for three weeks.
Check that a payment reported as happening before a lapse still counts when it arrives after, and that a payment is counted once however often its message arrives.
A process that dies at the wrong moment
If the process dies after taking a payment and before giving the member what it paid for, a member has paid and has nothing. If it dies after charging a card or sending an email and before anything remembers it did, the next try does it again, and a card is charged twice or an email goes out twice. A refund that was accepted and never carried out is a refunded member who still reads, and a suspension lost in that moment has no date to end it. These deaths do not show up in tests that never kill anything.
Kill your own build at every step of a join, a refund and a warning, and read what the member and the client see afterwards.
Support needs a record
Support has to answer "why could this member read that post last Tuesday". A status shows only what is true now, and an answer that changes after Thursday's renewal is worth nothing in an argument with a creator. Check that the answer for a past moment is the same before and after a later renewal.
Where it shows if you cut a corner
A product that writes whatever status arrived last passes with a friendly fake provider and fails the day the provider sends a late failure after the success of the retry that followed it. A feed that checks access when the link is created passes until a test ends a membership and fetches the same link again. A weekly email built from the posts a member could read at signup mails gated titles to someone who stopped paying. A test that sends requests one after another never shows two overlapping requests. The simulated month runs all of these together, with the provider misbehaving and the process dying, and counts the leaks.
Related Links
- Belastingdienst, keeping your business recordsbacks the 7 years payment records stay after a member is erased.
- Stripe: billing cyclebacks charging a 31 January join on 28 February and then 31 March.
- Patreon: RSS feed security and protectionbacks a private feed link that stops working when a member's access ends.
- Stripe: webhooksthe provider behaviour the simulator imitates, with duplicate, late and out-of-order messages.