Skip to main content

Multi-Product and Subscription Ecommerce: Building a Shop That Sells Both

In this article

A shop that sells one-off products and subscriptions from the same basket needs three things an ordinary shop does not. It needs a checkout that can take a single payment and set up a recurring one in the same step. It needs a customer area where subscribers can skip, swap, pause and cancel without emailing you. And it needs stock logic that reserves what next month's renewals will take before a one-time buyer can have it.

None of that is exotic. Built on Django with Stripe Billing, each is a known problem with a known answer. This post walks through them: the data model, one Stripe Checkout session for a mixed basket, the customer area, failed renewals, stock, and the UK rules for recurring contracts.

One caveat first. Subscriptions work when customers use the product on a real rhythm: coffee, pet food, razor blades, contact lenses. They churn fast when the rhythm was invented to flatter cash flow.

Why a mixed basket breaks ordinary shop software

A one-off item is simple: charge once, deduct stock once, ship once. A subscription is charged now and again every cycle, ships every cycle, raises its own invoice with its own VAT line each time, and can be cancelled under different rules. Put both in one basket and the shop has to answer questions a plugin usually cannot. Is postage charged once or every month? Does a discount code apply to the first charge or all of them? And what happens to the recurring half if the one-off half is refunded?

Most platform subscription apps dodge the question by splitting the order in two or refusing to mix the types at all. That means two card entries, two receipts, two parcels to the same address. If you are weighing a platform against a custom build, the Shopify versus custom shop comparison covers the trade-offs. The Shopify versus custom cost calculator shows what the app fees add up to over a few years. Subscription apps normally charge a monthly fee plus a cut of subscription revenue on top of the platform's own fees.

How we model products, prices and orders

The model that works mirrors Stripe's own objects. A Product is the thing (a 250g bag of coffee). A Price is a way of paying for it: £9.50 once, or £8.50 every four weeks. A product can have several prices, and the basket holds prices, not products. Each Price row stores the matching Stripe price ID so the two systems never drift apart.

Then two separate tables for what the customer has bought. An Order is a single fulfilment: items, address, postage, the Stripe payment that paid for it. A Subscription is the agreement: which prices, what interval, the next renewal date, the Stripe subscription ID and its status. Every renewal that is paid creates a new Order. That keeps the warehouse simple, because a pick list looks the same whether it came from a one-off purchase or a renewal.

One checkout for both kinds of item

Stripe Checkout in subscription mode accepts one-time prices alongside recurring ones. The one-time lines are added to the first invoice. So a basket holding a monthly coffee subscription and a one-off mug becomes a single session, one card entry, one receipt and one Stripe customer with a saved payment method. The server-side call is short:

session = stripe.checkout.Session.create(
    mode="subscription",
    customer=customer.stripe_id,
    line_items=[
        {"price": "price_coffee_monthly", "quantity": 1},
        {"price": "price_mug_one_off", "quantity": 1},
    ],
    shipping_address_collection={"allowed_countries": ["GB"]},
    success_url="https://example.com/thanks/?session={CHECKOUT_SESSION_ID}",
    cancel_url="https://example.com/basket/",
    metadata={"basket": str(basket.pk)},
)

Two constraints shape the basket design. Every recurring line in one session must share the same billing interval, so weekly bread and monthly coffee need two subscriptions. We create the second off-session with the payment method saved by the first, once the customer has confirmed it. And postage for the recurring part should be its own recurring price, or built into the subscription price, so it is charged on every renewal.

The session is not the order. The order is created when the checkout.session.completed webhook arrives and the payment status is paid, and renewals are created when invoice.paid arrives. Never create a fulfilment from the success page or from a renewal date in your own database. The plain-English guide to webhooks explains why Stripe's event is the only trustworthy signal. The post on secure payment integration with Stripe covers signature checks and idempotent handlers so a retried event never creates a second parcel.

The customer area that stops people cancelling

Most cancellations are not about the product. The customer is going away for a fortnight, has a cupboard full of the thing, or wants the other flavour, and cancelling is the only button they can find. The customer area has to offer the alternatives, and each maps to a specific Stripe operation.

Skip a delivery

Pause collection on the subscription with a resume date after the next renewal. The billing cycle stays where it is, the skipped invoice is voided rather than charged, and the following one goes through as normal. Show the exact date of the next charge after the skip.

Swap the product

Update the subscription item to a different price with proration turned off, so the change takes effect on the next invoice rather than generating a confusing part-month credit. For a coffee subscription that is the "send me the darker roast this month" button.

