New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model Context Protocol)

Developer Resources


  • Developer Resources Overview
  • Articles and FAQ

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Entitlements


  • Entitlements Overview
  • Features Overview
  • Feature Management
  • Managing Product Entitlements
  • Subscription Entitlements
  • Customer Entitlements
  • Grandfathering Entitlements
  • Articles and FAQ

Usage Based Billing


  • Understanding Usages
  • Setting up Usage Based Billing
  • Usage Alerts
  • Metered Billing
  • Articles and FAQ

Chargebee CPQ


  • Chargebee CPQ
  • Chargebee CPQ for Salesforce
  • Chargebee CPQ for HubSpot

Invoices, Credit Notes, and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
    • Integration Options
      • Embedded Checkout
    • Features
    • Configuring Checkout
    • Configuring Fields and Labels
    • Checkout Layout - Feature Comparison
    • FAQ
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Pricing Table
  • Managing Payments with Chargebee.js
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Approvals
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Multi Business Entity


  • Multi Business Entity Overview
  • Customer Transfer Overview
  • Articles and FAQ

Mobile Subscriptions


  • Overview
  • Omnichannel Subscriptions
  • Omnichannel One-Time Orders
  • Mobile Subscriptions (Legacy)

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Ecommerce Management
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Hosted Capabilities
  3. Hosted Checkout
  4. Integration Options
  5. Embedded Checkout
  1. Billing
  2. Hosted Capabilities
  3. Hosted Checkout
  4. Integration Options
  5. Embedded Checkout

Embedded Checkout

Chargebee offers multiple options to integrate its hosted checkout, such as Drop-in script, Hosted Pages API, or Payment Link. These integration options allow you to use the checkout in your web application either as a standalone page or as an overlay. The embedded checkout feature allows you to embed the Chargebee hosted checkout within your web pages as an iframe. Embedded checkout provides a better integration experience compared to relying on a standalone page setup.

Information

Chargebee supports embedding checkout only with the full-page layout.

Prerequisite

Ensure you enable and configure full-page layout in your Chargebee site. Configure your checkout settings, styling, and customization to suit your brand.

How does embedding checkout work?

Embedding a hosted checkout involves two steps:

  1. Integrating Checkout
  2. Embedding Checkout

Let's dive deeper into these steps:

Step 1: Integrating Checkout

Before you embed the full-page checkout, decide how you want to integrate the checkout option that will display on your web page. Based on the customer's use case, choose one of the following options:

  • Via Drop-in script: Generate and copy the drop-in script from the Chargebee app and add the script to your HTML webpage. This takes care of creating a cart and the associated checkout flow. Learn more about Drop-in script integration.
  • Via payment link: Use the Integrate with Chargebee wizard to generate reusable payment links from the Chargebee app. Learn more about payment link integration.
  • Via Hosted Pages API: Deploy a cloud solution that uses an API endpoint to make server-to-server API calls to Chargebee, obtain the hosted page, and pass the hosted page URL to the web app via APIs. This mode of integration gives you control to override the predefined configuration for a particular checkout session. Learn more about Hosted Pages API integration.

Step 2: Embedding Checkout

Depending on your mode of checkout integration, you would either have a cart object prepared (Drop-in integration) or a hosted page URL (payment link URL or hosted page URL obtained via API).

Embedding checkout involves the following steps:

  1. Create an HTML container: Once you have prepared your checkout session, create an HTML widget space to contain the checkout form. Style and size it appropriately to allocate sufficient screen real estate for checkout.
  2. Mount the checkout in the HTML container: Once the container is ready, mount the checkout within the designated placeholder element. Incorporate the checkout using methods tailored to the specific integration modes.
  3. Resize the checkout iframe: Ensure the iframe containing your embedded checkout page dynamically resizes to fit its content. Use the resize callback function to automatically adjust the iframe height based on interactions within the checkout page.

Learn more about creating an HTML container, mounting the checkout, and resizing the embedded checkout.

Manage the embedded checkout via callbacks

Callbacks are functions that trigger additional actions following specific events within the checkout flow. By using callbacks, you can incorporate supplementary functions, customize event triggers, and gain precise control over navigation and transitions. This flexibility extends to error handling and cross-platform compatibility, ensuring a consistent checkout experience.

Learn more about callback functions.

Redirection

By default, when you provide a redirect URL for a plan in the Chargebee app, you are redirected to the set web page. For better redirection handling within your application, use the success callback function. Callbacks allow you to have better control over redirection.

Articles & FAQs

Setting up Fixed increments on Checkout page.

Was this article helpful?