How to link a Payment to an Appointment (API)

Hi - I have developed an app that is based on Square Appointment. When a customer pays at the POS for an appointment, the Payment appears on the Booking when I check on the Square Terminal.

My question is: How can I retrieve the Payment for a Booking using the API’s?

When I start from the Payment object returned by the API, I see I can get the “order_id” for that Payment… but cannot retrace back to the Booking.
And the other way around: when I start from the Booking object returned by the API, I do not see anything in that object that points to a payment for that Booking.

Feel free to let me know if I am missing something there.

:wave: Currently, with the APIs there isn’t a way to map a booking to the payment or order. Nor is it possible to map the payment or order to the booking. This is a very popular feature request and we hope to have more options for you soon, so thanks for your continued patience. :slightly_smiling_face:

Please we are waiting for this feature i think for more than 3 years already, i saw that you guys have been working on the bookings API lately, please add this feature so we can relate these two, a payment with a booking.
It would be very helpful, there is still a way but implies a lot of programing and assuming certain hours, names, etc (multiples keys so they can relate) for the association. @diane-uwa
Link a payment to a booking in square api
Please add this feature.
Thank you

This is a very popular feature request and we hope to have more options for you soon, so thanks for your continued patience. :slightly_smiling_face: