Stripe Connect Setup
Complete guide to configuring Stripe Connect for your beat marketplace.
๐ก Zero Liability - Stripe Connect handles all payment processing, KYC, tax compliance, and fraud prevention. You never see credit cards, bank accounts, or SSNs.
What is Stripe Connect?
Stripe Connect allows you to facilitate payments between buyers and sellers without ever touching the money yourself. Beat makers receive payouts directly to their bank accounts, while you collect a platform fee.
Account Types
Beat Flow uses Express accounts:
- โ Stripe-hosted onboarding (no custom UI needed)
- โ Automatic KYC and identity verification
- โ Direct payouts to seller bank accounts
- โ No liability for chargebacks or fraud
- โ Stripe handles tax reporting (1099-K)
Step 1: Create Stripe Account
- Go to stripe.com
- Click "Start now" and create account
- Complete business verification (required for live mode)
- Add bank account for platform fee deposits
Step 2: Enable Stripe Connect
- Log in to Stripe Dashboard
- Go to Settings โ Connect
- Toggle "Enable Connect" to ON
- That's it! No additional configuration needed for Express accounts
โ
Done! - Stripe Connect is now enabled. You can now create Express accounts for sellers.
Step 3: Get API Keys
Test Mode (Development)
- Go to Test Mode API Keys
- Copy "Secret key" (starts with
sk_test_) - Use this for development and testing
Live Mode (Production)
- Go to Live Mode API Keys
- Copy "Secret key" (starts with
sk_live_) - Use this for production (ONLY after testing is complete)
Set Secret in Workers
cd /tmp/beatflow/workers
# For development (test mode)
npx wrangler secret put STRIPE_SECRET_KEY
# Enter: sk_test_...
# For production (live mode) - ONLY when ready to launch
npx wrangler secret put STRIPE_SECRET_KEY
# Enter: sk_live_...
Step 4: Configure Webhook Endpoint
Webhooks notify your Worker when payments complete, accounts update, etc.
Create Webhook (After Deploying Workers)
- Deploy your Workers first:
cd /tmp/beatflow/workers && npm run deploy - Go to Stripe Webhooks
- Click "Add endpoint"
- Endpoint URL:
https://beatflow-api.terry-c67.workers.dev/api/webhooks/stripe - Listen to events: Select these 3 events:
checkout.session.completed- Payment successfulaccount.updated- Seller onboarding status changedpayment_intent.payment_failed- Payment failed
- Click "Add endpoint"
- Copy the "Signing secret" (starts with
whsec_)
Set Webhook Secret
cd /tmp/beatflow/workers
npx wrangler secret put STRIPE_WEBHOOK_SECRET
# Enter: whsec_...
โ ๏ธ Production Note - When switching to live mode, create a NEW webhook endpoint in live mode and update the webhook secret.
Understanding the Payment Flow
Destination Charges
Beat Flow uses destination charges where payments go directly to the seller, and you collect a platform fee:
Buyer pays $100
โโ Stripe fee (2.9% + 30ยข): $3.20
โโ Platform fee (10%): $10.00
โโ Seller receives: $86.80
Payment Flow Diagram
- Buyer clicks "Buy" โ Worker creates Checkout session
- Stripe charges buyer โ Captures payment
- Webhook fires โ
checkout.session.completed - Worker updates database โ Marks transaction as paid, generates download token
- Buyer gets download links โ Time-limited R2 signed URLs
- Stripe transfers funds โ 90% to seller, 10% to you (minus Stripe fees)
Seller Onboarding Flow
How It Works
- Seller clicks "Become a Seller" on your site
- Worker calls
POST /api/sellers/onboard - Worker creates Stripe Express account via API
- Worker generates Stripe-hosted onboarding URL
- Seller redirected to Stripe's onboarding form
- Seller enters:
- Bank account details
- Identity verification (SSN, photo ID)
- Tax information (W-9 or W-8)
- Business details
- Stripe verifies identity and bank account
- Webhook fires โ
account.updated - Worker marks seller as
onboarding_complete - Seller can now receive payouts!
๐ก Key Point - You NEVER see or store bank details, SSNs, or identity documents. Stripe handles 100% of the sensitive data collection.
Test Onboarding
In test mode, use these test values:
- SSN:
000-00-0000 - Bank Account: Use Stripe's test routing numbers
- Phone: Any 10-digit number
- DOB: Any date (18+ years ago)
See Stripe Connect Testing Guide for complete test data.
Monitoring & Management
Stripe Dashboard Sections
| Section | URL | Purpose |
|---|---|---|
| Payments | dashboard.stripe.com/payments | All transactions |
| Connect | dashboard.stripe.com/connect | Seller accounts |
| Webhooks | dashboard.stripe.com/webhooks | Webhook events |
| Payouts | dashboard.stripe.com/balance | Your platform fees |
Webhook Status
Monitor webhook delivery in Stripe Dashboard:
- โ Success rate should be >99%
- โ ๏ธ Failed webhooks will retry automatically
- โ Repeated failures indicate Worker issues
Platform Fee Configuration
Platform fee is set in workers/wrangler.toml:
[vars]
PLATFORM_FEE_PERCENT = "10" # 10% platform fee
Common fee structures:
- 5% - Low fee, high volume strategy
- 10% - Industry standard (Beat Flow default)
- 15% - Premium platform with added services
- 20% - High-touch, curated marketplace
Calculating Earnings
$100 beat sale at 10% platform fee:
Buyer pays: $100.00
Stripe fee (2.9%+30ยข): -$3.20
Platform fee (10%): +$10.00
Seller receives: $86.80
Your net earnings: $10.00 - (10% of $3.20) = ~$9.70
Compliance & Legal
What Stripe Handles
- โ PCI compliance (credit card security)
- โ KYC (Know Your Customer) verification
- โ AML (Anti-Money Laundering) checks
- โ Tax reporting (1099-K for sellers earning >$600/year)
- โ Fraud prevention and detection
- โ Chargeback management
What You Handle
- Platform Terms of Service
- Privacy Policy
- Seller Agreement
- License agreements (Basic, Premium, Exclusive)
Going Live Checklist
- [ ] Complete Stripe business verification
- [ ] Test complete flow in test mode
- [ ] Switch to live mode API keys
- [ ] Create live mode webhook endpoint
- [ ] Update webhook secret in Workers
- [ ] Test with real payment (small amount)
- [ ] Verify webhook delivery works
- [ ] Confirm seller receives payout
๐ Ready! - Once all steps are complete, your Stripe Connect integration is production-ready.