OneShot

All packsSaaS Billing + Tax CoreSolve

stripe dunning past due grace period access control

Access level as a computed function, not a cron job

A past-due account needs a grace window before losing access -- computing accessLevel() at request time from state and a timestamp removes the cron job entirely (D9).

This is one of the things SaaS Billing + Tax Core already handles. Charge per-seat subscriptions: upgrades, downgrades, failed cards, invoices and sales tax.

Buy for $1493 of 3 clean-room builds passed · full refund if it fails on your machine

Is this you?

A payment failure shouldn't cut off access instantly -- most billing systems give a grace period before downgrading a past-due account to read-only or blocked. Building that as a scheduled job that walks every account and flips a status field adds a whole failure mode (the job doesn't run, runs twice, or runs against stale data) to something that's actually a pure function of two timestamps.

Why this one is easy to get wrong

"Run a daily job to check for overdue accounts" is the first design that comes to mind for anything time-based, because that's how the same problem is usually solved outside of billing -- but it means the access decision now depends on whether a cron job fired recently, which is one more thing that can silently drift from the truth.

What you get instead

D9's accessLevel(state, pastDueSince, now) is a pure function: ACTIVE is full access; PAST_DUE is read-only while now is inside a 14-day grace window from pastDueSince, else blocked; everything else is blocked. Computing it at request time removes the cron job and its failure modes entirely -- Stripe's own Smart Retries (configured in the dashboard) handles the actual payment-recovery attempts, and the app never re-implements retry cadence.

Source: ARCHITECTURE.md D9 — checkable in the pack you receive

How you actually use this

You don’t install a library or wire up an SDK. Your own coding agent builds the code in your project, and you keep it — no runtime dependency on us.

  1. Step 1

    Download and unzip

    You get a folder: the docs that tell an agent what to build, a starting skeleton, and the test suite that decides when it's done.

  2. Step 2

    Open it in Claude Code or Cursor

    Point your coding agent at the folder. Nothing to install, no account with us, no API key.

  3. Step 3

    Paste one prompt

    The pack contains the exact prompt. Paste it as your first message and leave it alone — it works through the build itself, choosing a cheaper or stronger model per task.

  4. Step 4

    Run ./verify.sh

    One command. It prints a pass or fail for every check. Green means the build is done — the same script we ran to produce the receipt on this page.

Typical build: about 18 minutes of your agent working, mostly unattended. Then you integrate the working module into your app the way you would any code you’d written yourself.

Why you can believe this

3 of 3 runs passed

We ran this pack from an empty folder 3 times and published exactly what happened — every check, the model, the token cost, the wall time. Not a testimonial, and not our opinion: the same verify.sh you run yourself. Read the full receipt →

Buy for $14914-day refund if verify.sh fails →

Related problems