Storefront API does not allow to add a note to checkout

brianh20
Shopify Partner
10 0 0

You can't add a note to the Checkout object while performing a checkout with Shopify Storefront GraphQL API

Replies 5 (5)

vix
Shopify Staff
540 103 122

Hey - I'd suggest to use the cart in this case. This will allow you to add a note and pass to checkout! https://shopify.dev/api/storefront/unstable/mutations/cartNoteUpdate

To learn more visit the Shopify Help Center or the Community Blog.

brianh20
Shopify Partner
10 0 0

I attempted to use the cart part of the Storefront API but I did not find a way to turn a cart into a Checkout without actually moving all the items from one instance to the other. There is no mutation to turn a cart into a checkout so I am using the checkout directly.

 

The checkout does not have a notes property/mutation to add so I will need to add the note to the order, which I am not being able to create given that I have another open ticket about that here:

 

https://community.shopify.com/c/shopify-apis-and-sdks/can-t-find-quot-request-payment-processing-quo...

 

EbenHafkamp
Shopify Partner
15 1 4

Any movement on this? I am also unable to add a note and I also don't see using the cart api as an option as this was implemented after I started my project and there is no way of converting a cart into a checkout, meaning the developer is responsible for maintaining both copies and keeping them in sync which would be a nightmare.

EbenHafkamp
Shopify Partner
15 1 4

I got this working by using the new 

checkoutAttributesUpdateV2 mutation and returning the note as a top level field on checkout.
brianh20
Shopify Partner
10 0 0
Yes, my friend. I know how you feel. You’re going to go down an intricate
rabbit hole now. It would have been nice if they at least made something
like ‘checkout from cart Id’. I wish you the best on your journey. Soon
you’ll find there’s a lot you can’t do without Shopify plus - like creating
gift cards; or the fact that if you want to use discount codes there is a
lot of logic you’ll have to implement yourself. There is no way to charge
without paying for Shopify plus unless you do the charges yourself
externally and mark them as paid; and you can’t do this on non-subscription
accounts because they’ll block them.