The build
A good Stripe HubSpot integration puts billing truth on the CRM record: customer status, MRR, plan, trial end date, failed payments and churn date. Use HubSpot's native Stripe tools if you collect payments through HubSpot. If you bill in Stripe directly, subscribe to six Stripe webhook events and write the current subscription state to the company.
At a lot of companies, billing data lives in one place and sales data in another. The account executive doesn't know the customer's card failed last week. The CS lead finds out about churn from the finance report. Marketing sends an upgrade email to someone who downgraded on Monday.
Billing data is the most honest signal you have. People lie on forms. They don't lie on invoices. This playbook covers what sales and marketing need from billing, native sync versus webhooks versus reverse ETL, the events to subscribe to, matching customers to records, a full handler with signature checks and idempotency, MRR math, the plays to trigger, no-code builds, testing, backfill and reconciliation.
Key takeaways
- Six events cover most needs. Checkout completed, subscription created, updated and deleted, invoice paid and payment failed run nearly every billing play.
- Write state, not events. Fetch the current subscription on every event and write that, so duplicates and late events can't corrupt a record.
- Match on ids first. Put CRM ids in Stripe metadata and fall back to email and domain only when they're missing.
- MRR needs rules. Annual plans, discounts, currencies and prorations each break naive math, so decide the rules before you write the code.
- Reconcile weekly. Compare Stripe totals to CRM totals every week, because webhooks fail quietly.
What does sales and marketing need from billing data?
Start with the questions people ask, not the fields Stripe has. Stripe has hundreds of fields. Your team needs about ten.
Here's the short list and why each one earns a spot on the record.
| CRM property | Source in Stripe | Who uses it | Why |
|---|---|---|---|
billing_status |
subscription.status |
Everyone | Trialing, active, past due or canceled drives every play |
mrr |
Computed from subscription items | Sales, CS, finance | Sorts accounts by value and powers expansion views |
plan_name |
price.nickname or product name |
Sales, CS | Shows upgrade room at a glance |
billing_interval |
price.recurring.interval |
Sales, finance | Annual customers renew on a different clock |
seats |
item.quantity |
Sales, CS | Seat growth is the cleanest expansion signal |
trial_end_date |
subscription.trial_end |
Sales | Tells reps when to call trial accounts |
last_payment_failed_at |
invoice.payment_failed event |
CS | Starts the save play |
customer_since |
First paid invoice date | Marketing, CS | Cohorts and anniversary plays |
churn_date |
subscription.ended_at |
Marketing, CS | Win-back timing and churn reporting |
stripe_customer_id |
customer.id |
Ops | The join key for everything else |
A VP of marketing mostly cares about three of these. Plan and MRR tell you which segments pay. Trial end tells you when to spend sales time. Churn date tells you who to win back and when.
What does each role do with it?
Sales uses trial end and plan to time calls. A rep who calls on day 12 of a 14-day trial beats a rep who calls on day 20.
CS uses status and failed payments to save accounts. A card that fails on a $2,000 a month account should reach a human the same day.
Marketing uses plan, MRR and churn date for segments. You can't run an upgrade campaign if you don't know who is on the starter plan.
Finance uses MRR, but finance should keep Stripe as the system of record. The CRM copy is for action, not for the board deck.
Native sync, webhooks or reverse ETL: which should you use?
You have three ways to move billing data into a CRM. Each one fits a different setup. Pick by where the data starts and how much logic you need.
What does HubSpot's Stripe integration actually do?
HubSpot has two different Stripe paths, and people mix them up.
The first is Stripe as a payment processor inside HubSpot. You collect payments through HubSpot quotes, invoices, payment links and subscriptions. HubSpot says it's available on all plans, workflows need Professional or Enterprise, and a 0.75% platform fee applies (as of November 2026). It also says invoices and subscriptions you create in HubSpot don't get created in Stripe. One Stripe account can connect to one HubSpot account.
The second is the Stripe Data Sync app in the HubSpot marketplace. It maps Stripe customers to contacts, invoices to invoices and products to products. Subscriptions and payment transactions map to custom objects, and the listing says subscription syncing needs an Enterprise tier for custom objects. Custom field mappings need Operations Hub Starter or Professional (as of November 2026).
So the native route works well when HubSpot is where you sell and collect. It gets thin when you bill in Stripe from your own app, you need MRR on the company record, or you're not on Enterprise.
What about Salesforce?
Stripe ships the Stripe app for Salesforce Platform. It brings Stripe billing objects into Salesforce as custom objects. It offers real-time or scheduled billing sync. It also lets you subscribe to Stripe events inside Salesforce and map them to fields with Flow Builder or Apex.
That's a strong option for a Salesforce shop with an admin who knows Flow. It's heavy for a team of five. If that's you, a webhook service writing to a few fields is often simpler. I compare the two CRMs for this kind of work in HubSpot vs Salesforce for your stack.
When does reverse ETL make sense?
Reverse ETL means you sync data from your warehouse back into tools. If Stripe already lands in a warehouse, a tool like Hightouch can push modeled MRR and status to the CRM on a schedule.
It's the cleanest option for MRR because you compute it once, in SQL, with rules finance agrees on. It's the worst option for speed. A failed card shouldn't wait for an hourly batch.
The decision table
| Your setup | Best route | Why |
|---|---|---|
| You sell and collect in HubSpot quotes and invoices | Native HubSpot payments | It's already in the CRM |
| You bill in Stripe, on HubSpot Enterprise, light needs | Stripe Data Sync app | Subscriptions land as custom objects |
| You bill in Stripe, HubSpot Starter or Pro | Webhooks | You control fields without custom objects |
| You're on Salesforce with a Flow admin | Stripe app for Salesforce | Events map to fields in Flow |
| Stripe already flows to a warehouse | Reverse ETL for MRR, webhooks for alerts | Batch for math, real time for saves |
| Seed stage, one founder doing sales | Zapier or Make on three events | Fast, cheap and good enough |
My default for a Series A SaaS on HubSpot Pro is webhooks for status and alerts, plus a nightly job for MRR. That mix is fast where speed matters and careful where money math matters. If you're new to the pattern, start with how webhooks work in a GTM stack.
Which Stripe events should you subscribe to?
Subscribe only to what you use. Stripe's own webhook docs say listening to extra events puts strain on your server. It also makes your logs harder to read.
| Event | What it means | What it should update |
|---|---|---|
checkout.session.completed |
Someone finished a hosted checkout | Create or match contact and company, set stripe_customer_id |
customer.subscription.created |
A new subscription exists | Status, plan, seats, interval, trial end |
customer.subscription.updated |
Plan, seats, status or discount changed | Same fields, plus upgrade or downgrade flags |
customer.subscription.deleted |
The subscription ended | Status to canceled, set churn_date |
customer.subscription.trial_will_end |
Trial ends soon | Create a sales task |
invoice.paid |
An invoice was paid | last_paid_at, clear failed flags, customer_since if first |
invoice.payment_failed |
A payment attempt failed | last_payment_failed_at, attempt count, Slack alert |
Stripe's subscription webhook guide says trial_will_end fires 3 days before a trial ends. If the trial is shorter than that, it fires right away. That makes it a natural trigger for a sales task.
The same guide says a subscription can start as incomplete when the first payment needs more steps. The customer then has 23 hours to pay before it becomes incomplete_expired. Don't count those as customers in the CRM.
What should a failed payment trigger?
The invoice.payment_failed event carries an attempt_count. Stripe's Smart Retries page says new accounts get up to 8 retries within 2 weeks by default. So the first failure isn't churn. It's the start of a two-week window.
I alert CS on the first failure for high-value accounts and on the third for everyone else. The same page lists hard decline codes like lost_card and stolen_card. Those won't succeed without a new card, so they should alert at once.
How do you match a Stripe customer to a CRM record?
Matching is where most Stripe syncs go wrong. Get it right once and the rest is plumbing.
Use this order. Stop at the first match.
- Metadata ids. Store the CRM contact id and company id in Stripe customer metadata at signup.
- Stripe customer id. Search the CRM for a company with that
stripe_customer_id. - Billing email. Find the contact by the customer's email, then use its primary company.
- Email domain. Find the company by domain, unless it's a free mail domain.
- Create. If nothing matches, create the contact and company and flag them for review.
Step one is the one that saves you. When your app creates the Stripe customer, it already knows who signed up. Write the ids then.
{
"metadata": {
"hubspot_contact_id": "51234",
"hubspot_company_id": "98765",
"workspace_id": "ws_7f2a"
}
}
A trimmed example. The workspace_id matters for PLG products, where one company can have several workspaces. I go deeper on this in the PLG GTM stack.
Contact or company?
Put billing fields on the company, not the contact. The person who enters the card often isn't the buyer. When they leave, the contact goes stale but the company keeps paying.
Copy a few fields down to the contact for email use, like plan_name and billing_status. Keep MRR on the company only, so reports never double count it. Write the field mapping rules down before you build.
What does a Stripe event look like?
Here's a trimmed example of a customer.subscription.updated event. Real payloads are much longer.
{
"id": "evt_1Q2w3E4r5T6y7U8i",
"object": "event",
"type": "customer.subscription.updated",
"created": 1795000000,
"livemode": true,
"data": {
"object": {
"id": "sub_1Q2w3EaBcDeFgH",
"object": "subscription",
"customer": "cus_Qa1B2c3D4e5F",
"status": "active",
"cancel_at_period_end": false,
"trial_end": null,
"discounts": ["di_1Q9z8Y7x"],
"items": {
"data": [
{
"id": "si_Qz9Y8x7W",
"quantity": 12,
"price": {
"id": "price_1Q2Growth",
"nickname": "Growth monthly",
"unit_amount": 4000,
"currency": "usd",
"recurring": { "interval": "month", "interval_count": 1 }
}
}
]
},
"metadata": { "hubspot_company_id": "98765" }
},
"previous_attributes": {
"items": { "data": [ { "quantity": 8 } ] }
}
}
}
Two things to notice. Amounts are in the smallest unit, so 4000 means $40.00. And previous_attributes shows what changed: seats went from 8 to 12. That's an expansion, and it should tell the account owner.
How do you build the webhook handler?
The handler has one job: prove the event came from Stripe, record it, and answer fast. Do the real work in a queue.
Verify the signature with the raw body
Stripe signs every event in the Stripe-Signature header. The webhook docs say you must pass the raw request body to the library. If your framework parses the JSON first, the check fails. The libraries also reject events older than a default tolerance of 5 minutes, which blocks replay attacks.
// server.js: Express + stripe-node. Trimmed for clarity.
import express from "express";
import Stripe from "stripe";
import { db, queue } from "./infra.js";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const app = express();
// Raw body on this route only. Do not put express.json() in front of it.
app.post("/webhooks/stripe", express.raw({ type: "application/json" }), async (req, res) => {
let event;
try {
event = stripe.webhooks.constructEvent(
req.body,
req.headers["stripe-signature"],
process.env.STRIPE_WEBHOOK_SECRET // whsec_...
);
} catch (err) {
return res.status(400).send(`Bad signature: ${err.message}`);
}
// Idempotency: insert the event id; a unique index rejects repeats.
const fresh = await db.query(
"insert into stripe_events (id, type, received_at) values ($1, $2, now()) on conflict (id) do nothing returning id",
[event.id, event.type]
);
if (fresh.rowCount === 0) return res.status(200).send("duplicate");
await queue.add("stripe-sync", { eventId: event.id, type: event.type, objectId: event.data.object.id });
return res.status(200).send("ok"); // answer before doing CRM work
});
Only parse JSON on your other routes. A global express.json() above this route is the most common reason signature checks fail.
Handle duplicates and out-of-order events
Stripe is clear on both points. The same event can arrive more than once, so log event ids and skip repeats. And Stripe doesn't promise order. A subscription can produce customer.subscription.created, invoice.created and invoice.paid, and they may arrive in any order.
You might think the created timestamp fixes order. Stripe says not to rely on it. The webhook docs note that created is in seconds, so distinct events can share a timestamp.
The fix is simple. Treat every event as a nudge, not as the truth. When the worker runs, it fetches the current subscription from Stripe and writes that state. A late event then writes the same current state again, which is harmless.
// worker.js: fetch current state, compute fields, write to HubSpot.
import { stripe, hubspot, findCompany } from "./infra.js";
import { monthlyMrr } from "./mrr.js";
export async function handle({ type, objectId }) {
let subId = objectId;
if (type.startsWith("invoice.")) {
const inv = await stripe.invoices.retrieve(objectId);
subId = inv.parent?.subscription_details?.subscription ?? inv.subscription; // field moved in newer API versions
if (!subId) return; // one-off invoice, no subscription to sync
}
if (type === "checkout.session.completed") {
const s = await stripe.checkout.sessions.retrieve(objectId);
if (!s.subscription) return;
subId = s.subscription;
}
const sub = await stripe.subscriptions.retrieve(subId, { expand: ["customer", "discounts"] });
const companyId = await findCompany(sub.customer); // metadata, then id, email, domain
const props = {
stripe_customer_id: sub.customer.id,
billing_status: sub.status,
plan_name: sub.items.data[0]?.price.nickname ?? "",
seats: sub.items.data.reduce((n, i) => n + (i.quantity ?? 1), 0),
billing_interval: sub.items.data[0]?.price.recurring?.interval ?? "",
trial_end_date: sub.trial_end ? new Date(sub.trial_end * 1000).toISOString().slice(0, 10) : "",
mrr: sub.status === "active" || sub.status === "past_due" ? monthlyMrr(sub) : 0,
churn_date: sub.ended_at ? new Date(sub.ended_at * 1000).toISOString().slice(0, 10) : ""
};
await hubspot.crm.companies.basicApi.update(companyId, { properties: props });
}
The invoice field line matters. Stripe moved the invoice's subscription link under parent.subscription_details in newer API versions, per its subscription webhook guide. Pin your API version and test after upgrades.
Stripe also offers "thin" events now, which carry only an id. That fits this pattern well, because you fetch the object anyway. Many no-code tools still expect the full "snapshot" payload, so pick snapshot if Zapier or Make reads the endpoint.
How do Stripe retries work?
If your endpoint doesn't return a 2xx, Stripe retries. The webhook docs say live mode retries for up to three days with exponential backoff. Sandbox retries three times over a few hours. You can also resend by hand: 15 days back from the Dashboard, 30 days back with the Stripe CLI.
That three-day window is your safety net, not your plan. If your CRM is down for four days, events will be lost. That's why the weekly reconciliation later in this playbook exists. For more on safe repeats, see idempotency in plain terms.
Also watch your own API limits on the way out. HubSpot's usage guidelines give private apps a burst limit of 100 calls per 10 seconds on Free and Starter, and 190 on Professional and Enterprise (as of November 2026). A month-start renewal spike can hit that, so throttle the worker.
How do you calculate MRR without getting it wrong?
MRR looks easy until real plans show up. Here are five common traps.
| Trap | Wrong way | Right way |
|---|---|---|
| Annual plans | Count the full annual price in the month paid | Divide by 12 (or by months in the interval) |
| Discounts | Ignore coupons | Subtract recurring discounts, skip one-time ones |
| Several subscriptions | Use only the first one | Sum all active subscriptions per company |
| Currencies | Add euros and dollars together | Convert at one fixed monthly rate |
| Prorations | Count proration invoice lines | Compute from subscription items, not invoices |
A trimmed MRR function that follows those rules:
// mrr.js: monthly MRR in your reporting currency, in dollars.
const MONTHS = { day: 1 / 30, week: 12 / 52, month: 1, year: 12 };
const FX = { usd: 1, eur: 1.08, gbp: 1.27 }; // fixed monthly rates you set; example values only
export function monthlyMrr(sub) {
let total = 0;
for (const item of sub.items.data) {
const p = item.price;
if (!p.recurring) continue; // skip one-off prices
const months = MONTHS[p.recurring.interval] * (p.recurring.interval_count ?? 1);
const amount = ((p.unit_amount ?? 0) * (item.quantity ?? 1)) / 100;
total += (amount / months) * (FX[p.currency] ?? 1);
}
const pctOff = sub.discounts?.[0]?.coupon?.percent_off ?? 0; // simplified: one recurring coupon
return Math.round(total * (1 - pctOff / 100) * 100) / 100;
}
Worked example: one company, three traps
Say a customer is on an annual plan at $12,000 a year with a 20% recurring discount. MRR is $12,000 × 0.8 ÷ 12 = $800.
Now they add a second subscription, a monthly add-on at €100. At a fixed rate of 1.08, that's $108. Company MRR is $908.
Mid-month they add five seats, and Stripe bills a proration line of $310. That's not MRR. It's a one-time catch-up charge. Your MRR moves only by the new seats' monthly value.
If you need MRR to match finance to the cent, compute it in the warehouse and use reverse ETL. Webhook MRR is great for sorting and alerts. It shouldn't be your board number.
Which plays should billing events trigger?
This is the payoff. Data on a record is nice. Data that starts the right action is pipeline and saved revenue.
| Trigger | Condition | Play | Owner |
|---|---|---|---|
| Payment failed | First failure, MRR over $1,000 | Slack alert to CS with account link | CSM |
| Payment failed | Hard decline code | Same-day email from CSM, then a call | CSM |
| Trial ending | trial_will_end, product usage high |
Sales task: call before day end | AE |
| Trial ending | Usage low | Nurture email with setup help | Marketing |
| Upgrade | Seats or plan up | Tell the owner, start an expansion check-in | AM |
| Downgrade | Seats or plan down | Save call within 48 hours | CSM |
| Churn | Subscription deleted | Exit survey, then win-back in 90 days | Marketing |
How should lifecycle stages change?
Billing status should drive lifecycle stage changes, not reps. First paid invoice moves the company to Customer. Churn moves it to a former customer stage or a churned flag. I lay out stage rules in lifecycle stages from MQL to SQL.
Trials are the tricky case. A trial with high usage is a strong opportunity. Score it the way you'd score a product-qualified lead, with billing and usage side by side.
What does the Slack alert look like?
Slack's rate limit docs say incoming webhooks allow 1 message per second, with short bursts. Batch alerts on busy days instead of sending one per event.


