This article covers
Troubleshooting “Sorry, the URL or some of the parameters are not valid” error with Hosted Pages API
Below are the possible reasons for this error -
You are not passing the parameters in the right order. For example, if you are using the “Checkout existing for items” API and are passing the ID of the addon item price before the plan, you can get the error.
You need to ensure that the plan’s item price ID is passed before that of the addon. Sample call here -
curl --location --request POST 'https://test2gopi-test.chargebee.com/api/v2/hosted_pages/checkout_existing_for_items' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxx==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'subscription[id]=6olPHTPMkMAY30w' \
--data-urlencode 'subscription_items[item_price_id]=Basic-Test-USD-Monthly' \
This also applies when you are creating a Hosted page URL.
If you are passing item price IDs of more than 1 plan that is you are trying to check out 2 plans at the same time using the API.
If the syntax for the API call is wrong. We recommend following the syntax in the sample code on our Hosted Page API docs for your reference. You can contact support in case you need more assistance on this.
Note: Every plan details page in PC 2.0 has a dynamic payment URL on each price point page, making it incredibly simple for you to share a payment link. Navigate from the Product Catalog > Plans index page > Plan details page > Customer-Facing Info > Get Payment Link. Click here for more details.
Related articles and Documentation