Any updates to this? I recently ran into this problem as well.
Creating pricing policies is no problem but updating them is odd. The documentation points to a “discountId” but there is no ID for the SellingPlanPricingPolicy type. Setting the pricingPolicies field to an empty array or null also does not remove or update the existing pricing policies of the selling plan.
https://shopify.dev/tutorials/create-and-manage-discounts-on-subscriptions#update-a-discount-on-a-subscription-contract
Edit:
Sometimes it works and sometimes it breaks. When it breaks, I get this message for the following sellingPlanGroupUpdate query:
errors":[{"message":"Internal error. Looks like something went wrong on our end.\nRequest ID: 494e4f06-42b8-410c-b67e-1eca4a2cfc90 (include this in support requests)
{
"appId": "testApp",
"merchantCode": "ccc",
"name": "ccc",
"options": [
"Delivery frequency"
],
"sellingPlansToCreate": [],
"sellingPlansToUpdate": [
{
"billingPolicy": {
"recurring": {
"anchors": [],
"interval": "MONTH",
"intervalCount": 2,
"maxCycles": null,
"minCycles": null
}
},
"deliveryPolicy": {
"recurring": {
"anchors": [],
"cutoff": null,
"intent": "FULFILLMENT_BEGIN",
"interval": "MONTH",
"intervalCount": 2,
"preAnchorBehavior": "ASAP"
}
},
"description": "",
"id": "gid://shopify/SellingPlan/476840093",
"name": "ccccc",
"position": 0,
"options": [
"ccccc-0"
],
"pricingPolicies": [
{
"fixed": {
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 3
}
}
},
{
"recurring": {
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 4
},
"afterCycle": 2
}
}
]
}
],
"sellingPlansToDelete": []
}
It also breaks quite a lot when I try to update a selling plan with existing pricingPolicies to one without.