Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hi.
The documentation for the cart Ajax API documents how to add a line item with a selling plan. I'm not seeing a way to set a selling plan when using the Storefront API. For example, the checkoutLineItemsAdd mutation doesn't include a sellingPlan field. The roadmap (https://shopify.dev/apps/subscriptions#product-roadmap) says that the "Storefront API" feature was launched in July 2021.
How can I add a selling plan to a line item using the Storefront API?
Thanks you.
Solved! Go to the solution
This is an accepted solution.
Thanks for the question. The cartCreateMutation should let you build a cart with a subscription line item. The cartLinesAdd and cartLinesUpdate may also be what you're looking for. If those links aren't what you're looking for, let me know. Good luck!
This is an accepted solution.
Thanks for the question. The cartCreateMutation should let you build a cart with a subscription line item. The cartLinesAdd and cartLinesUpdate may also be what you're looking for. If those links aren't what you're looking for, let me know. Good luck!
Hi, so the cartLinesAdd and cartCreate mutation does allow for adding a line item with selling plan, but then the only way to checkout is via a web URL. Is there any way to utilize the cartCreate and then get the checkout ID and checkout using the completeCheckout mutations?
hi , I want to use it in chekout. Is there this method
Could you please describe in a bit more detail exactly what you want to do?
我们使用 storefront mobile-buy-sdk-android 想在结账的时候 可以购买 订阅商品和 到店自取
We use storefront mobile buy SDK Android. We want to buy subscription goods and pick them up at the store when we check out