merce.STACK
merce.STACK
Skip to content
PricingWhat's new
Log inGet started
{}Developers
GuidesAPI referenceChangelogGet API keys →
  • Get started

    • Quickstart
    • Keys & authentication
  • Storefront

    • Products & catalog
    • Carts
    • Checkout & payment
    • Customer accounts
    • Digital products
    • Without a build step
    • Bookings
    • Courses
    • Drop-in components
  • Server API

    • Server API
    • Customers
    • Payment links & transactions
    • Balance & payouts
    • Classes & students
    • Node SDK
  • Email API

    • Email API
    • Sending email
    • Delivery events
  • Events & errors

    • Webhooks
    • Errors
  • Reference

    • API reference
    • Changelog

Storefront

Courses

Your course catalogue on your own site, and enrolling — free or paid.

TypeScript
const courses = await mercestack.courses.list({ q: "design" });
// [{ slug, title, subtitle, coverImageUrl, pricing: "free" | "paid", price, currency, lessonCount }]

const course = await mercestack.courses.get(courses[0].slug); // modules, lessons, instructor

const result = await mercestack.courses.enroll(course.slug, {
  name: "Ada Lovelace",
  email: "[email protected]",
});

if (result.status === "pending_payment") location.assign(result.paymentUrl);
else show("You're in — check your email for access.");
  • —Free courses enrol at once and the student is emailed their access link.
  • —Paid courses answer with a paymentUrl on the workspace's own payment page. The enrolment activates when the payment succeeds.
  • —Enrolling twice is safe: an active student gets { status: "active", alreadyEnrolled: true }.
  • —Lessons are watched in Mercestack's learning space, which the access email links to; video stays signed and streamed from there.
← PreviousBookingsNext →Drop-in components
Create a workspaceTalk to usPricing

One workspace for everything your business runs on — your team, customers, store, marketing and payouts in one place.

Get started

Product

  • All products
  • Pricing
  • What's new
  • Security

Resources

  • Documentation
  • Guides
  • Use cases
  • Blog
  • Get support

Company

  • About
  • Careers
  • Contact us
  • Talk to the team

Legal

  • Privacy
  • Terms
  • Cookie policy
  • GDPR
  • Report a vulnerability

© 2026 Mercestack. All rights reserved.

Mercestack StructureOS

mercestack