Sample Flows

This article provides sample flows for retrieving booking pricing information using Preview Price and Calculate Price. Use these flows as a starting point to implement tailored booking experiences.

Build a custom checkout flow

You can display services and available slots to customers, let them choose their preferred options, then show accurate pricing in your custom checkout before creating the booking.

  1. Display a service list to the customer, let them select a service and an available slot. For example, as described in the appointment end-to-end booking flow.
  2. Call Preview Price specifying bookingLineItems with serviceId, numberOfParticipants, and choices for each variant.
  3. Display the pricing breakdown in your custom checkout interface using priceInfo.calculatedPrice for the total cost and priceInfo.bookingLineItems[].pricePerParticipant for individual line item pricing.
  4. Call Create Booking to complete the booking with the selected slot and pricing information.
  5. Once the customer completes the checkout, call Confirm Or Decline Booking. Set options.paymentStatus to PAID to update the booking status to CONFIRMED.
  6. Call Create Order with your custom payment details.

Display booking costs in an external app

To show booking pricing in external apps or 3rd-party systems:

  1. Call Query Extended Booking to retrieve the relevant booking object.
  2. Call Calculate Price specifying the complete booking object.
  3. Use the returned priceInfo.calculatedPrice to display accurate booking costs in your external interface. Make sure to handle deposits and non-numerical prices properly:
    • If priceInfo.deposit is present, show deposit requirements separately.
    • Handle responses where priceInfo.priceDescriptionInfo contains custom pricing text instead of calculatedPrice for services with CUSTOM rate types.

Preview duration-based pricing for a duration-range service

For services with a duration range configured, you can preview the price based on the customer's selected time range. This is useful for duration-range services where the customer chooses how long to book.

  1. Call Get Service to retrieve the service and confirm it has a duration range configured in schedule.availabilityConstraints.durationRange.

  2. Let the customer select their desired start and end times within the allowed duration range.

  3. Call Preview Price specifying bookingLineItems with serviceId, numberOfParticipants, localStartDate, localEndDate, and timeZone. For example:

    Copy
  4. Display the returned priceInfo.calculatedPrice to the customer. The price is calculated based on the duration: per minute for hourly services and per day for daily services.

Last updated: 1 July 2026

Did this help?