Overview
Icon for Legal Pages & Compliance

Legal Pages & Compliance

Manage terms, privacy and Impressum pages

A lightweight, production-ready Medusa v2 plugin for managing compliance and legal disclosure pages (AGB / Terms & Conditions, Datenschutzerklärung / Privacy Policy, and Impressum / Legal Notice) directly inside the Medusa Admin panel.

✨ Features

  • 🏛️ Dedicated Medusa Admin UI: Adds a clean "Legal Pages" route to the Medusa Admin navigation bar.
  • 📝 Live Markdown Workspace: Split-screen editor with real-time customer-facing preview, formatting toolbar, and keyboard shortcuts (Copy to clipboardCmd+S / Copy to clipboardCtrl+S).
  • 📝 Multi-Document Management: Create and manage customized compliance documents (Terms & Conditions, Privacy Policy, Imprint, Revocation) with custom versioning and draft/published statuses.
  • 🚀 Dynamic App & Storefront Delivery: Public Store APIs (Copy to clipboard/store/legal-pages, Copy to clipboard/store/legal-pages/:slug) allowing React Native mobile apps and Next.js storefronts to fetch compliance texts live without waiting for App Store or Google Play reviews.
  • 🌐 Localization & Fallbacks: Built-in locale support (Copy to clipboarden, Copy to clipboardde, Copy to clipboardku) with automatic fallbacks to ensure legal screens are never blank.

📦 Installation

In your Medusa v2 backend project root:

npm install medusa-plugin-legal-pages

Or with yarn / pnpm:

yarn add medusa-plugin-legal-pages
# or
pnpm add medusa-plugin-legal-pages

⚙️ Configuration

Simply register the plugin in your Copy to clipboardmedusa-config.ts:

import { defineConfig } from "@medusajs/framework/utils"
module.exports = defineConfig({
projectConfig: {
// ... your project config
},
plugins: [
{
resolve: "medusa-plugin-legal-pages",
options: {},
},
],
})

That's it! In Medusa v2, registering the plugin automatically:

  • 🧭 Injects the Legal Pages item into your Medusa Admin sidebar navigation.
  • 📡 Exposes all Storefront & Admin REST API routes (Copy to clipboard/store/legal-pages, Copy to clipboard/admin/legal-pages).
  • 🗄️ Registers the Legal Module and database schema.

🗄️ Database Migrations

Run the database migration to create the Copy to clipboardlegal_page table and indexes:

npx medusa db:migrate

📡 Store API Reference

The plugin provides public endpoints for web storefronts and mobile apps:

GET /store/legal-pages?locale=en

Response (200 OK):

{
"legal_pages": [
{
"id": "leg_01J8ABC...",
"slug": "terms",
"title": "Terms and Conditions (GTC)",
"locale": "en",
"version": "1.0",
"updated_at": "2026-09-26T20:00:00.000Z"
},
{
"id": "leg_01J8DEF...",
"slug": "privacy-policy",
"title": "Privacy Policy (GDPR)",
"locale": "en",
"version": "1.0",
"updated_at": "2026-09-26T20:00:00.000Z"
}
]
}
GET /store/legal-pages/:slug?locale=de

Example: Copy to clipboardGET /store/legal-pages/agb

Response (200 OK):

{
"legal_page": {
"id": "leg_01J8ABC...",
"slug": "agb",
"title": "Allgemeine Geschäftsbedingungen",
"content": "# Allgemeine Geschäftsbedingungen\n\n### § 1 Geltungsbereich...",
"locale": "de",
"is_published": true,
"version": "1.0",
"updated_at": "2026-09-26T20:00:00.000Z"
}
}

📱 Mobile App (React Native / Expo) Usage Example

// services/legal.ts
const MEDUSA_BACKEND_URL = "https://api.yourstore.com"
export const fetchLegalPage = async (slug: string, locale: string = "de") => {
const res = await fetch(`${MEDUSA_BACKEND_URL}/store/legal-pages/${slug}?locale=${locale}`, {
headers: {
"x-publishable-api-key": process.env.EXPO_PUBLIC_MEDUSA_PUBLISHABLE_KEY!,
"Accept": "application/json",
},
})
if (!res.ok) return null
const data = await res.json()
return data.legal_page
}

🛠️ Contributing

Contributions and feedback are always welcome! Feel free to open an issue or submit a pull request.

📄 License

Distributed under the MIT License. See LICENSE for more information.

You may also like

Browse all integrations

Build your own

Develop your own custom integration

Build your own integration with our API to speed up your processes. Make your integration available via npm for it to be shared in our Library with the broader Medusa community.

gift card interface

Ready to build your custom commerce setup?