Scope
Error ‘Plan item price must be present to create the subscription’ while creating a subscription for items via API in PC 2.0
I am getting an error ‘ChargeBee_InvalidRequestException, day-pass-USD not found’
Summary
This error normally occurs for several reasons
If the provided Plan was not available on your site
If the Price point ID was not created for the mentioned term
If the Price point ID was not created for the currency specified
If the Plan is ‘Unit based’ the quantity was not mentioned
If you are using PC 2.0 and referring to PC 1.0 document, then you might be facing the same issue.
Note: In your TEST site you will have default plans which will not be available on your LIVE site. Please validate that you are using the right plan price point ID.
Solution
Please navigate from Product Catalog > Plans > Price Point i.e, monthly/yearly/daily and check you have used the correct Plan Price point ID.
Here you will the Plan price point ID
You can also use List item Prices API to list all the price point IDs from the specific Product Family.
Related Articles
How to list more than 10 items when listing information via API?