Bug in Wix Bookings API

Hello @jacobg
We’re still experiencing some problems with the Bookings API and non-consistency with the preview mode and the published site ( when I run on preview mode I get confirmation). We also don’t get the payment form in any situation. Everything worked great for us until Aug 22.

let slot = {“_id”:“3EWaa2GRHt7M5vBoUso99m5tZK3IrU7zxLYTLujCOjC5iq5dnsI9w1g305GulcxrErlFRyKKFPfhRayXyB43XmWxBVD7Hq0op3IjzgD8UTHLr9mSDNVf2QBFNgAgEyjdjCmuOOPSycPOH4n82hBwf57Eph32EQsdoiDH2XgbtERIfSJtF9JYRZB1e1lRVgsz5suGbTHyPhk7RDImbeQrXVaDp78TIItO8AMZK1b2ZM0ebyEbWmAcHjXeGhlnY7ICXkUSIJ7jKL6HphPpzGSx3ZFQyjuMIvDR19ZLU9e1OqNhxjI6kF5YgAw8JXDvMhf00kSQO53ezwUtvfOHCtBKGG24zMliqWR2qohptf359jt1ff1FRmLmNiIzMRx9O0LpZeJxAvIvprTPyIvpqFH3ewnMYp7Uk7zyCzduFLJAcQdWWxo3WBxGHCfgRbp4jzWUQSxnbyM4ghqJqBd5sEl01aTCUyed5OC0Z5gkJ8UxhxjUmiTLEh8B7GbL51yHeJltdWmQRrMTeUPc4nZKFQUswHDAVFeIhY9FrgNsP8qheNgCMuZu8VWFDDBkH4wOu4AC0BSC07zJd”,“startDateTime”:“2022-09-10T12:30:00.000Z”,“endDateTime”:“2022-09-10T16:30:00.000Z”,“serviceId”:“35b38393-8616-40c4-9766-a8e1902cf89c”,“capacity”:1,“remainingSpots”:1,“staffMemberId”:“a0299378-a9af-4c08-9257-f65808aa80a3”,“bookable”:true,“constraints”:{“bookableUntil”:“2022-09-09T12:30:00.000Z”},“location”:{“type”:“CUSTOM”}};

let bookingInfo = {
// selected slot object
“slot” : selectedSlot , //availableSlots[slotIndex],
// form filed values collected above
“formFields” : [{ “_id” : ‘00000000-0000-0000-0000-000000000001’ /getFieldId(theService, “Name”)/ , “value” : formInspection . first_name + ’ ’ + formInspection . last_name },
{ “_id” : ‘00000000-0000-0000-0000-000000000002’ /getFieldId(theService, “Email”)/ , “value” : $w ( ‘#email’ ). value },
{ “_id” : ‘00000000-0000-0000-0000-000000000003’ /getFieldId(theService, “Phone Number”)/ , “value” : $w ( ‘#phone’ ). value },
{ “_id” : ‘00000000-0000-0000-0000-000000000004’ /getFieldId(theService, “Street”)/ , “value” : $w ( ‘#addressInput1’ ). value . streetAddress . name },
{ “_id” : ‘00000000-0000-0000-0000-000000000005’ /getFieldId(theService, “City”)/ , “value” : $w ( ‘#addressInput1’ ). value . city },

]}; 

// booking checkout
wixBookings . checkoutBooking ( bookingInfo )
. then ( ( results ) => {
let info = Booking ID: ${ results . bookingId } Status: ${ results . status };
})catch((err)=>{console.log(JSON.stringify(err))});

getting : {“code”:2,“message”:“invalid form info”}

I hope you can help us :slight_smile: