> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/pricing-api/sample-flows.md ## Article Content: # Sample Flows This article provides sample flows for retrieving booking pricing information using [Preview Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price.md) and [Calculate Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price.md). 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](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flows.md#book-an-appointment). 1. Call [Preview Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price.md) specifying `bookingLineItems` with `serviceId`, `numberOfParticipants`, and `choices` for each variant. 1. 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. 1. Call [Create Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking.md) to complete the booking with the selected slot and pricing information. 1. Once the customer completes the checkout, call [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking.md). Set `options.paymentStatus` to `PAID` to update the booking status to `CONFIRMED`. 1. Call [Create Order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/orders/create-order.md) 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](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-reader-v2/query-extended-bookings.md) to retrieve the relevant booking object. 1. Call [Calculate Price](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price.md) specifying the complete `booking` object. 1. 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.