For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
Hello There,
We are trying to implement the "SellingPlanRecurringPricingPolicy" while creating a subscription group but getting the error.
Here is the error: "Exactly one field must have a value per selling plan pricing policy".
Here is the code that we are using:
{
"status": false,
"payload": {
"input": {
"appId": "appId",
"name": "PRICING POLICY RECURING",
"merchantCode": "PRICING POLICY RECURING",
"options": [
"PRICING POLICY RECURING"
],
"position": 1,
"sellingPlansToCreate": [
{
"name": "Delivered Every Week",
"options": [
"1"
],
"position": 1,
"billingPolicy": {
"recurring": {
"interval": "WEEK",
"intervalCount": 1
}
},
"deliveryPolicy": {
"recurring": {
"interval": "WEEK",
"intervalCount": 1
}
},
"pricingPolicies": {
"fixed": {
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 10
}
},
"recurring": {
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 20
},
"afterCycle": 1
}
}
}
]
}
},
"message": "Exactly one field must have a value per selling plan pricing policy"
}
How can we fix this issue?
Thank you.
If you want to specify two pricing policies (which seems to be the case). You should specify the "pricingPolicies" as an array that contains boths policies (an object for your recurring one and another object, second element in the array, for your fixed policy)