C
ChurnRecovery
Get started free
🔶

ChurnRecovery + Chargebee

Chargebee is a subscription management platform that thousands of B2B SaaS companies rely on. ChurnRecovery integrates natively with Chargebee's event system and subscription APIs.

Setup time
30 minutes
Difficulty
Easy
Avg save rate
25%
Price
Free

Overview

Chargebee is much more than a payment processor — it's a full subscription lifecycle platform with invoicing, dunning, revenue recognition, and more. ChurnRecovery sits alongside Chargebee to add the cancel flow and retention layer that Chargebee doesn't offer natively.

Our Chargebee integration hooks into Chargebee's robust webhook system to catch subscription cancellations and payment failures at exactly the right moment. We use Chargebee's own API to apply discounts, change plans, and pause subscriptions — keeping your subscription data in sync.

What's included

  • Native Chargebee event webhook support
  • Cancel flow via Chargebee subscription events
  • Coupon and discount application through Chargebee API
  • Plan downgrade instead of cancel
  • Chargebee Retention (formerly Brightback) replacement
  • Failed payment dunning sequences
  • Revenue recognition-safe operations

Use cases

Replace Chargebee Retention

Drop-in replacement for Chargebee Retention at $0 vs $400+/mo

B2B Cancel Flow

Enterprise-friendly cancel flows with account manager escalation option

Coupon-Based Saves

Automatically apply Chargebee coupons to at-risk customers

Annual Plan Upsell

Offer annual plan discount to monthly subscribers who try to cancel

Code examples

Real code for your Chargebee integration. Copy and customize.

Installbash
npm install @churnrecovery/chargebee
Initializejavascript
import ChurnRecovery from '@churnrecovery/chargebee'

const cr = new ChurnRecovery({
  apiKey: process.env.CHURNRECOVERY_API_KEY,
  chargebee: {
    site: process.env.CHARGEBEE_SITE,
    apiKey: process.env.CHARGEBEE_API_KEY,
  }
})
Handle Chargebee webhookjavascript
// pages/api/chargebee-webhook.js
export default async function handler(req, res) {
  const event = req.body
  
  if (event.event_type === 'subscription_cancellation_scheduled') {
    await cr.handleCancellation({
      subscriptionId: event.content.subscription.id,
      customerId: event.content.customer.id,
    })
  }
  
  if (event.event_type === 'payment_failed') {
    await cr.handleFailedPayment({
      subscriptionId: event.content.subscription.id,
    })
  }
  
  res.json({ received: true })
}

Setup checklist

  1. 1Install @churnrecovery/chargebee via npm
  2. 2Add Chargebee site name and API key to ChurnRecovery
  3. 3Configure webhook endpoint in Chargebee → Settings → Webhooks
  4. 4Select subscription_cancellation_scheduled and payment_failed events
  5. 5Test in Chargebee test environment
🚀

Ready to get started?

Free forever. No credit card. Set up in 30 minutes.

Get early access →

Stop losing customers you could keep

Most SaaS companies recover 20–30% of would-be churners with cancel flows. ChurnRecovery makes this free for Chargebee users.

Get early access — it's free