{
"text": "Payment failed: Acme Co ($2,400 MRR, Growth annual). Attempt 1 of the retry window. Decline: insufficient_funds. Owner: Jane Doe. CRM: https://app.hubspot.com/contacts/0000/company/98765"
}
A trimmed example. Keep the money, the reason and the owner in the first line. The person reading it is on a phone.
Plug your own churn and margin numbers into the CAC payback calculator. Saved customers shorten payback the same way new ones do.
How do you build it in Zapier, Make or n8n?
You don't need code to start. All three tools can listen to Stripe and write to a CRM.
Zapier's Stripe integration lists triggers like New Subscription, Updated Subscription, Canceled Subscription, Invoice Payment Failed, Checkout Session Completed and New Event. Make's Stripe app has an instant Watch Events trigger, and it creates the Stripe webhook for you. n8n's Stripe Trigger node checks the Stripe-Signature header when you give it a signing secret.
| Need | Zapier | Make | n8n | Code |
|---|---|---|---|---|
| Failed payment to Slack | Easy | Easy | Easy | Easy |
| Status and plan on company | Easy | Easy | Easy | Easy |
| MRR across items and coupons | Hard | Medium | Medium | Easy |
| Idempotency by event id | Hard | Medium | Medium | Easy |
| Backfill history | No | Hard | Medium | Easy |
| Self-hosting for data rules | No | No | Yes | Yes |
A no-code build, step by step
Here's the version I'd hand a founder on Zapier, Make or n8n.
- Add the CRM properties from the table at the top. Use the exact internal names.
- Make the trigger: Updated Subscription in Zapier, or Watch Events filtered to subscription events in Make or n8n.
- Add a Stripe step that retrieves the customer, so you have email and metadata.
- Find the company. Search by
stripe_customer_id, then by domain. Add a create step if none is found. - Update the company with status, plan, seats, interval and trial end.
- Add a filter path: if status is
past_due, post to the CS Slack channel. - Build a second flow on Invoice Payment Failed with the Slack message above.
- Build a third on Canceled Subscription that sets churn date and status.
- Turn on error alerts in the tool, sent to a person who will read them.
That covers status and alerts. Leave MRR to a nightly code job or a warehouse model. No-code tools struggle with loops over items and coupons. If you're also wiring forms, the same patterns show up in the form to CRM and Slack build.
How do you test it before going live?
Never test on live billing. Stripe gives you a sandbox and a CLI for this.
# Log in and forward snapshot events to your local server
stripe login
stripe listen --forward-to localhost:4242/webhooks/stripe
# Copy the whsec_ secret it prints into STRIPE_WEBHOOK_SECRET
# Fire test events in another terminal
stripe trigger checkout.session.completed
stripe trigger customer.subscription.updated
stripe trigger invoice.payment_failed
# Resend a real event to check idempotency
stripe events resend evt_1Q2w3E4r5T6y7U8i --webhook-endpoint=we_123
Those commands come from Stripe's webhook docs. Check newer CLI flags there, since the CLI changes often.
Test these cases on purpose, not just the happy path:
- The same event sent twice. The CRM should update once.
- An
invoice.paidthat arrives beforecustomer.subscription.created. The record should still end up right. - A customer with no metadata and a gmail.com address. It should create and flag, not match a random company.
- An annual plan with a coupon. MRR should match your hand math.
- A bad signature. The endpoint should return 400 and do nothing.
- A worker crash mid-write. The queue should retry and the result should be the same.
How do you backfill history?
Webhooks only see the future. On day one your CRM still has no billing data for existing customers. You need a backfill.
The backfill is the same worker, run over a list. Page through all subscriptions with the API, and push each id through the same handle function. Using one code path means the backfill and the live sync can't disagree.
// backfill.js: replay every subscription through the live worker.
import { stripe } from "./infra.js";
import { handle } from "./worker.js";
for await (const sub of stripe.subscriptions.list({ status: "all", limit: 100 })) {
await handle({ type: "customer.subscription.updated", objectId: sub.id });
await new Promise((r) => setTimeout(r, 120)); // stay well under rate limits
}
Mind the limits on both sides. Stripe's rate limit page sets a global limit of 100 requests per second in live mode, and 25 per second for most single endpoints (as of November 2026). HubSpot's burst limit is lower, so it's usually the real bottleneck. A pause of about 120 ms between records keeps you near 8 writes a second.
Run the backfill once in a sandbox CRM if you have one. Then run it in production on a quiet day, and spot-check 20 accounts by hand.
How does a Stripe to CRM sync break?
These are the common failures.
Parsed body before the signature check. The endpoint returns 400 for every event, and nobody notices for a week. Fix it with a raw body on that route and an alert on any 4xx rate above zero.
Writing the event payload instead of current state. A late customer.subscription.updated overwrites a newer cancel. The account looks active for months. Fix it by fetching the subscription every time.
Matching on email alone. The card holder is a contractor with a personal email. Their company record gets created twice. Fix it with metadata ids at signup.
MRR on the contact and the company. Revenue reports show twice the real number. Fix it by keeping MRR on the company only.
Doing CRM work inside the request. HubSpot is slow for a minute, Stripe times out and retries, and you hit rate limits. Fix it with a queue and a fast 200.
No owner for errors. The no-code tool emails failures to a shared inbox. Fix it by sending failures to a named person's Slack.
Test and live secrets mixed up. Stripe uses a different signing secret for test and live on the same endpoint. Store both and pick by livemode.
How do you monitor and reconcile?
Webhooks fail quietly. You need two checks: one live, one weekly.
The live check watches the endpoint. Alert when the share of non-2xx responses goes above zero for 15 minutes. Stripe shows delivery status per event in Workbench, under the endpoint's Event deliveries tab, so start there when an alert fires.
The weekly check compares totals. Pull active subscription count and MRR from Stripe or your warehouse. Pull the same from the CRM. They should match within a small margin.
| Check | Stripe side | CRM side | Tolerance |
|---|---|---|---|
| Active customers | Count of active and past due subscriptions | Companies with billing_status active or past_due |
Exact |
| Total MRR | Sum from your MRR rules | Sum of company mrr |
Within 1% |
| Churned this week | Subscriptions deleted in last 7 days | Companies with churn_date in last 7 days |
Exact |
| Unmatched customers | Customers with no CRM id in metadata | Companies flagged for review | Trending down |
When they drift, rerun the backfill script for the accounts that differ. Because it uses the same worker, it fixes them without new code.
What to do this week
Pick the smallest version that gives CS and sales real signal. Then grow it.
- List the ten CRM properties above and create them with the exact internal names.
- Add CRM ids to Stripe customer metadata in your signup code.
- Stand up the failed payment alert first, in Zapier, Make or code. It saves money from week one.
- Add the subscription status sync and run the backfill.
- Put the weekly reconciliation on someone's calendar.
If you want the whole route built and tested, including MRR rules finance signs off on, that's the kind of work I do in GTM engineering projects. Either way, start with the alert. A saved customer is the cheapest revenue you'll find this quarter.