Hosted pages are the easiest way to integrate Chargebee with your website. For card payment methods, they help meet most of your PCI DSS compliance requirements. Chargebee offers hosted pages where your customers can perform the following actions:
- Checkout a new subscription
- Checkout changes to an existing subscription
- Update a payment method
- Make payments for all due invoices
- Extending a subscription
When you create a hosted page, it is available at a secure and unique URL. This URL can then be provided to your customer on your website or by other means such as email. On successful completion of the hosted page workflow by the customer, they are redirected to the
redirect_urlwith the hosted pageidandstatepassed as query string parameters. As soon as the redirection happens, retrieve the hosted page to get details of the customer, subscription, invoice etc.
Sample Hosted pageJSON
Hosted pages attributes
Type of the requested hosted page.
Checkout new Subscription
Checkout existing Subscription
Update Payment Method for a Customer
Manage Payments for a customer
Collect Unpaid Invoices for a Customer
To extend a Subscription period
Checkout one time
This hosted page is used to help retain customers when they attempt to cancel their account or subscription.
View Details of a voucher
Accept quote via hosted page
Unique URL for the hosted page that will be included in your website.
Indicating the current state of the hosted page resource.
Indicates the hosted page is just created.
Indicates the hosted page is requested by the website
Indicates the hosted page is successfully submitted by the user and response is sent to the return url.
Indicates the page is cancelled by the end user after requesting it.
Indicates the succeeded hosted page is acknowledged.
This attribute allows you to store custom information with the hosted_page object. You can use it to associate specific data with a hosted page session.
For example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the redirect URL's query parameters. Using this ID, you can fetch the hosted page and perform actions related to the success of the marketing campaign.
The date and time when the hosted page URL expires. After this timestamp, the page can no longer be accessed.
The expiration period depends on the type of hosted page:
- For
checkout_new,checkout_existing, andcheckout_one_time, the URL expires 3 hours after the page is created. - For
collect_nowandmanage_payment_sources, the URL expires 5 days after creation.
This attribute will be returned only during retrieve hosted page API call and also the retrieved hosted page resource state should be either in "succeeded" or "cancelled" state. If hosted page state is "succeeded", then the subscription, customer, card & invoice(optional) resources during checkout can be obtained. If hosted page is state is "cancelled", then it will be empty i.e no information about checkout.
Timestamp indicating when this hosted page was last updated.
The version number of this resource. For every change made to the resource, resource_version
is updated with a new timestamp in milliseconds.
Customer Info (email, first name and last name) given in the checkout page used for tracking abandoned carts. Learn more
The unique ID of the business entity
of this hosted_page.