Docschargebeedocs

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
    • Features
      • Customize the Checkout Layout
      • Returning user management
      • Checkout One-Time Payments
      • Checkout Without Payment Details
      • Single step checkout
      • Skip cart
      • Recover Abandoned Carts
    • 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. Features
  5. Checkout One-Time Payments
  1. Billing
  2. Hosted Capabilities
  3. Hosted Checkout
  4. Features
  5. Checkout One-Time Payments

Checkout One-Time Payments

Use Chargebee to collect one-time payments from customers without creating a subscription.

This feature works well if your business provides:

  • One-time services
  • One-time services with subscription services
  • Additional services or products for a limited time
  • One-time payment checkout works only with charges, ad hoc charges, and coupons. It does not work with plans or addons.
  • You can add ad hoc charges only through the Hosted Pages API.

Prerequisites

Set up charges and coupons (as needed) in your Chargebee site.

Configure one-time payments

To enable checkout for one-time payments:

  1. Sign in to your Chargebee site.
  2. Go to Settings > Configure Chargebee > Checkout & Self Serve Portal.
  3. Select the Configuration tab, then select One time payments.
  4. Select Enable.
One-time payments configuration page

The following table describes the configuration settings for one-time payments:

SettingDescription
Allow customers to access checkout via API only

Clear this option to let customers access checkout through the Drop-in script or Checkout URL.

Allow customers to add/remove coupons

Select this option to display coupons that customers can select or remove.

Allow customers to add multiple coupons

Select this option to let customers add multiple coupons.

Allow customers to remove products

Select this option to let customers remove products during checkout.

Save customer's payment method

Choose from these options:

  • Always: Always store the customer's payment method without consent.
  • Never: Do not store the customer's payment method.
  • Ask for customer's permission: Store the payment method only with customer consent.
Add a redirect URL

Enter the URL where customers go after successful checkout, such as a thank you page or home page.

The following screenshot shows how one-time payments appear in the checkout:

One-time payments checkout example

Integrate checkout one-time payments

Integrating checkout for one-time payments is similar to integrating checkout to your website or application, with a different format.

Use checkout URL

Use the following checkout URL format for one-time payments. Replace the site name and parameter values, then embed the URL directly in your website or application.

http://{your-Chargebee-site}.chargebee.com/hosted_pages/checkout?item_prices[item_price_id][0]=flat-price&item_prices[date_from][0]=1606724073&item_prices[date_to][0]=1612051200&item_prices[item_price_id][1]=per_unit-price&item_prices[quantity][1]=1&item_prices[date_from][1]=1606724073&item_prices[date_to][1]=1612051200&item_prices[item_price_id][2]=volume-price&item_prices[quantity][2]=2&item_prices[date_from][2]=1606724073&item_prices[date_to][2]=1612051200&item_prices[item_price_id][3]=stair-price&item_prices[quantity][3]=3&item_prices[date_from][3]=1606724073&item_prices[date_to][3]=1612051200&item_prices[item_price_id][4]=tiered-price&item_prices[quantity][4]=4&item_prices[date_from][4]=1606724073&item_prices[date_to][4]=1612051200&coupon_ids[0]=new_year_off&coupon_ids[1]=day_pass

To learn more about checkout URL integration, see Checkout integration.

Use drop-in script

Use the following drop-in script format for one-time payments. Replace the site name and parameter values, then embed the script directly in your website or application.

To learn more about drop-in script integration, see Checkout integration.

The amount attribute is not supported. The price is automatically retrieved.

<!DOCTYPE html>
<html>
<head>
    <title>Page Title</title>
    <script
            src="https://js.chargebee.com/v2/chargebee.js"
            data-cb-site="site-name"
    ></script>
</head>
<body>
<a
        href="javascript:void(0)"
        data-cb-type="checkout"
        data-cb-addons_id_0="non-recurring-addon"
>subscribe</a>
<script>
      document.addEventListener("DOMContentLoaded", function () {
        const cbInstance = Chargebee.getInstance();
        const link = document.querySelectorAll("[data-cb-type=checkout]")[0];
        var product = cbInstance.getProduct(link);
        // product.addCoupon("cbdemo_specialoffer");
      });
    </script>
</body>
</html>

Use Hosted Pages API

Use the Checkout one-time payments API to pass values for charges, ad hoc charges, and coupons. The API returns the checkout window.

Unsupported features

The following features are not currently supported in checkout for one-time payments:

  • Cart abandonment
  • Offline payment methods
  • Checkout without payments
  • Account hierarchy

Was this article helpful?