In this article we will explain how you can use the URL parameters to control what your end user sees on the hosted checkout page.
Lets take an example to explore this.
Example:
You have setup a bundle of two products and require your customers to go on a hosted page where they can purchase both products in a single checkout. You want to specify the quantities of the products as well. Lastly, you want the end user to be redirected to your own website after they checkout.
Your custom URL will be:
https://abc.subscriptionflow.com/en/hosted-page/commerceflow?items[0][pr]=2e593a6e-3920-4a1f-adda-35c9626dc381&items[0][pl]=4e3bcec1-49ea-4bf5-a2ac-ddbd5345e7bc&items[0][q]=3&items[1][pr]=db2ce8cf-3dfd-4128-923b-55c63347fb8a&items[1][pl]=6446f4a7-0056-479f-991b-26c3cbf4d29d&items[1][q]=4&items[2][pr]=e911569a-7e24-4e52-8b3f-b14446a29378&items[2][pl]=2ce4eff1-8c45-4e48-a662-9ff954ed0f3a&items[2][q]=2&cart=http://store.abc.com
Let's break this down in order to understand all the parts of the URL:
1. https://abc.subscriptionflow.com/en/hosted-page/commerceflow?
This is the first part of the URL. It the link to your account of SubscriptionFlow calling a hosted payment page of CommerceFlow. CommerceFlow is an integrated application of SubscriptionFlow which offers you a cart like experience on the hosted page.
2. ?items[0][pr]=2e593a6e-3920-4a1f-adda-35c9626dc381&items[0][pl]=4e3bcec1-49ea-4bf5-a2ac-ddbd5345e7bc&items[0][q]=3
This is the second part of the URL. In this you can see the parameters for the associated product, plan and its quantity. Let's break it down a little further:
?items[0][pr]=2e593a6e-3920-4a1f-adda-35c9626dc381
where items [0][pr] = Product ID
this refers to the first product
&items[0][pl]=4e3bcec1-49ea-4bf5-a2ac-ddbd5345e7bc
where items [0][pl] = Plan ID
this refers to the specific plan of the selected product
&items[0][q]=3
where items[0][q]= Quantity
Similarly, if you look further at the second part of the URL you can see that two more items are added to the checkout page with their respective quantities.
&items[1][pr]=db2ce8cf-3dfd-4128-923b-55c63347fb8a&items[1][pl]=6446f4a7-0056-479f-991b-26c3cbf4d29d&items[1][q]=4&items[2][pr]=e911569a-7e24-4e52-8b3f-b14446a29378&items[2][pl]=2ce4eff1-8c45-4e48-a662-9ff954ed0f3a&items[2][q]=2
3. &cart=http://store.abc.com
This is the last part of the URL which redirects the end user to your own website.
&cart= Your website link or redirect link
Using this logic you can create your own custom checkout URLs.
Comments
0 comments
Please sign in to leave a comment.