I have an admin page with a submit button for creating a new pricing plan.
- when trying to create a new pricing plan with createPlan() the following object, I get "FORBIDDEN’ error, although the user is the site owner, and although I used the objPlan from Velo reference:
const objPlan = {
“name”: “Gold”,
“description”: “Gold membership to the MyGame World of Online Gaming”,
“perks”: [
“Multiplayer”,
“Multiple devices”,
“No ads”,
“Unlimited access”
],
“pricing”: {
“price”: {
“value”: “10.00”,
“currency”: “ILS”
},
“singlePaymentUnlimited”: true
},
“public”: true,
“maxPurchasesPerBuyer”: 1,
“allowFutureStartDate”: true,
“buyerCanCancel”: true,
“termsAndConditions”: “No sharing access with others!”
}
When trying to create a plan with my plan object, for defining a monthly recurrent plan, I get the error details":**{“applicationError”:{“description”:“Bad Request”,“code”:“BAD_REQUEST”,“data”:{}}}}
const objPlan = {
“name”: planName,
“description”: “תשלום מתחדש אוטומטית”,
“perks”: ,
“pricing”: {
“price”: {
“value”: String(apartment.totalPay) + “.00”
},
“subscription”: { “cycleDuration”: 1, “count”: “MONTH” },
“cycleCount”: 0
},
“public”: true,
“maxPurchasesPerBuyer”: 1,
“allowFutureStartDate”: true,
“buyerCanCancel”: true,
“termsAndConditions”: “No sharing access with others!”
}
Does someone has any insights for me???
Thanks a lot