This article also covers
How to close the checkout page when opened in a new tab?
What is the plan URL syntax that could be shared with my customers to checkout?
What is the syntax for accessing the link to the customer portal?
Item-specific hosted page URL for one-time charges in PC 1.0.
Note: If you are using PC 2.0, refer this article to create the checkout URL.
You can manually generate a plan-specific checkout URL and embed this on your website. On click, customers would be directly taken to a checkout page in a new tab where they would be able to enter their payment information.
Here’s the syntax for generating the plan-specific checkout page URL
With the hosted page URL, you can pass additional customer and subscription information during sign up. These details need to be passed on to the hosted page URL while redirecting users to the hosted checkout page.
Here’s the syntax for generating the one-time checkout page URL
One time checkout is different from the normal checkout and so normal hosted page URLs cannot be used for one time charges by simply changing the items in the URL.
The correct format for creating the URL for one time charges is the below.
Here, you need to replace <your-domain> with your chargebee domain name and the <addon_id> with the id of the item that you want to create the checkout for.
Here’s the syntax to specify plan quantity during sign up
NOTE: This applies only for plans with unit-based pricing model (Stairstep, Volume, Tiered)
Here’s the syntax to include addon during signup
NOTE: "[quantity]=number" is optional and can be used for quantity based addons.
Adding multiple parameters
Account information, billing address & shipping address ‘First name’, ‘Last name’, and other customer details can be prefilled whereas Card information cannot be prefilled as it needs to be updated using the token from the payment gateway.
Please refer to this link to know more.
To pass multiple parameters (whether it is subscription ID, plan quantity, addons or coupons) to the plan specific hosted page URL when creating a subscription, use an "&" symbol to separate parameters.
To illustrate, here is a sample URL for creating a subscription that includes subscription ID, plan quantity, addon with quantity and a coupon with each parameter separated by an "&" symbol:
https://yoursitename.chargebee.com/hosted_pages/plans/ ?subscription[id]= &subscription[plan_quantity]=2&addons[id]= &addons[quantity]=2&subscription[coupon]=coupon-name
Sample URL with the first name
Completing the checkout process- Closing the session
Since the Checkout page is generated using a URL in a new tab, the only way to close the checkout page is by closing the browser tab.
If you have any questions regarding this, please reach out to us at email@example.com.