merce.STACK
merce.STACK
Skip to content
PricingWhat's new
Log inGet started
{}Developers
GuidesAPI referenceChangelogGet API keys →
  • Get started

    • Quickstart
    • Keys & authentication
  • Storefront

    • Products & catalog
    • Carts
    • Checkout & payment
    • Customer accounts
    • Digital products
    • Without a build step
    • Bookings
    • Courses
    • Drop-in components
  • Server API

    • Server API
    • Customers
    • Payment links & transactions
    • Balance & payouts
    • Classes & students
    • Node SDK
  • Email API

    • Email API
    • Sending email
    • Delivery events
  • Events & errors

    • Webhooks
    • Errors
  • Reference

    • API reference
    • Changelog

Storefront

Bookings

Booking pages on your own site: who takes bookings, their open times, and booking one.

The same browser key (pk_…) as the store, so one client does the shop, the booking page and the courses. The key names the workspace — nothing here asks for a workspace slug. Paid booking types are paid into the workspace's own account, set up in Settings › Payments.

TypeScript
const pages = await mercestack.bookings.list();
// [{ handle: "ada", host: { name, intro, timezone }, types: [{ slug, title, durationMinutes, price }] }]

const page = pages[0];
const type = page.types[0];

const { slots, timezone } = await mercestack.bookings.slots(page.handle, type.slug, {
  from: "2026-11-02",
  to: "2026-11-09",
});

const booking = await mercestack.bookings.book(page.handle, type.slug, {
  startsAt: slots[0],
  name: "Ada Lovelace",
  email: "[email protected]",
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
});

if (booking.paymentUrl) location.assign(booking.paymentUrl); // paid type
else show(booking.manageUrl); // confirmed — where the guest can reschedule or cancel

What to know

  • —Slots are already filtered. Working hours, existing meetings and calendar events, buffers and the booking window are applied on the server. Show what comes back.
  • —A slot can go between showing it and booking it. book answers with an error then; offer the next time rather than retrying the same one.
  • —Paid types hold the slot while the guest pays. It is released if payment does not finish.

Plan and payments

Developer keys need a plan with Headless & API access. Paid bookings need Take payments online and a payment account connected in Settings › Payments — without one, book answers that the business is not taking online payments yet.

← PreviousWithout a build stepNext →Courses
Create a workspaceTalk to usPricing

One workspace for everything your business runs on — your team, customers, store, marketing and payouts in one place.

Get started

Product

  • All products
  • Pricing
  • What's new
  • Security

Resources

  • Documentation
  • Guides
  • Use cases
  • Blog
  • Get support

Company

  • About
  • Careers
  • Contact us
  • Talk to the team

Legal

  • Privacy
  • Terms
  • Cookie policy
  • GDPR
  • Report a vulnerability

© 2026 Mercestack. All rights reserved.

Mercestack StructureOS

mercestack