Skip to main content
Clever Ops

Case studyReal job

How we built online booking and payments for piano hire

We built a website for a piano hire business where customers pick a piano and dates, see a price worked out from the business's own price list, and pay through Stripe Checkout.

  • Next.jsWebsite and server
  • SupabaseDatabase, storage, staff sign-in
  • StripeCard payments
  • ResendBooking emails
  • VercelHosting and scheduled jobs

The booking site is shown on a copy with a sample brand and sample prices.

Transcript

This is a made-up booking on a website we built for a piano hire business in Australia, shown on a copy with a sample brand and sample prices. The customer picks a piano and dates, the server prices it from the business's own price list, and payment goes through Stripe.

Their visit came from ChatGPT, and they filled in the form on our website. They asked for a lot: bookings, availability for each piano, a customer list, marketing, the people who move the pianos, costs and reporting. They also had a WordPress rebuild under way, and it had stalled.

On our first call it was clear the website had to work first. I sketched a draft that evening. When they gave us the go-ahead, we built bookings, payments and a staff dashboard on that draft over four days in October. It went live on the fourth day.

Here's what they needed. A customer picks a piano and dates, pays, and gets a receipt, and the people moving the piano get the details. Behind that sits a lot of pricing: transport for each leg, stairs or a lift, tuning, the length of the hire, the delivery zone, GST and a refundable deposit.

And some jobs can't be priced by a form at all: a narrow doorway, a custom delivery time, a hire longer than a month, or a venue outside the zones. Those need a person.

Here's how it works now. The customer goes through five steps: piano and dates, venue, delivery, their details, and a review. The estimate updates as they go. When they continue to payment, the server prices the booking again from the saved price list, holds the dates, and sends them to Stripe Checkout.

When Stripe confirms the payment, the booking is confirmed, the hold becomes a confirmed hire in the shared calendar, and three emails are queued: the customer's confirmation, a tax invoice, and a note to the business.

The jobs a form can't price come in as quote requests, with no payment taken and no dates held. Staff check the details, set the fee and create a payment link that lasts seven days. They send it themselves, and the customer pays through the same checkout. Staff also agree delivery times with the customer, and they set the prices.

Now the detail. Prices are data, not code. Staff change them in a pricing editor, and presets show what typical hires would cost before anything is saved. Each save adds a new version with a reason. If two people edit at once, the older save is rejected. A booking keeps the prices it was confirmed at.

The total in the browser is only an estimate. The server works it out again in whole cents. If the prices changed while the form was open, the customer sees the new total and confirms it before paying.

Availability lives in one table, and the website and the staff calendar both read it. A paid booking, a checkout hold or a staff block closes those dates for that piano. Postgres itself refuses overlapping dates for the same piano, through an exclusion constraint.

Stripe Checkout charges the hire against a product for each piano, at our server's price, and the deposit as a fixed price. Each checkout request carries a fixed key, so a retry after a lost response gets the same checkout back. A booking is only confirmed once the server reads the session back from Stripe as paid.

The hard part was making payment and email safe to retry. The emails go into an outbox in the same step that confirms the booking. They're sent through Resend straight away where possible, and a scheduled job retries the rest, with a key so a retry doesn't send twice. A provider failure doesn't release dates that might be paid. Only a full check against Stripe can. Live payments stayed behind a switch until the domain moved across.

It's been live since October. Later that month we added the pricing editor and quote links, so staff change prices and send quotes themselves. It's early, and we haven't measured a result, so there's no before and after to show you.

If you hire things out and want customers to book and pay online, with prices you control, get in touch.

Jobs a form can't price become quote requests, and staff send a payment link once they've set the fee. Staff run bookings, dates, prices, discount codes and quotes from their own dashboard.

How and why they came

The enquiry came through the form on our website, from a visit that started on ChatGPT. They asked for a lot: bookings, availability for each piano, a customer list, marketing, the people who move the pianos, costs and reporting. They also had a WordPress rebuild under way, and it had stalled.

On our first call it was clear the website had to work first. A customer needed to pick a piano and dates, pay, and get a receipt, and the people moving the piano needed the details. I sketched a draft that evening, and when they gave us the go-ahead we built the rest on it.

What they asked for

  • Bookings
  • Availability for each piano
  • A customer list
  • Marketing
  • The people who move the pianos
  • Costs and reporting

The problem

Pricing a piano hire isn't one number. Transport is charged for each leg, delivery and collection. Stairs or a lift add a charge to each leg. Tuning comes in packages. The length of the hire falls into tiers, the delivery postcode sets a zone fee, GST applies to the hire, and a refundable deposit sits outside the GST.

Some jobs can't be priced by a form at all: restricted access such as a narrow doorway, a custom delivery or collection time, a hire longer than 30 nights, or a postcode outside the priced zones. Those need a person to look at them.

What we built

  1. 1

    A five-step booking flow

    Piano and dates, venue, delivery, contact details, and a review. The estimate updates as the customer answers, and a draft survives closing and reopening the form in the same browser session.

  2. 2
    Supabase

    Server-side pricing

    The browser's total is an estimate. When the customer continues to payment, the server prices the booking again from the saved price list, in whole cents, and holds the dates.

  3. 3
    Stripe

    Stripe Checkout

    The hire is charged against a product for each piano at the server's price, and the deposit as a fixed price. The booking is confirmed when the server reads the session back from Stripe as paid.

  4. 4
    Supabase

    One calendar

    The website and the staff calendar read the same availability table. A paid booking, a checkout hold or a staff block closes those dates for that piano.

  5. 5
    Resend

    Emails

    Confirming a booking queues three emails: the customer's confirmation, a separate tax invoice, and a note to the business.

  6. 6
    Supabase

    A staff dashboard

    Bookings and enquiries with search and filters, the availability calendar with date blocks, discount codes, and the pricing editor.

  7. 7
    Stripe

    Quote links

    Staff edit a quote request's details, set the fee and create a payment link that lasts seven days. The customer pays through the same checkout, and the paid booking is linked back to the request.

