Get Booking amount from API call

I’m using a webhook that triggers when a new appointment is made, in order to activate my automated flow. The issue i’m having is i can’t find the booking amount in the webhook data,is there a way to get this information via api ?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Onboard to Square Appointments
Payments API Webhooks
Bookings API Overview

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Yes, you can get the booking amount information via the API but it’s not directly available in the webhook data. When a booking is created or updated, the webhook event data includes the booking ID but not the booking amount.

To get the booking amount, you can use the booking ID from the webhook data to call the RetrieveBooking endpoint of the Bookings API. This will return a Booking object that includes the version and booking data, including the service variation which you can then use to call the RetrieveCatalogObject endpoint of the Catalog API to get the price of the service.

Please note that this assumes that the price of the booking is determined by the price of the service variation and doesn’t account for any additional items or discounts that might be applied to the booking.

This answer was reviewed by @Bryan-Square.

Thanks a ton for the reply, i will try this

Unfortunately, it doesn’t return an amount because i’m using a variable pricing, any clues on that ?

The service is variably priced? :slightly_smiling_face:

Yes, on each appointment has its own price, you can think of it as a ‘quote’ rather than a regular fixed price

If that’s the case then you won’t be able to get the cost till the appointment is paid for since the appointment order ins’t available till then. :slightly_smiling_face: