Skip to main content
Back to Blog
How Tos & TutorialsDecember 23, 2024

Admin Guide: Integrations & Billing Setup

Set up Mailchimp, HubSpot, Slack, Discord, booking calendars, and manage your subscription. Complete guide to all integrations and billing.

LaunchKit Team

Building tools for makers

LaunchKit Integrations and Billing Guide

This guide covers all external integrations and billing management. Learn how to connect your CRM to email marketing tools, get notifications in Slack/Discord, set up booking calendars, and manage your subscription.

What you'll learn:

  • Setting up Mailchimp integration
  • Setting up ConvertKit integration
  • Setting up HubSpot integration
  • Setting up Slack notifications
  • Setting up Discord notifications
  • Configuring booking calendars (Cal.com/Calendly)
  • Managing your subscription and billing
  • Understanding webhook integrations

Email Marketing Integrations

When a lead is captured, it can automatically sync to your email marketing platform. Here's how to set up each one:

Setting Up Mailchimp

Automatically add leads to your Mailchimp audience.

Step 1: Get Your API Key

  1. Log in to Mailchimp
  2. Go to Profile → Extras → API keys
  3. Create a new API key
  4. Copy the key (you won't see it again)

Step 2: Find Your Server Prefix

Look at your API key. It ends with something like -us21 or -us14. The part after the dash is your server prefix.

API Key: abc123def456-us21
Server Prefix: us21

Step 3: Get Your Audience ID

  1. In Mailchimp, go to Audience → All contacts
  2. Click Settings → Audience name and defaults
  3. Find Audience ID (looks like abc123def4)

Step 4: Add Environment Variables

Add these to your hosting platform (Vercel, etc.):

MAILCHIMP_API_KEY=your-api-key-here
MAILCHIMP_SERVER_PREFIX=us21
MAILCHIMP_AUDIENCE_ID=abc123def4

Step 5: Test It

  1. Submit a test lead on your site
  2. Check your Mailchimp audience for the new contact
  3. Tags from the lead will sync to Mailchimp tags

Setting Up ConvertKit

Automatically subscribe leads to a ConvertKit form.

Step 1: Get Your API Key

  1. Log in to ConvertKit
  2. Go to Settings → Advanced → API
  3. Copy your API Key

Step 2: Get Your Form ID

  1. Go to Landing Pages & Forms
  2. Click on the form you want leads to subscribe to
  3. The Form ID is in the URL: convertkit.com/forms/1234567/edit 1234567

Step 3: Add Environment Variables

CONVERTKIT_API_KEY=your-api-key-here
CONVERTKIT_FORM_ID=1234567

What Gets Synced

  • Email address
  • Custom fields: source, persona, phone, company

Setting Up HubSpot

Sync leads to HubSpot CRM as contacts.

Step 1: Create a Private App

  1. Log in to HubSpot
  2. Go to Settings → Integrations → Private Apps
  3. Create a private app
  4. Name it something like "LaunchKit Integration"
  5. Under Scopes, enable:
    • crm.objects.contacts.read
    • crm.objects.contacts.write
  6. Create app and copy the access token

Step 2: Add Environment Variable

HUBSPOT_PRIVATE_APP_TOKEN=pat-na1-xxxxx-xxxxx

What Gets Synced

  • Email (as contact identifier)
  • Lifecycle stage: subscriber
  • Job title: persona
  • Phone, company, lead source, description (message)

Note: If a contact already exists in HubSpot, their record is updated (not duplicated).

Setting Up Slack Notifications

Get notified in Slack whenever a new lead is captured.

Step 1: Create a Slack Webhook

  1. Go to api.slack.com/apps
  2. Create New App → From scratch
  3. Name it and select your workspace
  4. Go to Incoming Webhooks → Enable it
  5. Add New Webhook to Workspace
  6. Select the channel for notifications
  7. Copy the Webhook URL

Step 2: Add Environment Variable

LEAD_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXX

What You'll See

Each new lead triggers a Slack message with:

  • Email address
  • Source, company, phone
  • Tags and persona
  • Message (if provided)

Setting Up Discord Notifications

Get notified in Discord whenever a new lead is captured.

Step 1: Create a Discord Webhook

  1. Open your Discord server
  2. Go to Server Settings → Integrations → Webhooks
  3. New Webhook
  4. Name it (e.g., "Lead Notifications")
  5. Select the channel
  6. Copy Webhook URL

Step 2: Add Environment Variable

LEAD_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/123456789/abcdefg

Setting Up Custom Webhooks

Send lead data to any custom endpoint (Zapier, Make, n8n, your own API).

Add Environment Variable

LEAD_WEBHOOK_URL=https://hooks.zapier.com/hooks/catch/123456/abcdef

Payload Format

The webhook sends a POST request with this JSON body:

{
  "type": "lead.created",
  "lead": {
    "email": "john@example.com",
    "source": "homepage",
    "tags": ["saas", "founder"],
    "persona": "Early-stage founder",
    "phone": "+1234567890",
    "message": "Interested in demo",
    "company": "Acme Inc"
  }
}

Setting Up Booking (Cal.com / Calendly)

Embed a scheduling calendar and automatically track bookings in your CRM.

Step 1: Set Up Your Booking Page

  1. Create an account on Cal.com or Calendly
  2. Create an event type (e.g., "30-min Discovery Call")
  3. Copy your booking page URL

Step 2: Add Booking URL

NEXT_PUBLIC_BOOKING_URL=https://cal.com/yourname/30min

This embeds the calendar on your /book page.

Step 3: Set Up Booking Webhook (Optional)

To automatically track bookings in your CRM:

For Cal.com:

  1. Go to Settings → Developer → Webhooks
  2. Add webhook
  3. URL: https://yourdomain.com/api/booking
  4. Event: BOOKING_CREATED
  5. Enable the webhook

For Calendly:

  1. Go to Integrations → Webhooks
  2. Create webhook subscription
  3. URL: https://yourdomain.com/api/booking
  4. Events: invitee.created

Step 4: Secure the Webhook (Recommended)

Add a secret to verify webhook authenticity:

BOOKING_WEBHOOK_SECRET=your-secret-key

For HMAC signature verification (Cal.com):

BOOKING_WEBHOOK_HMAC_SECRET=your-hmac-secret

Step 5: Auto-Update Lead Stage (Optional)

Automatically move leads to a specific stage when they book:

LEAD_BOOKING_STAGE=booked

Managing Your Subscription

Here's how to manage your plan, payment method, and invoices.

Accessing Billing

  1. Log in to your dashboard
  2. Click your account menu (top-right)
  3. Click "Billing" or "Manage Subscription"
  4. This opens the Stripe Customer Portal

In the Customer Portal You Can:

  • Update payment method — Add a new card or change the default
  • View invoices — Download PDF receipts for accounting
  • Change plan — Upgrade or downgrade your subscription
  • Cancel subscription — Cancel with immediate or end-of-period effect
  • Update billing email — Change where invoices are sent

Upgrading Your Plan

  1. Open the Customer Portal (steps above)
  2. Click "Update plan"
  3. Select your new plan
  4. Confirm the change
  5. Pro-rated billing — You only pay the difference for the current period

Canceling Your Subscription

  1. Open the Customer Portal
  2. Click "Cancel plan"
  3. Choose:
    • Cancel immediately — Lose access now
    • Cancel at end of period — Keep access until current billing period ends
  4. Confirm cancellation

Failed Payments

If a payment fails:

  • You'll receive an email notification
  • Stripe will retry the payment automatically
  • Update your card in the Customer Portal to resolve
  • If unresolved, your subscription may be canceled

Integration Troubleshooting

"Leads aren't syncing to Mailchimp"

  • Verify all three env vars are set: MAILCHIMP_API_KEY, MAILCHIMP_SERVER_PREFIX, MAILCHIMP_AUDIENCE_ID
  • Check that your API key hasn't been revoked
  • Make sure the audience ID is correct (not audience name)

"Slack/Discord notifications not working"

  • Make sure the webhook URL is correct and complete
  • Verify the webhook hasn't been deleted in Slack/Discord
  • Check that the channel still exists

"Booking webhook not updating leads"

  • Verify webhook URL: https://yourdomain.com/api/booking
  • Check that HTTPS is working (webhooks require SSL)
  • If using HMAC, verify the secret matches exactly
  • Check your booking provider's webhook logs for errors

"Can't access billing portal"

  • Make sure you're logged in
  • You need an active or past subscription to access the portal
  • Try logging out and back in

Environment Variables Quick Reference

Here's a complete list of integration-related environment variables:

# Mailchimp
MAILCHIMP_API_KEY=xxx
MAILCHIMP_SERVER_PREFIX=us21
MAILCHIMP_AUDIENCE_ID=xxx

# ConvertKit
CONVERTKIT_API_KEY=xxx
CONVERTKIT_FORM_ID=123456

# HubSpot
HUBSPOT_PRIVATE_APP_TOKEN=pat-xxx

# Slack
LEAD_SLACK_WEBHOOK_URL=https://hooks.slack.com/...

# Discord
LEAD_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

# Custom Webhook
LEAD_WEBHOOK_URL=https://your-endpoint.com/webhook

# Booking
NEXT_PUBLIC_BOOKING_URL=https://cal.com/yourname/30min
BOOKING_WEBHOOK_SECRET=your-secret
BOOKING_WEBHOOK_HMAC_SECRET=your-hmac-secret
LEAD_BOOKING_STAGE=booked

Best Practices

  • Start with one integration — Get it working before adding more
  • Test with a fake email — Verify data flows correctly
  • Use webhooks sparingly — Each adds latency to lead capture
  • Monitor for failures — Check integration dashboards periodically
  • Keep secrets secure — Never commit them to git or share publicly
  • Use HMAC for booking webhooks — Prevents unauthorized requests

Ready to ship faster?

LaunchKit gives you auth, payments, CRM, and everything you need to launch your SaaS in days, not months.

Get LaunchKit

Written by

LaunchKit Team

We're a small team passionate about helping developers and entrepreneurs ship products faster. LaunchKit is our contribution to the maker community.

Related Articles