# Verify cart with Shopify Hydrogen

**URL:** <https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72>\
**Category:** Community\
**Tags:** experience\
**Created:** [October 23, 2025, 3:58pm UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72 "2025-10-23T15:58:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackson\_tan](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.sesami.co/jackson_tan/32/64_2.png) [@jackson\_tan](https://community.sesami.co/u/jackson_tan)\
**Post date:** [October 23, 2025, 3:58pm UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72/1 "2025-10-23T15:58:30Z")

</div>

Hi Support,

I am currently integrating Sesami Experience into my Shopify Hydrogen, I have managed to accomplish almost the entire flow from time selection \> add to cart \> checkout. But Im missing some information for cart verification mentioned at this document [Verify Cart | Sesami developers](https://sesami.dev/docs/sesami-experience/verify-cart/).

My main concern is that if user1 have added a service to cart but did not checkout immediately, then user2 have completed the booking process. I have no ways to help user1 verify if the service is still available before allowing user1 to checkout. Which may cause double booking issue.

I believe the document from the URL is tailored to Shopify Themes, especially the “_get cart data”_ part. May I inquire if there is an API endpoint or another method where I can validate reservation status of a service before allowing user to checkout?

---

<div class="post-metadata">

**Author:** ![ehsan](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.sesami.co/ehsan/32/1_2.png) [@ehsan](https://community.sesami.co/u/ehsan)\
**Post date:** [October 28, 2025, 7:51pm UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72/2 "2025-10-28T19:51:09Z")

</div>

Hey @jackson_tan ,  
Seems like an awesome project you’re working on!

You’re correct and are on the right path!  
Please check out Shopify’s doc for reading the cart object in Hydrogen:

> **[Read data from a cart](https://shopify.dev/docs/storefronts/headless/hydrogen/cart/read)**
>
> Use a cart handler and read a visitor's cart.

Let us know how you find this.

---

<div class="post-metadata">

**Author:** ![jackson\_tan](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.sesami.co/jackson_tan/32/64_2.png) [@jackson\_tan](https://community.sesami.co/u/jackson_tan)\
**Post date:** [October 29, 2025, 5:18am UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72/3 "2025-10-29T05:18:34Z")

</div>

Hi @ehsan thanks for the reply,

I may be incorrect but I believe the Hydrogen cart object from your link and AJAX API cart object from “/cart.js” have different properties at least from my own understanding and comparison.

Unless the “[https://app.sesami.co/availabilities/verify-cart](https://app.sesami.co/availabilities/verify-cart) ” endpoint is able to accept different cart structure? If so may I know what are the crucial information this endpoint requires in order to verify the cart? Is it the sesami-experience attributes like “\_reservation\_token” attached to the cart lines?

Regardless, I tried to pass Hydrogen cart object as the request body, but all I could get was “400 Bad Request” error without additional information. I also tried the endpoint using Postman & Ngrok in case it was CORS but the result was still “400 Bad Request”.

The only problem Im suspecting is my cart properties which I’ll attach below in stringified format with my ‘x-sesami-origin’ header. May I please receive more guidance on this?

`'x-sesami-origin': 'https://onehalf-coffee.myshopify.com'`

```auto
“{\“updatedAt\”:\“2025-10-29T04:46:37Z\”,\“id\”:\“gid://shopify/Cart/hWN4f9HTzkHU47D2eTqxmFFs?key=392b6fac544e45ac6ffd5a4d1cd31bf4\”,\“checkoutUrl\”:\“https://account.onehalfcoffee.com/cart/c/hWN4f9HTzkHU47D2eTqxmFFs?key=uNAdoVyR2RlwHVKZbL6uNFz7vXvTbRVWd1DxZW2a6xFjHvRggdkdRJOsDhdgfMX4FKpiuXN4TA9n7Na-5Y40S9_R5wPl1cRpOlJg1BvdEKMRiHXEGWDoAb4d_PPpaGxkf36SfqSd2x2rhOW23Y5Hqg%3D%3D\",\“totalQuantity\”:1,\“buyerIdentity\”:{\“countryCode\”:\“MY\”,\“customer\”:{\“id\”:\“gid://shopify/Customer/8380622471381\”,\“email\”:\“jtyy1023@gmail.com\”,\“firstName\”:\“Test\”,\“lastName\”:\“Yang\”,\“displayName\”:\"Test Yang\”},\“email\”:null,\“phone\”:null},\“lines\”:{\“edges\”:[{\“node\”:{\“id\”:\“gid://shopify/CartLine/291dc19b-1a2e-4c1d-b4e0-23c71e206710?cart=hWN4f9HTzkHU47D2eTqxmFFs\”,\“quantity\”:1,\“attributes\”:[{\“key\”:\“Date\”,\“value\”:\“2025-10-29\”},{\“key\”:\“Time\”,\“value\”:\“13:00\”},{\“key\”:\“Timezone\”,\“value\”:\”\“},{\“key\”:\“Location\”,\“value\”:\”\“},{\“key\”:\”_reservation_token\“,\“value\”:\“NjkwMTljMjc0MGY0MGM5ZWE1MDY3M2M1\”},{\“key\”:\”_locale\“,\“value\”:\”\“},{\“key\”:\”_session-id\“,\“value\”:\“6v1j4118\”},{\“key\”:\“Resources\”,\“value\”:\”\“}],\“cost\”:{\“totalAmount\”:{\“currencyCode\”:\“MYR\”,\“amount\”:\“850.0\”},\“amountPerQuantity\”:{\“currencyCode\”:\“MYR\”,\“amount\”:\“1000.0\”},\“compareAtAmountPerQuantity\”:null},\“merchandise\”:{\“id\”:\“gid://shopify/ProductVariant/52255959777493\”,\“availableForSale\”:true,\“compareAtPrice\”:null,\“price\”:{\“currencyCode\”:\“MYR\”,\“amount\”:\“1000.0\”},\“requiresShipping\”:false,\“title\”:\“6 hours and 30 minutes\”,\“image\”:{\“id\”:\“gid://shopify/ProductImage/48620257870037\”,\“url\”:\“https://cdn.shopify.com/s/files/1/0699/1917/8965/files/DSCF9951_b40220f4-4548-4a55-8b52-90ee390866c8.jpg?v=1758613033\",\“altText\”:null,\“width\”:4160,\“height\”:6240},\“product\”:{\“handle\”:\“basic-brewer-course-1\”,\“title\”:\"Basic Brewer Course\”,\“id\”:\“gid://shopify/Product/9147379122389\”,\“vendor\”:\“One Half Coffee\”},\“selectedOptions\”:[{\“name\”:\“duration\”,\“value\”:\“6 hours and 30 minutes\”}]},\“sellingPlanAllocation\”:null}}]},\“cost\”:{\“subtotalAmount\”:{\“currencyCode\”:\“MYR\”,\“amount\”:\“850.0\”},\“totalAmount\”:{\“currencyCode\”:\“MYR\”,\“amount\”:\“850.0\”},\“totalDutyAmount\”:null,\“totalTaxAmount\”:null},\“note\”:\”\“,\“attributes\”:,\“discountCodes\”:}”

```

---

<div class="post-metadata">

**Author:** ![jeanny.muyco](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jeanny.muyco](https://community.sesami.co/u/jeanny.muyco)\
**Post date:** [November 18, 2025, 12:10pm UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72/4 "2025-11-18T12:10:11Z")

</div>

Hello Jackson!

Great to hear that you were able to fix this! 🎉

If you’re able to share what the solution was, it would be really helpful for others who might run into the same issue.

---

<div class="post-metadata">

**Author:** ![jackson\_tan](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.sesami.co/jackson_tan/32/64_2.png) [@jackson\_tan](https://community.sesami.co/u/jackson_tan)\
**Post date:** [November 18, 2025, 4:35pm UTC](https://community.sesami.co/t/verify-cart-with-shopify-hydrogen/72/5 "2025-11-18T16:35:47Z")

</div>

Hi Jeanny,

Sorry, I’ve only managed to get the multi-day booking to work.  
I’m still at a dead end for the verify cart.
