Marketplace Agent Skill
Multi-vendor architecture, Stripe Connect onboarding, commission fees, escrow payments, seller dashboards, and reviews.
The Skill
Full content, every format. Copy it, download it, or install with one command.
---
description: Multi-vendor architecture, Stripe Connect onboarding, commission fees, escrow payments, seller dashboards, and reviews.
homepage: https://yepapi.com/skills/marketplace
metadata:
tags: [marketplace, multi-vendor, stripe-connect, escrow]
---
# Marketplace
## Rules
- Multi-vendor data model: `User` has one `Seller` profile — products belong to sellers, orders link buyer + seller
- Stripe Connect for payouts: onboard sellers with Connect Express — handles KYC, tax forms, bank accounts
- Commission: calculate platform fee as percentage — use `application_fee_amount` on PaymentIntents or Checkout Sessions
- Escrow flow: capture payment on purchase, hold funds, transfer to seller on delivery confirmation or after dispute window
- Seller dashboard: separate layout with sales analytics, order management, product CRUD, payout history
- Buyer/seller reviews: one review per order, both directions — aggregate ratings with weighted average
- Search with seller filtering: include seller name, rating, location in search facets
- Seller onboarding: multi-step flow — business info → Stripe Connect → product listing → go live
## Patterns
\`\`\`ts
// Stripe Connect: create connected account for seller
const account = await stripe.accounts.create({
type: "express",
email: seller.email,
metadata: { sellerId: seller.id },
});
// Create onboarding link
const accountLink = await stripe.accountLinks.create({
account: account.id,
refresh_url: `${baseUrl}/seller/onboarding?refresh=true`,
return_url: `${baseUrl}/seller/onboarding/complete`,
type: "account_onboarding",
});
// Checkout with platform fee
const session = await stripe.checkout.sessions.create({
line_items: [{ price: priceId, quantity: 1 }],
payment_intent_data: {
application_fee_amount: Math.round(price * 0.10), // 10% platform fee
transfer_data: { destination: seller.stripeAccountId },
},
mode: "payment",
success_url: `${baseUrl}/orders/{CHECKOUT_SESSION_ID}`,
cancel_url: `${baseUrl}/cart`,
});
// Data model sketch
// sellers: id, userId, stripeAccountId, businessName, rating, status (pending|active|suspended)
// products: id, sellerId, title, price, inventory, status
// orders: id, buyerId, sellerId, status (pending|paid|shipped|delivered|disputed)
// reviews: id, orderId, reviewerId, rating, comment, type (buyer_to_seller|seller_to_buyer)
\`\`\`
## Avoid
- Direct transfers without escrow — hold funds until delivery confirmed or dispute window passes
- Single Stripe account for all sellers — each seller needs their own Connect account for compliance
- Letting sellers set payout schedules — use platform-controlled payouts for fraud protection
- Missing seller verification — require Stripe Connect onboarding completion before going live
- Platform handling tax for sellers — Stripe Connect Express handles seller tax reportingInstall
Why Use the Marketplace Skill?
Without this skill, your AI guesses at marketplace patterns. It might hallucinate deprecated APIs, use outdated conventions, or miss best practices entirely. With it, your AI follows a proven ruleset — every suggestion aligns with current standards.
Drop this skill into your project and your AI instantly knows the rules. Better code suggestions, fewer errors, faster shipping.
Try These Prompts
These prompts work better with the Marketplace skill installed. Your AI knows the context and writes code that fits.
"Build a multi-vendor marketplace with Stripe Connect seller onboarding"
"Create a checkout flow with platform commission fees and escrow payments"
"Implement a seller dashboard with sales analytics, order management, and payout history"
Works Great With
Marketplace skill — FAQ
It provides rules for multi-vendor data models, Stripe Connect seller onboarding, commission fee calculation, escrow payment flows, seller dashboards, and buyer/seller reviews.
Run `npx skills add YepAPI/skills --skill marketplace` in your project root. This copies the skill file into your repo where your AI coding tool can read it automatically.
Stripe Connect handles KYC verification, tax forms, and bank account management for each seller. Without it, you would need to handle money transmission compliance yourself, which has significant legal requirements.