HubSpot Integration Development
This guide covers developing and testing the HubSpot integration for Billy.Overview
HubSpot integration allows Billy to:- Create and manage contacts
- Create invoices and estimates
- Associate invoices with deals
- Manage billing plans and subscriptions
- Handle customer relationships
Development Setup
1. Access HubSpot Developer Account
Go to our HubSpot Developer Account to create and manage your development application.2. Create Your Development Application
-
Create New Application
- Click “Create app”
- Choose “Private app” type
- Name: “Billy - [Your Name] [Dev]”
-
Configure OAuth Settings
- Redirect URI:
https://localhost:3000/oauth/hubspot/redirect_uri
- Scopes: Configure based on your needs
- Redirect URI:
-
Get Credentials
- Copy your Client ID and Client Secret
- Note your API Key
3. Environment Configuration
Add these variables to your.env.local
:
4. Enable Application
- Login to HubSpot with your development account
- Navigate to your app in the developer portal
- Enable the application on your HubSpot account
CRM Cards Development
Setting Up CRM Cards
- Go to CRM Cards in your HubSpot app
- Select the card you want to configure
- Paste the URL in the corresponding field
- Check target types that apply to your card
- Save configuration
Available CRM Cards
- Invoice Creation: Create invoices from deals
- Estimate Management: Handle quotes and estimates
- Customer Association: Link invoices to contacts
- Billing Plans: Manage subscription billing
Testing Your Integration
Local Testing
-
Start your development server
-
Test OAuth flow
- Navigate to HubSpot integration setup
- Complete the OAuth authorization
- Verify redirect works correctly
-
Test API calls
- Create test contacts
- Generate test invoices
- Verify data synchronization
Preview Environment Setup
For testing in preview environments:-
Add environment variables to your Vercel preview branch:
HUBSPOT_PENNYLANE_CLIENT_SECRET
HUBSPOT_PENNYLANE_CLIENT_ID
-
Unprotect domain on Vercel:
- Go to Vercel Deployment Protection
- Unprotect your preview domain
- Update redirect URIs to use your preview domain
Getting Help
- Check HubSpot Developer Documentation
- Review HubSpot API Reference
- Contact the team on Slack:
#squad-billy
- Check existing HubSpot integration code for examples