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

Product Updates


  • Release Notes

Payment Methods


  • Payment Methods Overview
  • Cards
  • Direct Debit
  • Bank Based Payments
  • Wallets
  • Vouchers
  • Articles and FAQ

Payment Gateways and Configuration


  • Payment Gateways Overview
  • Chargebee Test Gateway
  • Stripe
  • PayPal Payment Services
  • Chargebee Pay
  • Adyen
  • Authorize.net
  • Bambora (formerly Beanstream)
  • Bank of America
  • BluePay
  • BlueSnap
  • Braintree
  • Checkout.com
  • CyberSource
  • dLocal
  • EBANX
  • Ecentric
  • Elavon
  • E-xact Direct Integration
  • eWay Rapid
  • Global Payments
  • GoCardless
  • J.P. Morgan Mobility Payment Solutions
  • Metrics Global
  • Mollie
  • Moneris
  • Network Merchants Incorporated (NMI)
  • Nuvei
  • Orbital (Chase Paymentech)
  • Pay.com
  • Paymill
  • Paystack
  • Pin Payments
  • QuickBooks Payments
  • Razorpay
  • Sage Pay
  • Solidgate
  • Twikey
  • Windcave
  • Worldline Online Payments(formerly Ingenico)
  • Worldpay
  • Articles and FAQ

Level 2/3 Data Support


  • Level 2/3 Data Support

Advanced Routing


  • Advanced Routing

Dunning


  • Dunning
  • Articles and FAQ

Offline Checkout


  • Offline Checkout
  • Articles and FAQ

Transaction Sync & Invoice Mapping


  • Transaction Sync and Invoice Mapping

Fraud Management


  • Fraud Management

Error Handling


  • Errors with Root Cause and Troubleshooting

Payment Lifecycle Logs


  • Payment Intents
  • Transactions
  • Gateway Activity Logs
  • Gateway Webhook Logs
  • Articles and FAQ

Others


  • Reach (Merchant of Record)
  • Payment Verification
  • Bulk Deletion of Payment Methods
  • Custom Payment Methods
  • Payment Initiator Parameter
  • PSD2 and Strong Customer Authentication
  • RBI e-Mandate
  • RBI Tokenization Regulations
  • Chargeback Management
  • Transaction Descriptors
  • Payment Preferences
  • Visa Trial Rules
  • Mastercard Trial Rules
  • Co-badged Card Compliance
  • Articles and FAQ
  1. Payments
  2. Payment Methods
  3. Checkout One Time Payments
  1. Payments
  2. Payment Methods
  3. Checkout One Time Payments

Checkout one-time payments

Chargebee also supports collecting one-time payments from the customer without creating a subscription for them.

This feature can be useful if you are running a business that provides:

  • One-time services
  • One-time services along with subscription services
  • Additional services or products for a limited time

Warning

To enable one-time payments for your Chargebee site, contact support.

Note

  • One-time payment checkout can be used only with non-recurring add-ons, ad hoc charges, and coupons. It does not work when a plan or recurring add-on is included.
  • Quick charges can be added only using the Hosted Pages API.

Prerequisites

  • Non-recurring add-ons and coupons (if necessary) need to be set up in your Chargebee site.

Configuration

To enable checkout for one-time payments, go to Settings > Configure Chargebee > Checkout & Self-Serve Portal > One-Time Payments > Enable.

Here's a sample of the configuration page for one-time payments.

image

The configuration settings for one-time payments are listed in this table.

 Setting

 Function

 Allow customers to access checkout via API only

 Disable this if you need customers to access checkout integrated through Drop-in script or Checkout URL.

 Allow customers to add/remove coupons

 Enable to display coupons for the customers to select or remove added coupons.

 Allow customers to add multiple coupons

 Enable to allow customers to add multiple coupons. 

 Allow customers to remove products

Enable to allow customers to remove any of the products during checkout.

 

 Save customer's payment method

There are three further settings,

  • Always - Stores the customer's payment method details always without their consent.

  • Never - Does not store the customer's payment method details.

  • Ask for Customer's permission

    • Stores the customer's payment method details only if they agree.  

 Add a redirect URL

Enter the URL to which customers should be redirected on successful checkout. It could be a thank you page, home page, etc.

Here's a sample of how it is displayed in In-app Checkout.

image

Integrating Checkout One-time Payments

Integrating Checkout for One-time Payments is similar to integrating In-app Checkout to your website or application. Only change being the format.

Using Checkout URL

Given below is the Checkout URL format for One-time Payments. Replace the site name, parameter values and embed it directly in your website or application.

To know more on how to integrate Checkout URL, take a look at this page.

http://site-name.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

Using Drop-in Script

Given below is the Drop-in script format for One-time Payments. Replace the site name with your site name, parameter values and embed it directly in your website or application.

Learn more about Drop-in Script integration.

Note

Amount attribute is not supported here. 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>

Using Hosted Pages API

Use Checkout one-time payments API to pass the values of non-recurring addons, quick charges and coupons. This in turn returns the In-app Checkout window.

The below features are not currently supported in Checkout for One-Time Payments:

  • Cart Abandonment
  • Offline Payment method
  • Checkout without payments
  • Account Hierarchy

Was this article helpful?