Websites

Subscription website with plans, a billing portal and access rules

A subscription website charges people every month or year for a plan, a box, a service or access to something. The site has to know at every moment who has an active plan, let subscribers change their card or cancel by themselves, and never trust a price that came from the browser.

Create a website with OneCraftHow the AI builds plans and subscriptions, how access is checked, what subscribers manage, and the limits
The mug club page of a ceramics studio site: a new handmade mug every month for $40 and how the club works
A monthly plan from the brief, billed through Stripe with a billing portal for members.

Plans as rows

Each plan is a row in a plans table in the site's own database, with a name, price in cents, currency, monthly or yearly interval, its features and whether it is active. A plans page shows them with a Subscribe button, and a monthly and yearly switch when a plan has both. OneCraft reads the price from the row, so nobody can pay less by editing the page.

How subscribers pay

Subscribe opens Stripe Checkout for a subscription on your connected Stripe account, for a signed in person, on a paid plan. Stripe tells OneCraft when the subscription starts, renews, changes, fails or ends, and the site's subscriptions table is kept in step: the plan, status, price, interval and the end of the current period.

Access checked by plan

Anything for subscribers only is guarded by a database rule that asks whether the signed in person has a subscription to that plan that is active or trialing and not past its period end. The AI tests the rule as an anonymous visitor and as a signed in person before it finishes, so a lapsed subscriber loses access without anyone editing the site.

The billing portal

Manage billing opens Stripe's billing portal, where a subscriber changes their card, switches plan or cancels. You never handle card details or cancellation emails, and the subscriptions table follows whatever they choose. Staff see subscribers with their status and period end in the admin area.

Changing prices

A price change in the admin applies to new subscribers; existing ones keep what they pay until they change plan, which is how Stripe subscriptions work. If you sell physical boxes, ask for orders and delivery as well, and the AI builds the shipping side on the same database.

How it works, in three steps

  1. Step 1

    Describe the plans

    List each plan with its price, monthly or yearly, and what it unlocks or delivers.

  2. Step 2

    Connect Stripe

    Connect Stripe in account settings, Payments, on a paid plan.

  3. Step 3

    Check and publish

    Subscribe as a test customer, open the billing portal, then publish.

Limits worth knowing

Questions people ask

Can I offer a free trial?

Stripe subscriptions support trials, and the site already treats a trialing subscription as active. Ask the AI for a trial length on a plan and check the result in the preview with a test subscription. Make the trial terms clear on the plans page before people subscribe.

How do subscribers cancel?

From their account page, Manage billing opens Stripe's billing portal, where they cancel or switch plan. Access continues until the end of the paid period and then stops, because the database rule checks the period end. You do not need to do anything when someone cancels.

Can someone subscribe without an account?

No. A subscription belongs to a person who must be able to manage it and get access later, so subscribing needs a sign in with email and password or Google on the published site. One off purchases, by contrast, can be made as a guest.

What happens when a card payment fails?

Stripe retries and updates the subscription's status. When it is no longer active or trialing, the access rule stops unlocking subscriber content. The subscriber fixes the card in the billing portal, Stripe confirms, and access returns without staff stepping in.

Can I see my subscribers and revenue?

Staff see subscribers, plans, status and period end in the site's admin area, with a CSV export. Payment history, payouts and refunds live in your Stripe dashboard. Ask for an analytics dashboard and the AI adds tiles for active subscribers by plan.

What does a subscription site cost to run?

Stripe's fees on each payment, a platform fee of 2, 1 or 0.5 percent by plan, a paid OneCraft plan to publish and take payments, and the database: hosted on every plan, or your own Supabase account. Building it uses credits for the AI work.

Make your own website

The button opens the generator with this use case already described. Change the wording to match yours, generate, then edit anything you like.

Create a website with OneCraft

Related pages

More finished work of this kind is on the website examples hub.

Sources

Written and checked by the OneCraft team. Last checked .