We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Adding subscription plan in order create mutation

Adding subscription plan in order create mutation

Jubins
Shopify Partner
6 0 0

Hi Team,
We are trying to create an order using GraphQL mutations in Shopify. However, we’re facing an issue where we’re unable to include the sellingPlanId in the orderCreate mutation, although it can be added successfully in the cartCreate mutation. Could anyone suggest how to associate a sellingPlanId when using the orderCreate mutation?

Replies 3 (3)

ElijahStownton
Excursionist
39 0 5

You can't add a subscription plan directly in the orderCreate mutation. Instead, you need to create a subscription contract first, then trigger a billing attempt to generate the order.

Jubins
Shopify Partner
6 0 0

Thanks for your reply. We have already created the subscription contract. Is the order automatically created once the subscriptionBillingAttemptCreate mutation query is executed?. Or do we need to execute any additional mutations?

Small_Task_Help
Shopify Partner
1144 55 112

Hi,

Hope this will help. As you have already created a subscription contract

- DO use Cart API (cartCreate, cartLinesAdd, checkoutUrl).
- DON’T try to use orderCreate directly for subscriptions — it’s not built for that.

To Get Shopify Experts Help, Click Here or E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Developers India
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad