> ## Documentation Index
> Fetch the complete documentation index at: https://flywheel.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Stripe

> Learn how to connect your Stripe account with Flywheel to sync customer data and automate billing workflows

# Connect Your Stripe Account

Flywheel integrates seamlessly with Stripe to help you automate your billing workflows and sync customer data. When you connect your Stripe account, Flywheel will sync historical user data and automatically keep customer properties up-to-date in real-time.

## Quick Setup

<Card title="Connect Stripe Integration" icon="stripe" href="https://app.flywheel.cx/dashboard/deeplink?target=/settings/integrations?integration=stripe">
  Connect your Stripe account directly from your Flywheel dashboard
</Card>

## Step-by-Step Connection Process

### 1. Navigate to Integrations

1. Go to your Flywheel dashboard
2. Navigate to **Settings** → **Integrations**
3. Find the **Stripe** integration card
4. Click **Connect** or **Install the Stripe App**

### 2. Authorize Flywheel

1. You'll be redirected to Stripe's authorization page
2. Sign in to your Stripe account if not already logged in
3. Review the permissions Flywheel is requesting:
   * Read customer information and details
   * Access subscription status and details
   * View charge details and transaction history
   * Access payment intent and invoice information
   * Read product and pricing information
4. Click **Install app** to authorize the connection

### 3. Confirm Connection

Once authorized, you'll be redirected back to Flywheel where you'll see:

* Confirmation that your Stripe account is connected
* Your Stripe account details (account name, logo if available)
* Sync status information

## What Happens After Connection

### Historical Data Sync

When you first connect your Stripe account, Flywheel automatically:

1. **Retrieves all existing customers** from your Stripe account
2. **Syncs historical subscription data** for each customer
3. **Imports transaction history** and payment information
4. **Creates user profiles** in Flywheel for each Stripe customer

<Note>
  The initial sync may take a few minutes to complete depending on the number of customers in your Stripe account. You can monitor the sync progress in your dashboard.
</Note>

### Synced Customer Properties

Flywheel automatically syncs and maintains the following Stripe customer properties:

#### Basic Customer Information

* **Name** (first and last name from Stripe customer name)
* **Email address**
* **Phone number**
* **Stripe Customer ID**

#### Subscription Data

* **Subscription status** (active, trialing, canceled, etc.)
* **Monthly Recurring Revenue (MRR)**
* **Lifetime Value (LTV)**
* **Next payment date**
* **Cancellation date** (if applicable)
* **First payment date**
* **Product and price information**

#### Transaction Details

* **Payment history**
* **Charge amounts**
* **Discount information**
* **Payment processor** (automatically set to "stripe")

### Real-Time Synchronization

After the initial connection, Flywheel keeps your customer data in sync automatically through webhooks:

* **New customers** are automatically added to Flywheel
* **Subscription changes** (upgrades, downgrades, cancellations) are reflected immediately
* **Payment events** update customer LTV and payment history
* **Profile updates** in Stripe sync to Flywheel user profiles

## Automated Events

Flywheel also creates events for important Stripe activities:

* `$fw_stripe_customer_created` - New customer created
* `$fw_stripe_subscription_started` - Subscription activated
* `$fw_stripe_trial_started` - Trial period began
* `$fw_stripe_trial_converted` - Trial converted to paid
* `$fw_stripe_subscription_upgraded` - Subscription upgraded
* `$fw_stripe_subscription_downgraded` - Subscription downgraded
* `$fw_stripe_subscription_canceled` - Subscription canceled
* `$fw_stripe_discount_applied` - Discount applied
* `$fw_stripe_invoice_paid` - Invoice payment successful
* `$fw_stripe_payment_failed` - Payment failed

<Card title="Build Your First Workflow" icon="workflow" href="/quick-start/build-your-first-workflow">
  Learn how to create automated workflows using your Stripe data
</Card>
