Gift cards and store credit
L3–L5
Level range
8
Sprints
39
Tasks
Backend and frontend
Built as
What you’ll build
A shop with gift cards and store credit. Customers buy a card for somebody else, who spends it across several orders without ever going below zero. Money from a cancelled or refunded order comes back where it can be spent again, balances warn before they expire, and every movement adds up to the number on screen.
A skill in every sprint
You show you have it in a pull request your team reviews, then explain it in a walkthrough.
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.
A cart that survives
You can add, change and remove items, keep the cart across a logout and login, and show a total that reflects prices as they are now.
A ledger you can trust
You can record credits and debits and produce a balance that is the sum of them — and explain why the balance is not a column you update, and what happens when two movements land at once.
Gift cards and store credit
You can issue a gift card, redeem it against an order it cannot fully cover, and show a remaining balance that agrees with its history.
An order that moves through states
You can move an order through its states, refuse a transition that should not happen, and show the history of how it got where it is.
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.
Statements that reconcile
You can generate a statement for a date range that adds up, downloads, and returns the same figures when it is generated again next month.
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.
8 sprints, 39 tasks
Every sprint has a goal and a set of tasks. Open a sprint to see the tasks you will pick up.
- Sprint 01
The front door
Somebody can create an account, come back to it, and sign out properly on a computer that is not theirs.
4 tasks
- Let a customer create an account and be signed in straight away
- Keep a customer signed in after a reload and overnight
- Make signing out stop the credential working on the server
- Stop anyone creating a staff account from the sign-up form
- Sprint 02
A shop and a till
Somebody can fill a basket and place an order that records what was bought, what it cost, and that it was paid.
5 tasks
- Let staff put things on sale at a price they can change
- Keep a customer's basket until they come back
- Total the basket at today's prices and show it before paying
- Take payment through the pretend payment step and record the order
- Show a customer the orders they have placed
- Sprint 03
Money on a card
A gift card can be bought, reaches the person it was for, and becomes a balance that is the sum of its movements.
5 tasks
- Let a customer buy a gift card for somebody else
- Make a card's balance the sum of its movements
- Make gift card codes impossible to find by guessing
- Let the person a card was for claim it, only once
- Keep every amount exact, so a thousand movements add up to the penny
- Sprint 04
Spending it
A card pays for an order, or for part of one, and two checkouts can never spend the same money.
5 tasks
- Let a customer pay for a whole order with a gift card
- Let the rest of an order be paid another way when the card is short
- Take card money only when the order is placed, and never if it fails
- Prove that two checkouts can never spend the same money
- Show in the wallet what was spent and what is left
- Sprint 05
Money coming back
A cancelled or refunded order gives the money back, as new movements, to the right place, exactly once.
6 tasks
- Move orders through their stages, never backwards
- Let a customer cancel before dispatch and get the money back
- Let staff refund a sent order, with the gift card share as store credit
- Settle a cancel and a dispatch of the same order at the same moment
- Split a part refund between gift card and payment by a stated rule
- Let customers spend store credit at checkout, in a stated order
- Sprint 06
Nothing vanishes quietly
A balance expires on a schedule, after a warning in time to spend it, leaving a movement that says why.
5 tasks
- Show every balance's expiry date and warn 30 days before it
- Expire a balance with a movement that says why
- Run warnings and expiries every night with nobody pressing anything
- Make a repeated or overlapping run change nothing the second time
- Let staff reinstate an expired balance or give goodwill credit
- Sprint 07
Where the money went
Anybody entitled to see a balance can see every movement on it, and they add up to the figure on the screen.
5 tasks
- Show a statement of every movement that adds up to the balance
- Keep last month's statement exactly the same next month
- Let staff look up any balance's history to explain it on the phone
- Keep long statements fast and pages free of repeats or gaps
- Let a customer download their statement as a spreadsheet file
- Sprint 08
Open for business
The shop is on the internet at its own address, holding real balances, and the developer is not needed to keep it running.
4 tasks
- Run the shop on a host at its own secure address
- Supply every secret and setting from outside the repository
- Make releases undoable and keep the money data safe through each one
- Show whether the shop is up and whether last night's run happened
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 shop, the two kinds of people who use it, and what finished means when the product holds somebody's money.
A balance is not a number
Why the shop stores movements and adds them up, what that costs, and the three questions the obvious design cannot answer.
More commerce Blueprints
Corner shop storefront
An online shop for one small corner shop. The shelf shows what is really in stock, a basket is still there the next day, the shop never takes money for something it does not have, and the shopper can follow their order until they collect it.
Food ordering with options
Online ordering for one restaurant, where a dish is a set of choices, not a single price. A size sets the price, extras add to it, some extras only come on some sizes, and the total is worked out by the server from what the customer chose, never taken from the browser.
Restock waitlist
A waiting list for things a small shop has sold out of. People ask to be told when a thing comes back. When three come back, the stock goes to people in the order they asked. Each unit is held long enough for the person to act, is offered to nobody behind them until that time ends, and is never offered to the same person twice.
Not the one for you?
Every Blueprint is planned the same way, across health, shopping, money, education and more.
Browse all BlueprintsBuild gift cards and store credit.
Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.
Start today, for free