chargebee-webhooks

A guide for receiving Chargebee notifications about subscription billing and checking that they came from Chargebee. Chargebee is a service for managing recurring payments.

In plain words
What is it for?
Use it to build or debug handlers for subscription events, understand Chargebee event payloads, and process billing changes.
Why use it?
It clarifies how Chargebee sends webhook requests and how its Basic Auth credentials verify them, helping diagnose rejected or mishandled events.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hookdeck/webhook-skills/chargebee-webhooks
Any agent
npx skills add hookdeck/webhook-skills --skill chargebee-webhooks
Clone the repo
git clone --depth 1 https://github.com/hookdeck/webhook-skills

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,296 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.02296
Opus 5 $0.00016 $0.01148
Sonnet 5 $0.00007 $0.00459
Haiku 4.5 $0.00003 $0.00230

Measured 2d ago against content hash ad4415d0a72c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

chargebee-webhooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (examples/express/jest.config.js, examples/express/src/index.js, examples/express/test/webhook.test.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to adyen-webhooks — 281 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/chargebee-webhooks/SKILL.md · 242 lines

How it starts

The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chargebee Webhooks

When to Use This Skill

  • Setting up Chargebee webhook handlers
  • Debugging Basic Auth verification failures
  • Understanding Chargebee event types and payloads
  • Processing subscription billing events

Essential Code

Chargebee uses Basic Authentication for webhook verification. Here's how to implement it:

Express.js

// Verify Chargebee webhook with Basic Auth
// NOTE: Chargebee uses Basic Auth (not HMAC signatures), so raw body access
// is not required. Use express.json() for automatic JSON parsing:
app.post('/webhooks/chargebee', express.json(), (req, res) => {
  // Extract Basic Auth credentials
  const auth = req.headers.authorization;
  if (!auth || !auth.startsWith('Basic ')) {
    return res.status(401).send('Unauthorized');
  }

  // Decode and verify credentials
  const encoded = auth.substring(6);
  const decoded = Buffer.from(encoded, 'base64').toString('utf-8');
  const [username, password] = decoded.split(':');

  const expectedUsername = process.env.CHARGEBEE_WEBHOOK_USERNAME;
  const expectedPassword = process.env.CHARGEBEE_WEBHOOK_PASSWORD;

  if (username !== expectedUsername || password !== expectedPassword) {
    return res.status(401).send('Invalid credentials');
  }

  // Access the parsed JSON directly
  const event = req.body;
  console.log(`Received ${event.event_type} event:`, event.id);

  // Handle specific event types
  switch (event.event_type) {
    case 'subscription_created':
    case 'subscription_changed':
    case 'subscription_cancelled':
      // Process subscription events
      break;
    case 'payment_succeeded':
    case 'payment_failed':
      // Process payment events
      break;
  }

  res.status(200).send('OK');
});

// Note: If you later need raw body access (e.g., for HMAC signature
// verification with other providers), use express.raw():
// app.post('/webhooks/other', express.raw({ type: 'application/json' }), (req, res) => {
//   const rawBody = req.body.toString();
//   // ... verify signature using rawBody ...
// });

Read the full file on GitHub · 242 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 242 lines · 33 tokens per session scan A ad4415d0a72c

Subscribe to this mod's changes

chargebee-webhooks is a skill published in the GitHub repository hookdeck/webhook-skills (84 stars, last pushed 6d ago), licensed MIT. It adds 33 tokens to every session and 2,296 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to adyen-webhooks, differing in 281 lines, and is treated as a copy.

Related

Other skills, from other repositories

startup-ceo

CEO coordinator that dispatches research, strategy, finance, and writer specialists via A2A and synthesizes their findings into a GO/NO-GO investment briefing. Use for multi-agent advisory workflows.

Atmosphere/atmosphere · 44 tokens

finance-agent

Financial analyst for startup economics — TAM/SAM/SOM, revenue projections, burn rate, runway, and break-even. Use when building financial models or evaluating investment cases.

Atmosphere/atmosphere · 37 tokens

billing-agent

Billing specialist for invoices, payments, refunds, and plan changes. Use when customers ask about charges, billing inquiries, or subscription management; typically reached via handoff from the support agent.

Atmosphere/atmosphere · 40 tokens

memstack-business-invoice-generator

Use this skill when the user says 'invoice', 'generate invoice', 'create invoice', 'bill client', 'line items', 'payment terms', or needs professional invoices with tax calculations and payment instructions. Do NOT use for contracts or financial projections.

cwinvestments/memstack · 57 tokens

memstack-business-financial-model

Use this skill when the user says 'financial model', 'projections', 'revenue forecast', 'unit economics', 'break-even', 'cash flow', or mentions MRR, churn, CAC, LTV, or runway. Builds monthly projections with scenario modeling. Do NOT use for pricing strategy or invoice generation.

cwinvestments/memstack · 71 tokens

memstack-business-freelancer-toolkit

Use when the user says 'track my time', 'freelancer invoice', 'billable hours', 'time tracking', 'freelance finances', 'client billing', 'project hours', or needs invoicing, time tracking, or analytics patterns for freelance work. Do NOT use for general invoice templates or proposal writing.

cwinvestments/memstack · 75 tokens