Stripe Integration Guide

Connect Stripe.
Get Paid on Every Sale.

A complete, step-by-step walkthrough to connect your Stripe account to the American Community Hub marketplace โ€” so you automatically receive 90.1% of every sale you make.

5
Simple Steps
90.1%
You Receive
~10 min
Setup Time
How the money flows
๐Ÿ›๏ธ
Buyer
Pays full price
โ†’
Stripe
Processes securely
โ†’
๐Ÿ’ฐ
You
Get paid
90.1%
To You (Seller)
9.9%
Platform Fee

Splits happen automatically via Stripe Connect. Zero manual work.

Step-by-Step Setup

Your Complete Stripe Setup Guide

1
Create Your Stripe Account
Your platform account โ€” where your 9.9% fees land automatically
  • Go to stripe.com and click "Start now"
    Use a business email address โ€” not a personal Gmail. This is the account that collects your 9.9% platform fee.
  • Enter your email, create a password, and verify your email
    Stripe will send a verification link. Click it before continuing.
  • Complete the "Tell us about your business" form
    Select "Platform or marketplace" as your business type. Fill in American Community Hub as the business name.
  • Add your bank account for payouts
    This is where your 9.9% fee earnings will be deposited. You'll need your routing and account number.
Good to know: Your Stripe account starts in test mode automatically. You can build and test everything without real money โ€” switch to live mode when you're ready to launch.
Step 1 of 5
2
Enable Stripe Connect
This lets your sellers link their own bank accounts to receive 90.1%
  • In your Stripe Dashboard, go to Settings โ†’ Connect settings
    The Connect section is in the left sidebar under "Products".
  • Click "Get started with Connect"
    You'll be prompted to choose an account type for your sellers.
  • Choose "Express" as the connected account type
    Express is best for marketplaces โ€” Stripe handles onboarding, identity verification, and compliance for your sellers in minutes.
  • Set your platform name and website URL
    Enter American Community Hub and americancommunityhub.com
  • Upload your branding โ€” logo and brand color
    Sellers will see your branding during their Stripe onboarding flow. Use #0f7c6e (teal) as your brand color.
Express vs Standard vs Custom: Express is right for you โ€” Stripe hosts the onboarding pages, handles compliance, and you just need to send sellers to the Connect link. Standard requires sellers to manage a full Stripe account themselves. Custom requires you to build all UI from scratch.
Step 2 of 5
3
Get Your API Keys & Client ID
Three values you need to wire Stripe into your marketplace pages
  • Go to Developers โ†’ API keys in your Stripe Dashboard
    You'll see both your Publishable key and Secret key here.
  • Copy your Publishable key (starts with pk_live_ or pk_test_)
    This goes in your HTML files โ€” it's safe to be public. Paste it into marketplace-sell.html where it says Stripe('pk_...')
  • Copy your Secret key (starts with sk_live_ or sk_test_)
    Store this as an environment variable on your server only โ€” NEVER paste it into HTML or share it publicly.
  • Get your Connect Client ID โ€” go to Settings โ†’ Connect settings โ†’ Integration
    It starts with ca_... โ€” paste this into the Connect button URL in your marketplace page.
Security warning: Your Secret key is like a password. If anyone gets it they can charge cards and transfer money from your account. Keep it in a .env file or Firebase environment config โ€” never in client-side code.
marketplace-sell.html โ€” update these two lines
// Line 1 โ€” replace the test publishable key: const stripe = Stripe('pk_live_YOUR_PUBLISHABLE_KEY_HERE'); // Line 2 โ€” replace in the Connect button href: ?client_id=ca_YOUR_CONNECT_CLIENT_ID_HERE &redirect_uri=https://americancommunityhub.com/stripe-callback
Step 3 of 5
4
Add the Backend Code
Server-side function that enforces the 9.9% split on every sale

The 17% fee must be enforced on your server โ€” not in the browser. Here are the two server functions you need, written for Node.js / Firebase Cloud Functions.

Function 1 โ€” Create a payment with the 17% application fee
Node.js / Firebase Function
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); // Called when a buyer clicks "Pay" on a listing exports.createPaymentIntent = functions.https.onCall(async (data) => { const { amount, sellerStripeAccountId } = data; const amountCents = Math.round(amount * 100); const platformFee = Math.round(amountCents * 0.099); // 9.9% const paymentIntent = await stripe.paymentIntents.create({ amount: amountCents, currency: 'usd', application_fee_amount: platformFee, // โ†’ your account transfer_data: { destination: sellerStripeAccountId, // โ†’ seller's account }, }); return { clientSecret: paymentIntent.client_secret }; });
Function 2 โ€” Handle the Stripe Connect OAuth callback
Node.js / Firebase Function
// Saves the seller's Stripe account ID after they connect exports.stripeCallback = functions.https.onRequest(async (req, res) => { const { code, state } = req.query; // state = your user's UID const response = await stripe.oauth.token({ grant_type: 'authorization_code', code, }); const sellerAccountId = response.stripe_user_id; // acct_... // Save to Firestore so you can use it at checkout await admin.firestore().collection('users') .doc(state) .update({ stripeAccountId: sellerAccountId }); res.redirect('/marketplace-sell.html?connected=true'); });
Store seller IDs in Firestore: When a seller completes Stripe Connect, save their stripeAccountId to your Firestore user document. At checkout, look up this ID and pass it as transfer_data.destination โ€” that's what routes their 90.1% automatically.
Step 4 of 5
5
Test Everything, Then Go Live
Use Stripe's test cards to simulate real sales before launching
  • Use test card 4242 4242 4242 4242 to simulate a successful payment
    Any future expiry date, any 3-digit CVC, any ZIP. This card always succeeds in test mode.
  • Check Stripe Dashboard โ†’ Payments to confirm the charge appeared
    You should see the full sale amount, and the 9.9% application fee deducted.
  • Check Connect โ†’ Transfers to verify 90.1% went to the seller account
    Confirm the transfer shows the correct connected account as the destination.
  • Set up a webhook for payment_intent.succeeded
    Go to Developers โ†’ Webhooks โ†’ Add endpoint. Point it at your Firebase function to trigger order confirmation emails.
  • Complete Stripe's identity verification to activate live mode
    Stripe will ask for your business details, EIN/SSN, and address to enable real payouts.
  • Swap test keys for live keys and deploy
    Replace pk_test_ with pk_live_ in your HTML, and update STRIPE_SECRET_KEY on your server.
Stripe test cards reference
4242 4242 4242 4242 โ†’ Payment succeeds 4000 0000 0000 9995 โ†’ Payment declined (insufficient funds) 4000 0025 0000 3155 โ†’ Requires 3D Secure authentication Any future date for expiry, any 3-digit CVC, any 5-digit ZIP
Step 5 of 5

You're Ready to Sell!

Your Stripe integration is set up. Every sale on American Community Hub will now automatically split โ€” 90.1% deposited to your bank, 9.9% to the platform. No manual work, ever.

90.1%
Yours per sale
2 days
Payout speed
$0
Listing cost