Change the frequency

Move the item to the price with the new interval and reset the billing cycle anchor so the next charge lands when the customer expects.

Update the card, or cancel

Stripe's hosted customer portal handles card updates and cancellations with no code, and we use it for those two jobs. Cancelling must be at least as easy as signing up: one click, no retention call, a confirmation email that states the last delivery date.

Recovering failed renewals

Cards expire, banks decline, and a subscription that silently stops paying is lost revenue you will not notice for weeks. The recovery flow runs on a handful of webhook events and Stripe's own retry schedule. Monthly donations fail the same way, and our guide to charity websites that attract donations covers what regular giving needs.

  1. Turn on Smart Retries in Stripe Billing so a declined renewal is retried automatically over the following days.
  2. On invoice.payment_failed, mark the subscription as past due in your database, hold the fulfilment order, and email the customer a link to update their card. The link should not need a password; a signed, expiring URL to the hosted portal works.
  3. On invoice.payment_action_required, the bank has asked for authentication on an off-session renewal. Email the hosted invoice link so the customer can approve it in their banking app.
  4. On invoice.paid, release the hold and create the fulfilment order. On customer.subscription.deleted after the final retry, close it out and send a plain "your subscription has ended" email with a restart link.

Never ship a renewal whose invoice has not been paid. A system that creates parcels from a calendar rather than a payment event posts free boxes to lapsed subscribers.

Stock that knows what next month's renewals need

A shop with 200 subscribers expecting a box on the first of the month cannot show 200 units as available to one-off buyers on the 28th. The stock figure a shopper sees has to be on-hand stock, minus units reserved for unpaid checkouts, minus units committed to renewals due in the next fulfilment window.

In practice that is a nightly job that reads the next renewal date and items on every active subscription. It sums them per product for the coming window and writes the committed quantity against the stock record. The inventory and order management workflow post sets out the reserved and allocated states this sits on. The same job gives purchasing a forward view: 180 units committed against 150 on hand sends the reorder email before anyone is let down.

UK rules that apply to recurring orders

  • Cancellation rights. Under the Consumer Contracts Regulations a consumer buying at a distance can cancel within 14 days of receiving the goods; for a subscription that runs from the first delivery. The price per billing period, the frequency and any minimum term must be stated before purchase, on the product page and in the confirmation email, not only in the terms.
  • Price display. Consumer prices must include VAT. Show the renewal price and interval wherever the first price appears: product page, basket, checkout and receipt.
  • Reminders and easy cancellation. The Digital Markets, Competition and Consumers Act adds rules for subscription contracts: reminder notices before a trial ends and before renewal, and cancellation as straightforward as signing up. Check with your adviser when those provisions apply, but build the reminder email and one-click cancel now. The card schemes already expect a reminder before a free trial converts to a paid plan.

We build this into the online shops we hand-code in Django as standard, because retrofitting reminder emails and cancellation screens after launch is harder than designing them in. If you are still scoping the shop, the guide to planning a custom ecommerce website covers the questions to settle before any code is written.

Questions people ask

Can Stripe take a one-off item and a subscription in one payment?

Yes. A Checkout Session in subscription mode can include one-time prices, which are charged on the first invoice alongside the first subscription payment.

Should renewals bill on the sign-up date or a fixed day of the month?

Bill on a fixed day if you fulfil in batches (a box posted on the first of the month) and on the sign-up anniversary if you fulfil continuously. Stripe's billing cycle anchor supports either, and a fixed day makes stock forecasting much simpler.

What happens when a subscriber's card expires?

Card networks often pass new expiry dates to Stripe automatically. When they do not, the renewal fails, Smart Retries attempt it again, and the customer gets an email with a link to update the card. Fulfilment waits until the invoice is paid.

Do subscription customers get the 14-day cancellation right?

Yes, from the day the first delivery arrives. They can cancel the ongoing subscription at any time after that unless you agreed a minimum term up front and stated it clearly before purchase.

Where to start

Write down the rhythm of your product and the four things a subscriber will want to change: skip, swap, frequency, card. Those four screens are the real product; the checkout is a solved problem. Then decide whether renewals bill on a fixed day or an anniversary, because that choice drives stock, packing and the emails.

Build the webhook handlers and the customer area before the marketing pages. A shop that launches with a beautiful front and a support inbox doing the pausing loses subscribers faster than it signs them.