repository

BlowfishCMS

A small content management system for OpenBSD

version 0.45.6 · ISC · 2026-12-03 · releases

170 lines · 10.2 KB · view the source · download this file

Services

A Services page for what you offer, and booking it. Visitors choose what they need, answer your questions about it, suggest times that suit them, give their details, and pay on Stripe's own page when it's paid up front (card numbers never reach your server). You confirm a time, ask for payment (hours worked, a quote, the rest of a deposit) and mark the job done on the Bookings tab; each step is emailed.

The page itself has your services (each with an address of its own, such as /services/#hosting), a pricing table, jump links and a list of what can be booked.

Version2.3.2
NeedsBlowfishCMS 0.41.0 or newer; a Stripe account to take payments online; Postmark set up on the Mail screen for the emails
Connects toapi.stripe.com
Runs asits own service, blowfish_xservices (account _bfxservices), for bookings and payments
Keepswhat can be booked in the catalogue; bookings (names, contact details, addresses, answers) and the Stripe keys in its own private folders, included in backups (the keys only in --with-secrets ones)

Switching it on

Press install beside Services on Site → Add-ons. Within a minute or two the server sets up its service, and Services gets three tabs: Offerings, Bookings and Page. Switching it on makes the Services page at /services/ (off at first, so you can fill it in):

  1. a Hero header, its buttons jumping to the prices and to booking;
  2. Jump links to the parts below;
  3. Services: cards for what you offer;
  4. Book a service: everything that can be booked (anchor book);
  5. Pricing: plans side by side (anchor pricing);
  6. Questions and answers (anchor questions);
  7. a Get in touch button.

Switch On under Address, menu & on/off in the page editor when it's ready. A site that already has a page at /services/ keeps it, and the page editor offers add Services' blocks.

Updating from Services 1.0.0: the server sets up its new service as part of the update (BlowfishCMS 0.40.2 or newer).

Setting it up

1. What can be booked (Offerings tab)

Add each thing people can book as an offering: type its name under new offering and press add offering. It starts closed, with one question. Drag offerings by their handles (⠿), or use move up / down in their … menus, to set the order they're listed in. Then fill it in:

FieldWhat it's for
NameAs visitors see it, such as "Windows reinstall"
GroupOfferings with the same group are listed together, such as "Computer & laptop help" and "Websites"
AddressIts booking form is at /x/services/book/ADDRESS/
About itA few words (Markdown), in lists and on its form
PricedA fixed price, By the hour, or On request (you give a price later)
Price, or hourly rateSuch as 85, or 45 an hour
PaidFor a fixed price: When booking, A deposit when booking, the rest after, or After the job. By the hour and on request are always paid after, from a link you send
DepositFor a deposit: how much is paid when booking
Down payment (%)Optional, such as 50: a share of the price paid before the work starts. A fixed price takes it when booking (in place of Paid and Deposit: "a $175 down payment (50%) now"). By the hour or on request, the form says it comes with your estimate or price, and you ask for it on the Bookings tab
DoneRemotely (no address asked), In person (a street address and town), or By mail: they send it to you (a laptop for repair, say) and give an address to send it back to
Service areaFor in person: the towns you go to, separated by commas, such as "Overton, Logandale, Mesquite". People choose one; other towns can't book it. Leave empty for anywhere
Ask for timesPeople suggest up to three dates (and morning, afternoon or evening); you confirm one
QuestionsWhat you need to know: a short or long answer, an email address, a number, a date, one or any of a list, or a tick box; each can be required
Can be bookedOpens its form and lists it. Switch it off to close it without deleting it; the switch is in its row on the Offerings tab too

Every booking also asks for a name, an email address, a phone number (in person; optional otherwise) and anything else they want to add.

Booking settings (under the list): the currency, Terms people must agree to (optional), Sending things by mail (where to send it and how to pack it, shown on a by-mail offering's form and in its confirmation), a note for the email people get when they book, and whether you and they are emailed.

Offerings ready-made: a seed/ folder in this add-on's folder, holding NAME.json files ({"offerings": [{"slug", "name", "grp", "summary", "pricing", "amount", "pay", "place", "area", "times", "questions": [{"label", "type", "options", "required"}]}], "settings": {…}}), adds its offerings once, open, when Services is switched on or the site is updated; one you delete isn't added again, and a setting is filled in only while it's empty. The release has none; a ready-made build of BlowfishCMS may.

2. Payments (Bookings tab → stripe)

Nothing needs paying online until an offering is paid when booking, or you ask for a payment. To take payments:

  1. In Stripe → Developers → API keys, create a restricted key with "Checkout Sessions: Write" (or use the secret key). Start with a test key (sk_test_…).
  2. Paste it under Stripe secret key and press save. It's checked with Stripe first, and never shown again.
  3. In Stripe → Developers → Webhooks → Add endpoint: the address shown on the Bookings tab (https://your-site/x/services/webhook), with the events checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed and checkout.session.expired. Copy its signing secret (whsec_…) into Webhook signing secret.
  4. Book something yourself and pay with Stripe's test card 4242 4242 4242 4242. When it works, replace both with live ones.

If you already use the Store, it's the same Stripe account: give Services its own webhook endpoint.

3. The page

  • Book a service lists every open offering in its groups, each with its price and a Book button; choose Show to list one group only.
  • A Services card's Booking setting gives it a Book button: for one offering, or for a group (it opens a list to choose from). Booking buttons say sets their words.
  • Link to booking from anywhere: /x/services/book/ lists everything, /x/services/book/pc-repair/ opens one form.

Day to day

A booking arrives by email, and on the Bookings tab (open shows those still to do). Open one to see everything they told you, then:

  • Confirm a time: choose one of the times they suggested, or write one in. They're emailed (untick Email it to them to only note it).
  • Ask for a payment: for a job by the hour, give the hours worked (charged at its rate); otherwise give the amount (a quote, the rest after a deposit, parts). For an offering with a down payment, by the hour or on request, Ask for the 50% down payment of it is on until it's asked for: give the whole estimate or price, and they're asked for 50% of it. They get an email with a link that opens Stripe's payment page. Paid in cash or by card in person? Ask for it, then press paid in person. No longer due withdraws a payment (its link stops working).
  • Mark done when the job is finished; cancel it to cancel (they're emailed, and anything still due is withdrawn).
  • Delete it removes the booking and its payments for good, such as when someone asks for their details to be removed.

People can follow their booking on its own page (the link in their emails): its status, the confirmed time, and anything to pay. It needs the key in that link, so it can't be guessed, and search engines are kept away from it.

Refunds are made in the Stripe Dashboard.

Troubleshooting

What you seeCause and fix
"Online payment isn't set up yet" when someone paysNo Stripe key is saved. Save one on the Bookings tab.
A payment stays "at Stripe" after it was paidThe webhook isn't reaching the site, or its signing secret is wrong. The Bookings tab shows the last webhook and why it was refused. Test and live mode have separate endpoints and secrets.
"Stripe refused the key"The key was mistyped, revoked, or is for the other mode. Copy it again from Stripe.
"The key isn't allowed to create Checkout Sessions"Give the restricted key "Checkout Sessions: Write".
"Payment couldn't be started" (visitors)Stripe couldn't be reached, or refused. Check the key on the Bookings tab; the server's log says why.
"Choose a town from the list"In person, only the towns in the offering's service area can book. Add the town to the area, or tell them to get in touch.
"Too many bookings sent from here in the last hour"Five bookings in an hour from one address, to stop floods. It clears after the hour.
"Deposit: more than 0.50 and less than the price."A deposit is part of the price. Use When booking to take it all.
"Another offering is at /x/services/book/…"Two offerings can't share an address. Change one.
No emails arrivePostmark isn't set up (Settings → Mail), or emails are switched off under Booking settings.
A booking page says "not found"Its link was cut short: it needs the whole ?k=… key from the email.
"Anchor “pricing” is on two blocks"Two blocks share an anchor (often a second Pricing or Book block). Change one under Section style › Anchor.
A service's link doesn't jump to itIts anchor is empty, not usable, or used by another service in that block.
A jump link is missingIts part has no anchor, or the page hasn't been saved since it got one.

Limits

  • Times are requested and confirmed by you, not picked from a live calendar, so nothing is double-booked and travel time is yours to judge.
  • Payments are one-off (no subscriptions); refunds are made in Stripe.
  • Prices on the page's Pricing and Services blocks are text you write; the amounts charged are the offerings'.