Discussions
Not able to fetch PaymentLink urls for Booking Website
7 days ago by Abdul Ahadh
Hey team, I'm building our own Booking website using Lodgify APIs. From what I understand after reading the API docs, once the potential guest clicks on "Book" in our website, the flow should be:
- Create a Booking with Open status using this end-point: https://docs.lodgify.com/reference/post_v1-reservation-booking-1
- Create a Quote for this open booking: https://docs.lodgify.com/reference/createquoteforbooking-1
- Use the Quote amount to Create a Payment link via this end-point: https://docs.lodgify.com/reference/createpaymentlinkasync
- Fetch the Payment link URL via Get a Booking's payment link end-point: https://docs.lodgify.com/reference/getpaymentlinkasync
- Redirect the user to this URL.
Questions:
- Is this the advised flow or is there a more efficient way to create bookings?
- I'm running into this issue with "Create a Payment Link" step. What should I do to avoid this? And alternatively, Reservation status cannot be "Booked" while the payment is being made. If so, how should we handle the reservation if the drops during the payment step?
"{
"message": "Cannot accept payment. Reservation status is {Open}.",
"code": 666,
"correlation_id": "0HN9FQKE9560T:00000027",
"event_id": null
}" - How can we know if the customer was charged or not? Are there any webhooks we can listen to for the same?