Skip to main content

Chargebee Integration

Connect your Chargebee account to Windback via the custom webhook endpoint to automatically detect cancellations, failed payments, and successful recoveries.
Chargebee does not have a native Windback integration. This guide uses a lightweight Node.js relay function that receives Chargebee webhooks and forwards them to Windback’s custom webhook endpoint.

Webhook URL

Your Windback custom webhook URL is:
Your public key starts with pub_ and is found in Settings > API Keys.

Setup

1

Deploy the Relay Function

Deploy the Node.js relay function below to your server or a serverless platform (Vercel, AWS Lambda, etc.). This function receives Chargebee webhooks, maps the payload, and forwards it to Windback.
2

Add the Webhook in Chargebee

  1. Go to Chargebee Dashboard > Settings > Configure Chargebee > Webhooks
  2. Click Add Webhook
  3. Paste the URL of your deployed relay function
  4. Select the events listed below
  5. Click Create
Use a Chargebee test site during development to avoid affecting production subscriptions.
3

Select Webhook Events

Enable the following events in Chargebee:
4

Verify the Connection

  1. Trigger a test event from Chargebee’s webhook settings page
  2. Check your relay function logs to confirm it forwarded the event
  3. Check your Windback dashboard for the new churn event

Data Mapping

The relay function maps Chargebee fields to Windback’s custom webhook format:

Relay Function

Replace pub_your_key with your actual Windback public key. Never commit your real key to version control.

Webhook Resilience

Windback’s custom webhook endpoint always returns HTTP 200 regardless of internal processing status. Your relay function should also always return 200 to Chargebee to prevent webhook retries and eventual deactivation.
Chargebee supports webhook signature verification via the X-Chargebee-Webhook-Api-Key header. We recommend validating this in your relay function before forwarding to Windback. See Chargebee’s webhook docs for details.