The booking site and staff dashboard, on a copy with sample data

  • The review step, priced from the saved price list.

    The system's own output. Sample data.

  • A draft price change, checked against a preset hire before it's saved.

    The system's own output. Sample data.

  • A quote link: the agreed price, paid through the same checkout.

    The system's own output. Sample data.

  • The staff calendar: confirmed hires, a checkout hold and a date block.

    The system's own output. Sample data. Payment simulated.

What a person still does

Staff price the jobs a form can't, check the details, and send the quote link themselves: creating a link doesn't email or text anyone. They agree delivery and collection times with the customer, because the times chosen online are requests. And they set the prices.

The technical detail

What each tool allowed

Stripe

  • A Checkout Session line item can use price_data to create a price inline, for dynamic pricing when the amount isn't known ahead of time, attached to an existing product.1
  • That let the hire carry the server's price against a product for each piano, while the deposit uses a fixed price.
  • A session can expire anywhere from 30 minutes to 24 hours after it's created, and this site sets 35 minutes.2
  • With an idempotency key, Stripe saves the result of the first request and returns it to retries with the same key.3
  • Stripe's guide says webhooks are required for fulfilment, because a customer may not reach the landing page, and that the fulfilment step should retrieve the session, check its payment status, and cope with being called more than once.4

Supabase

  • Staff sign in with an emailed link.
  • Supabase signs up a new address by default when it sends one, and setting shouldCreateUser to false stops that, so only approved staff can get in.1
  • Access photos customers upload sit in a private storage bucket, and staff open them through signed links, which share a file for a fixed amount of time.2
  • Here they last a minute.

PostgreSQL

  • An exclusion constraint on a range column stops overlapping values existing in a table at the same time.1
  • The availability table uses one for each piano's dates.

Documentation

  1. 1Constraints on ranges

Vercel

  • Scheduled jobs reconcile bookings and send queued email.
  • When CRON_SECRET is set, Vercel sends it in the Authorization header so the job can check the call is genuine.1
  • Vercel also says a scheduled run can occasionally be missed or delivered more than once, so jobs should be safe to repeat.1

Documentation

  1. 1Managing cron jobs

Resend

  • An idempotency key means a repeated send request is processed once, and keys are kept for 24 hours.1

Documentation

  1. 1Idempotency keys

Vendor links checked 15 November 2026.

Design decisions

  • Prices are data

    Each save in the pricing editor adds a version with a reason and who made it. A save made from an older version is rejected, so two people can't overwrite each other. Presets and a calculator show what typical hires come to before anything is saved.

  • A booking keeps its price

    The price, the Stripe product and the checkout key are frozen on the booking when it's held. Settlement, invoices and emails read the price frozen on the booking, not the current price list. If the prices changed while a customer's form was open, they see the new total and confirm it before paying.

  • Quotes don't hold dates

    A quote request takes no payment and holds no dates. Dates are held only when the customer starts paying from the quote link.

  • Only the server touches the data

    The database tables are closed to the browser, and the server writes every booking, hold and price change.

The hard parts

  • Payment safe to retry

    Each checkout request carries a fixed key, so a retry after a lost response finds the same checkout. If the response was lost before it was recorded, a scheduled check searches Stripe for it. A hold is released only after a complete search finds no payment.

  • Email safe to retry

    The three emails are queued in the same step that confirms the booking. They're sent straight away where possible, and a scheduled job retries the rest, with a key so a retry isn't sent twice. A provider failure doesn't release dates that might be paid.

  • Switching on

    Live payments stayed behind a setting until the domain moved across, and the site was tested end to end in Stripe's test mode first.

Where it stands

Live since

October 2026

  • Later that month we added the pricing editor and quote links, so staff change prices and send quotes themselves.

It's early, and we haven't measured a result, so there's no before and after figure on this page.

Questions

Can Stripe Checkout charge a price worked out by my own server?

Yes. A line item can carry an inline price, in cents, against a product you already have in Stripe. On this job the server works out the hire price, and the deposit is a fixed price.

How do you stop two customers booking the same dates?

Dates are held when a customer starts paying, and the database refuses overlapping dates for the same piano through an exclusion constraint. A hold that isn't paid is released once Stripe confirms the checkout expired without payment.

Can staff change prices without a developer?

On this job, yes. The pricing editor saves each change as a new version with a reason, and shows what typical hires would cost before saving. Bookings already paid keep their price.

What happens to jobs that can't be priced online?

They come in as quote requests with no payment and no dates held. Staff set the fee and send a payment link that lasts seven days, and the customer pays through the same checkout.

What if a customer pays but doesn't come back to the site?

The booking is still confirmed. Stripe tells the server through a webhook, and the server reads the session back from Stripe before it confirms anything.

Taking bookings by phone and email that could be paid online?

Book Free Assessment

Product names and logos belong to their owners and are shown to identify the systems connected.