createCheckout with Bookings.V2 and Ecom API

I’m trying to implement the bookings.v2 with the ecom checkout process, essentially following the velo example: https://www.wix.com/velo/example/custom-book-flow-on-booking-v2

The issue I am running into is when the createCheckout is created. Despite their being spaces available in the session, the createCheckout returns a status of ‘NOT_AVAILABLE’, and so when I try to go into the checkout, it states that the selected item is unavailable.

An extract of the checkout response object is:

This is despite the preceeding step, createBooking returning this object response:

My code, as far as I can tell, follows the velo example, so am looking to see whether anyone else has had much success with the bookings.v2 and ecom api’s? There may well be something obvious I’m missing here.

My code at the moment in the frontend to create the booking and checkout is:

const WIX_BOOKINGS_APP_DEF_ID = "13d21c63-b5ec-5912-8397-c3a5ddb27a97";

async function createBookingsAndCheckOutV2(slotData, firstName, lastName, email){

	console.log(slotData)

	const bookingObject = {
        totalParticipants: 1,
        bookingSource: {
            actor: "CUSTOMER",
            platform: "WEB"
        },
        contactDetails: {
            firstName: firstName,
            lastName:  lastName,
            email: email
        },
        

        bookedEntity: {
            slot: {
                startDate: slotData.slot.startDate,
                endDate: slotData.slot.endDate,
                timezone: slotData.slot.timezone,
                location: {
                    locationType: slotData.slot.location.locationType
                },
                resource: {
                    id: slotData.slot.resource._id,
                    name: slotData.slot.resource.name,
                    scheduleId: slotData.slot.resource.scheduleId
                },
                scheduleId: slotData.slot.scheduleId,
                serviceId: slotData.slot.serviceId,
				sessionId: slotData.slot.sessionId
            }
        }
    }

	let createdBooking = await createBooking(bookingObject,{});

	console.log(createBooking)

	// Create Checkout
    const options = {
        lineItems: [{
            quantity: 1,
            catalogReference: {
                // Wix Bookings app Id
                appId: WIX_BOOKINGS_APP_DEF_ID,
                // Wix Bookings bookings Id
                catalogItemId: createdBooking.booking._id 
            }
        }],
        checkoutInfo: {
            billingInfo: {
                contactDetails: {
                    firstName: firstName,
                    lastName: lastName,
                }
            },
            buyerInfo: {
                email: email,
            }
        },
        channelType: "WEB"
    }
    let createCheckoutEcom = await createCheckout(options)
	console.log(createCheckoutEcom)
    let url = await getCheckoutUrl(createCheckoutEcom._id)
    wixLocation.to(url)

}

With backend code as:

export async function createBooking(booking, options) {
    try {
        const result = await bookings.createBooking(booking, options);

        return result;
    } catch (error) {
        console.error(error);
        // Handle the error
    }
}

export async function createCheckout(options) {
    try {
        const newCheckout = await checkout.createCheckout(options);
        console.log('Success! Checkout created, checkout:', newCheckout);
        return newCheckout;
    } catch (error) {
        console.error(error);
    }
}

export async function getCheckoutUrl(id, options) {
    try {
        const result = await checkout.getCheckoutUrl(id, options);
        return result.checkoutUrl;
    } catch (error) {
        console.error(error);
    }
}