What you’ll build
A marketplace where:- Sellers create listings with a price.
- Buyers browse listings, click “Buy”, and pay via Stripe.
- Money flows: 90% to the seller, 10% to the platform.
- Sellers onboard via Stripe Connect Express (KYC, bank account).
- Payouts are automatic — Stripe sends the money.
Prerequisites
Step 1 — Project foundation
Use Plan mode. Submit, review the plan, approve. Build takes ~2 minutes. vly will prompt you to provide Stripe credentials. Paste yoursk_test_... and pk_test_... keys.
Step 2 — Test buyer flow
Once built, sign up as a buyer:- Browse the (empty) homepage — no listings yet.
- We need to create a seller and a listing first.
Step 3 — Test seller onboarding
Sign up as a different user (incognito). Click Become a seller. vly redirects to Stripe’s hosted Connect Express onboarding. In test mode, you can fast-forward through verification with Stripe’s test data:- Test bank
- Test SSN (US)
- Test address
- Test ID verification
Routing:
110000000
Account: 000123456789stripeOnboardingComplete should be true.
Step 4 — Create a listing
Still as the seller, go to/sell/new:
- Title: “Vintage typewriter”
- Description: “1965 Olivetti, fully working”
- Price: $50.00
- Image: paste any image URL
Step 5 — Test buyer flow end-to-end
Switch back to the buyer browser:- Open the homepage. The listing appears.
- Click into it. Click Buy.
- Redirected to Stripe Checkout. Use test card
4242 4242 4242 4242, any future expiry, any CVC. - After successful payment, redirected back to a success page.
- The payment shows as completed.
- $50 charged to the buyer.
- Connected account (the seller) receives $45 (90%).
- Platform receives $5 (10%) as
application_fee_amount.
Step 6 — Webhook for purchase confirmation
vly already wired up the webhook. To verify:- Stripe dashboard → Webhooks → find the endpoint.
- Send a test
checkout.session.completedevent. - The vly app receives it, marks the purchase as
succeededin the DB.
Step 7 — Refunds (admin path)
For disputes or seller-initiated refunds: Test with a real charge and refund.Going to production
1
Activate your Stripe account
Provide business details, bank account, identity. Required for live mode.
2
Switch keys
Replace
sk_test_... and pk_test_... with sk_live_... and pk_live_... in vly’s production environment.3
Register a production webhook
Use your custom domain URL. Copy the new signing secret to production env.
4
Set up your platform's payout schedule
In Stripe → Settings → Payouts. Daily, weekly, or manual.
5
Customer support
Set up a
disputes@yourapp.com inbox; Stripe forwards customer dispute notifications here.Common variations
Subscriptions instead of one-time
Subscriptions instead of one-time
Replace
checkout.sessions.create({ mode: "payment" }) with mode: "subscription". Listings become “Subscribe” with a recurring price.Escrow / hold funds until delivery
Escrow / hold funds until delivery
Use Stripe’s delayed transfer. Charge the buyer immediately, transfer to the seller after a manual confirmation step.
Multi-item cart
Multi-item cart
Replace single-listing checkout with a cart that aggregates
line_items across multiple sellers. Use Stripe’s destination charges with multiple transfers.International payouts
International payouts
Stripe Connect Express supports payouts in 40+ countries. Each seller’s account is regional; the marketplace just sends the transfer.
Fee on top of price (vs. taken from)
Fee on top of price (vs. taken from)
Buyer-pays-fee: present the price as
$50 + $5 platform fee = $55. Use Stripe’s application_fee_amount either way; UI presentation differs.Things to watch
Onboarding incomplete states
Onboarding incomplete states
Sellers can drop out partway through Stripe onboarding. Periodically check
account.charges_enabled and prompt them to finish.Disputes and chargebacks
Disputes and chargebacks
These hit your platform balance, not the seller’s. Set up a reserve or insurance for high-risk categories.
Tax handling
Tax handling
Stripe Tax can calculate and remit. For complex cross-border, talk to a tax advisor.
Fraud
Fraud
Stripe Radar (built into Stripe) handles most fraud. For high-risk categories, add manual review on first-time sellers.
Related
Stripe integration
Full reference for the Stripe integration.
Subscription billing
Subscription marketplaces.
Multi-tenant SaaS
The base pattern for B2B variants.
