I’m working on an integration where I allow customers to set dynamic prices for services through the Square app, specifically using the VARIABLE_PRICING option in the service settings. The price is set before the checkout, and the Square app shows the correct price to the customer. However, I’m running into an issue where I can’t seem to retrieve this dynamic price through Square’s public APIs before the transaction is finalized.
Here’s what I’ve tried so far:
I used the Bookings API to retrieve appointment details, but it doesn’t include the variable pricing that was set during the booking process.
I also checked the Catalog API and Orders API, but the dynamic price(VARIABLE_PRICING) doesn’t appear.
I noticed that the internal Square app is able to display this dynamic price before checkout, which suggests that the price is being stored somewhere temporarily. Specifically, when I make bookings with dynamic pricing in the Square app, I can see the correct price reflected on the booking screen even before finalizing the order.
My Question: Is there an API (public or private) that allows access to this temporarily stored variable price before the order is finalized? If not, are there any recommended workarounds for capturing or syncing this price data into a backend system?
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:
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.
Currently, there is no public API that allows access to the temporarily stored variable price before the order is finalized in Square. The variable pricing set during the booking process is not exposed via the Bookings API, Catalog API, or Orders API.
As for workarounds, one possible approach could be to manage the variable pricing logic within your own application. You could create a system to capture the price set by the customer during the booking process and store it in your own database. Then, you could use this stored price for any necessary calculations or operations in your backend system. However, this would require additional development work on your end to implement and maintain.
Please note that this is based on the current capabilities of Square’s APIs and the situation may change if Square decides to add this feature in the future.