Blueprint · Commerce

Subscription box

A monthly subscription box. Customers pick a plan, see the date of their next charge, and skip, pause, switch or stop it themselves. The shop sees who is due to pay, what to pack, and whose payment it is still chasing.

L2–L4

Level range

8

Sprints

42

Tasks

Backend and frontend

Built as

By the last sprint

What you’ll build

A subscription with real billing. Customers pick a plan and see the date of the next charge. They can skip or pause a month, switch plan partway through a month and pay the exact difference, and stop on a date the site tells them. A card that fails is tried again on a set schedule and then given up on. The shop sees who is due and what to pack.

What you’ll learn

A skill in every sprint

You show you have it in a pull request your team reviews, then explain it in a walkthrough.

01

Authentication

You can register and sign in a user, keep a request authenticated without asking for the password again, and explain where the credential lives in the browser and why there rather than somewhere else.

02

Charging the same card monthly

You can start a subscription, produce the next charge on time exactly once, and show what happens between a failed renewal and a cancelled subscription.

03

Roles and permissions

You can give users different roles and have the server refuse what a role may not do — not merely hide the button — and show the refusal working against a request the interface never offered.

04

Background jobs

You can hand work to a worker, tell the user it is in progress, and show the result when it lands — and say what happens to that work if the process dies halfway.

05

Going live

Somebody who has never met you can open a URL and use the product — and you can say what is different about the copy running there, where its secrets come from, and what you do when a release turns out to be wrong.

The roadmap

8 sprints, 42 tasks

Every sprint has a goal and a set of tasks. Open a sprint to see the tasks you will pick up.

  1. Sprint 01

    An account to bill

    A customer can create an account, come back to it the next day, and sign out of it properly.

    4 tasks
    1. Let a visitor create an account and be signed in straight away
    2. Keep customers signed in when they come back the next day
    3. Make signing out end the session on the server
    4. Show a new customer with no plan what to do next
  2. Sprint 02

    The cycle

    A customer picks a plan, pays for the first month once, and sees the date of the next charge.

    6 tasks
    1. Let the shop set up the plans it sells
    2. Build the shop's own pretend card machine
    3. Charge the first month when a customer picks a plan, and show the next charge date
    4. Let staff run the billing for any chosen date
    5. Make sure the same billing date run twice charges once
    6. Show customers what they have paid and what is next
  3. Sprint 03

    Two sides of the counter

    The shop sees who is due to pay and what to pack. A customer sees only their own subscription, because the app refuses other requests, not because it hides them.

    5 tasks
    1. Add staff accounts that nobody can create for themselves
    2. Show staff who is due to pay and what to pack
    3. Show each customer only their own subscription
    4. Refuse direct requests for another customer's subscription
    5. Let staff start a subscription for a customer who telephoned
  4. Sprint 04

    Changing your mind

    A customer can skip a month, pause, or stop, and the app tells them the date each one takes effect.

    5 tasks
    1. Let a customer skip their next box
    2. Set a skip deadline and show it to customers
    3. Let a customer pause until a date they choose
    4. Stop a subscription at the end of the period already paid for
    5. Let a customer undo a stop before their last period ends
  5. Sprint 05

    Halfway through the month

    A plan switch partway through a period costs the right amount, to the penny, and does not change the customer's charge day.

    5 tasks
    1. Show a customer what a plan switch will cost before they confirm
    2. Charge only for the days left when a customer upgrades
    3. Give credit when a customer downgrades, and use it on the next charge
    4. Keep the customer's charge day the same when they switch plan
    5. Make several switches in one period add up to the right total
  6. Sprint 06

    The card says no

    A declined charge is tried again on days the shop chose, then given up on, and no customer is cut off by surprise.

    6 tasks
    1. Keep the subscription open when a charge is declined
    2. Retry a declined charge on days the shop chose
    3. Tell the customer about a failed payment in time to fix it
    4. Charge a new card straight away when a customer updates it
    5. Stop the subscription after the last retry fails, and tell both sides
    6. Show staff every customer whose payment is being chased
  7. Sprint 07

    Work that runs itself

    The billing run happens by itself every day, at the right hour, and never charges anybody twice.

    5 tasks
    1. Run the billing every day with nobody pressing anything
    2. Make sure a run that crashes halfway never charges twice
    3. Show staff when a billing run fails, without waiting for a customer
    4. Make each run use the facts at the moment it runs
    5. Send each billing email only once
  8. Sprint 08

    Open for business

    The shop is on the internet at its own address, billing on real dates by itself, with nobody's laptop involved.

    6 tasks
    1. Put the app online so a stranger can use it
    2. Move every setting and secret out of the code and into the environment
    3. Run the scheduled billing on the server, on the shop's calendar
    4. Send real emails that reach the customer's inbox
    5. Give the shop its own secure web address
    6. Make a bad release easy to undo before the next billing run
The reading

Read before you build

Senior engineers read the docs before they touch the code. Every Blueprint comes with short documents on the product and its world, the kind a team hands a new hire. Read them well and you ask sharper questions and walk into every review prepared.

What you are building

The product, the two kinds of people who use it, and the four parts that make it hard.

How a billing cycle actually works

The words you need: the charge day, the period, what a skip and a pause change, and why most complaints are about dates, not prices.

More commerce Blueprints

More to build

Not the one for you?

Every Blueprint is planned the same way, across health, shopping, money, education and more.

Browse all Blueprints
Ready?

Build subscription box.

Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.

Start today, for free