TeachRepo handles Stripe checkout, paywall enforcement, and a simple affiliate link system — all without you writing a line of payment code.
Set price_cents: 0 in course.yml. Anyone can enroll.
Set a price in cents (e.g. 4900 = $49). Stripe checkout handles the rest.
Subscriptions and bundles are on the roadmap.
Stripe's standard processing fee (2.9% + 30¢) applies to all transactions. TeachRepo's platform fee is taken from the payout, not charged separately.
Give affiliates a unique referral link. When a learner purchases through that link, the affiliate earns a configurable commission.
https://teachrepo.com/courses/git-for-engineers?ref=AFFILIATE_CODE
How it works: The ?ref= parameter is captured at checkout and stored in the referrals table. Affiliates can see their clicks and conversions in the dashboard.
Commission: Set per-affiliate in the Affiliates tab of your dashboard. Default: 30% of the sale price.
Payouts: Currently manual (export a CSV from the dashboard). Automated payouts via Stripe Connect are on the roadmap.
Set the environment variable ENABLE_PURCHASE_SIMULATION=true to enable the POST /api/enroll/simulate endpoint. Use this to test the enrolled state without going through Stripe.
curl -X POST https://yoursite.com/api/enroll/simulate \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{"courseId": "uuid-here"}'⚠ Disable this in production — it bypasses payment validation.