“Sorry,the URL or the some of the parameters are not valid” error with Hosted Pages API

Modified on: Thu, 2 Mar, 2023 at 6:49 PM

This article covers 

Troubleshooting “Sorry, the URL or some of the parameters are not valid” error with Hosted Pages API


Solution


Below are the possible reasons for this error -


  1. 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][0]=Basic-Test-USD-Monthly' \

--data-urlencode 'subscription_items[item_price_id][1]=cbdemo_analytics-additional-users-USD-Monthly'


     This also applies when you are creating a Hosted page URL.

  1. 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.


  1. 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

Hosted Page API docs


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×