FROM CACHE - en_header

Cannot apply selling plan to variant

Solved
Tiber
Excursionist
25 4 4

I have created a subscription Group on a products variant, but when I try adding the item to the cart I am getting

 

 

status: 422, message: "Cart Error", description: "Cannot apply selling plan to variant"
mutation {
  sellingPlanGroupCreate(
    input: {
      name: "Monthly"
      merchantCode: "Monthly"
      options: ["Monthly"]
      position: 1
      sellingPlansToCreate: [
        {
          name: "Monthly"
          description: "Payments the first of the month"
          options: "Monthly Payments"
          position: 1
          billingPolicy: { recurring: { interval: MONTH, intervalCount: 1 ,maxCycles:8, anchors:{type:MONTHDAY,day:1}} }
          deliveryPolicy: { recurring: { interval: MONTH, intervalCount: 1 , anchors:{type:MONTHDAY,day:1}} }
				   
        }
      ]
    }
    resources: { productIds: [""], productVariantIds["gid://shopify/ProductVariant/4127279"] }
  ) {
    sellingPlanGroup {
      id
    }
    userErrors {
      field
      message
    }
  }
}

 

 

 

 

Accepted Solution (1)

Accepted Solutions
Tiber
Excursionist
25 4 4

This is an accepted solution.

I was using SellingPlanGroup id not SellingPlan id

View solution in original post

Reply 1 (1)
Tiber
Excursionist
25 4 4

This is an accepted solution.

I was using SellingPlanGroup id not SellingPlan id