Skip to main content
This guide shows how to recreate the core of the Mercor Clone demo using Whop Rails. You’ll build the key pages, wire up payments with the Checkout element, and pay connected accounts at scale. To see the example repository, visit the Mercor clone repository. Otherwise, follow the tutorial below to get started:
Set environment variables
Install dependencies

1) Project structure and pages

Create an App Router structure (Next.js) that mirrors the marketplace flows. Add recruiter pages for funding and managing gigs, earner pages for payouts and submissions, and an admin surface if needed. Folder structure
Example minimal recruiter balance page
Example minimal earner payouts page

2) Payment flow with the checkout element

Server: create a Whop checkout configuration with a one-time variant and your own metadata to link payments back to the recruiter account. The inline variant input is still named plan for compatibility.
Client: open an “Add Funds” modal and mount the Whop Elements checkout with @whop/elements-react.
A finished checkout redirects the tab to returnUrl, so the modal needs no completion callback. Credit the recruiter’s balance from the webhook below and render it on the page returnUrl points to. Webhook: receive Whop payment events and credit recruiter balance on payment.succeeded.

3) Connected account payouts (account setup + payout portal)

Create a Whop sub-account (earner account) under your platform account. Store the returned whopId to route transfers.
Embed a payout portal with Whop Elements Mint an access token for the earner’s account on your server (see Enable Connected Account Payouts), then mount the wallet surfaces with it:
Gig completion: transfer funds from platform to earner sub-account using the earner’s whopAccountId and an idempotency key per submission.
That’s the core of the Mercor-style marketplace. Recruiters fund balances through payments, earners set up payout accounts (sub-accounts), and completed gigs transfer money to earners minus your platform fee. Reference repository: Mercor clone