• Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаСтартерыЗапускайте проекты быстрее с готовыми решениями
ЭкспертыПодберите специалиста для разработки и развития вашего проекта на MedusaКейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Меч Moscow
Комплексная e-commerce платформа на Medusa для московского fashion-бренда

Меч Moscow · Fashion

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Стартеры
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
Mondial Relay logo

Mondial Relay

Доставляйте заказы с Mondial Relay

npm install medusa-mondialrelay
Категория
Доставка
Создано
Theodaguier
Версия
1.0.14
Последнее обновление
7 месяцев назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
0
npmNPM

medusa-mondialrelay

A Medusa v2 fulfillment provider plugin for Mondial Relay shipping services. Supports both Point Relais (pickup point) and Home Delivery options with real-time pricing via @frontboi/mondial-relay.

Features

  • 🏪 Point Relais - Pickup point delivery with interactive selector
  • 🏠 Home Delivery - Door-to-door delivery (+3€ surcharge)
  • 💰 Real Pricing - Uses official Mondial Relay pricing via
  • 🌍 Multi-country - FR, BE, LU, NL, ES, PT, DE, IT, AT
  • 🏷️ Label Generation - PDF shipping label creation
  • 📦 Shipment Tracking - Tracking number generation
  • 🖨️ Admin Widget - Print labels directly from order details

Requirements

  • Medusa v2.0+
  • Node.js 18+
  • Mondial Relay API credentials (contact Mondial Relay for API access)

Installation

npm install medusa-mondialrelay

Configuration

1. Add the plugin to medusa-config.ts

1// medusa-config.ts
2import { defineConfig, loadEnv } from "@medusajs/framework/utils"
3
4loadEnv(process.env.NODE_ENV || "development", process.cwd())
5
6module.exports = defineConfig({
7 projectConfig: {
8 databaseUrl: process.env.DATABASE_URL,
9 http: {
10 storeCors: process.env.STORE_CORS!,
11 adminCors: process.env.ADMIN_CORS!,
12 authCors: process.env.AUTH_CORS!,
13 jwtSecret: process.env.JWT_SECRET || "supersecret",
14 cookieSecret: process.env.COOKIE_SECRET || "supersecret",
15 },
16 },
17
18 // Register the plugin
19 plugins: [
20 {
21 resolve: "medusa-mondialrelay",
22 options: {},
23 },
24 ],
25
26 // Configure the fulfillment module with the provider
27 modules: [
28 {
29 resolve: "@medusajs/medusa/fulfillment",
30 options: {
31 providers: [
32 // Default manual provider (optional)
33 {
34 resolve: "@medusajs/medusa/fulfillment-manual",
35 id: "manual",
36 },
37 // Mondial Relay provider
38 {
39 resolve: "medusa-mondialrelay",
40 id: "mondialrelay",
41 options: {
42 apiBaseUrl: process.env.MONDIAL_RELAY_API_BASE_URL,
43 culture: process.env.MONDIAL_RELAY_CULTURE || "fr-FR",
44 login: process.env.MONDIAL_RELAY_LOGIN,
45 password: process.env.MONDIAL_RELAY_PASSWORD,
46 customerId: process.env.MONDIAL_RELAY_CUSTOMER_ID,
47 businessAddress: {
48 title: "Mr",
49 firstname: process.env.BUSINESS_FIRSTNAME,
50 lastname: process.env.BUSINESS_LASTNAME,
51 streetname: process.env.BUSINESS_STREET,
52 countryCode: process.env.BUSINESS_COUNTRY || "FR",
53 postCode: process.env.BUSINESS_POSTCODE,
54 city: process.env.BUSINESS_CITY,
55 addressAdd1: "",
56 addressAdd2: "",
57 mobileNo: process.env.BUSINESS_PHONE,
58 email: process.env.BUSINESS_EMAIL,
59 returnLocation: process.env.MONDIAL_RELAY_RETURN_LOCATION || "",
60 },
61 // Optional: Free shipping when cart total >= this amount (in euros)
62 freeShippingThreshold: 50,
63 // Optional: Which delivery types get free shipping ("all" | "pickup" | "home")
64 freeShippingAppliesTo: "all",
65 },
66 },
67 ],
68 },
69 },
70 ],
71})

Important: You need to register the plugin in both (for admin extensions) and (for the fulfillment provider).

2. Environment Variables

Create or update your file:

1# Mondial Relay API Credentials
2MONDIAL_RELAY_LOGIN=your_login
3MONDIAL_RELAY_PASSWORD=your_password
4MONDIAL_RELAY_CUSTOMER_ID=your_customer_id
5MONDIAL_RELAY_CULTURE=fr-FR
6MONDIAL_RELAY_API_URL=https://api.mondialrelay.com/Web_Services.asmx
7
8# Business Address (sender)
9BUSINESS_FIRSTNAME=John
10BUSINESS_LASTNAME=Doe
11BUSINESS_STREET=123 Main Street
12BUSINESS_POSTCODE=75001
13BUSINESS_CITY=Paris
14BUSINESS_COUNTRY=FR
15BUSINESS_EMAIL=contact@yourstore.com
16BUSINESS_PHONE=0612345678

3. Create Shipping Options

In the Medusa Admin, create shipping options:

Point Relais Option

  1. Go to Settings → Locations & Shipping
  2. Select your location and add a shipping option
  3. Set:
    • Name:
    • Price Type:
    • Fulfillment Provider:

Home Delivery Option

  1. Create another shipping option
  2. Set:
    • Name:
    • Price Type:
    • Fulfillment Provider:

Note: The plugin automatically applies +3€ surcharge for home delivery options.

Free Shipping

Configuration

You can configure a cart total threshold above which shipping becomes free:

1// In medusa-config.ts, provider options:
2options: {
3 // ... other options
4 freeShippingThreshold: 50, // Free shipping when cart >= 50€
5 freeShippingAppliesTo: "all", // "all" | "pickup" | "home"
6}

Options

OptionTypeDefaultDescription
Cart total (in euros) above which shipping is free
Which delivery types get free shipping

Free Shipping Modes

  • (default): Free shipping applies to both Point Relais and Home Delivery
  • : Free shipping only for Point Relais (Home Delivery still charged)
  • : Free shipping only for Home Delivery (Point Relais still charged)

Examples

1// Free shipping for ALL delivery types when cart >= 50€
2options: {
3 freeShippingThreshold: 50,
4 freeShippingAppliesTo: "all", // or omit (default)
5}
6
7// Free shipping ONLY for Point Relais when cart >= 50€
8// Home delivery still has normal pricing
9options: {
10 freeShippingThreshold: 50,
11 freeShippingAppliesTo: "pickup",
12}
13
14// Free shipping ONLY for Home Delivery when cart >= 100€
15// Point Relais still has normal pricing
16options: {
17 freeShippingThreshold: 100,
18 freeShippingAppliesTo: "home",
19}

Storefront Integration

Pass the cart total when setting the shipping method:

1await setShippingMethod({
2 cartId: cart.id,
3 shippingMethodId: selectedOptionId,
4 data: {
5 shipping_option_name: "Mondial Relay - Point Relais",
6 cart_total: cart.total / 100, // Convert from cents to euros
7 // ... other data
8 }
9})

When and the delivery type matches , the shipping cost will be 0€.

Pricing

Real-time Pricing via @frontboi/mondial-relay

The plugin uses for official Mondial Relay pricing based on:

  • Package weight (250g to 30kg)
  • Destination country (FR, BE, LU, NL, ES, PT, DE, IT, AT)

Home Delivery Surcharge

Home delivery options automatically add a +3€ surcharge to the base Point Relais price.

Example Prices (France)

WeightPoint RelaisHome Delivery
500g~3.99€~6.99€
1kg~4.49€~7.49€
2kg~5.49€~8.49€
5kg~7.99€~10.99€

Prices are fetched in real-time from Mondial Relay's official pricing grid.

Storefront Integration

Point Relais Selector

For Point Relais delivery, integrate a pickup point selector. The plugin expects:

1await setShippingMethod({
2 cartId: cart.id,
3 shippingMethodId: selectedOptionId,
4 data: {
5 shipping_option_name: "Mondial Relay - Point Relais",
6 parcel_shop_id: "020340",
7 parcel_shop_name: "Relay Shop Name",
8 parcel_shop_address: "123 Shop Street",
9 parcel_shop_city: "Paris",
10 parcel_shop_postcode: "75001",
11 }
12})

Recommended: @frontboi/mondial-relay

npm install @frontboi/mondial-relay
1import { ParcelShopSelector } from "@frontboi/mondial-relay"
2
3<ParcelShopSelector
4 postalCode="75001"
5 countryCode="FR"
6 brandIdAPI={process.env.NEXT_PUBLIC_MONDIAL_RELAY_BRAND_ID}
7 onParcelShopSelected={(shop) => {
8 // Handle selection
9 }}
10/>

Home Delivery

1await setShippingMethod({
2 cartId: cart.id,
3 shippingMethodId: selectedOptionId,
4 data: {
5 shipping_option_name: "Mondial Relay - Livraison à Domicile",
6 }
7})

Admin Features

Label Printing Widget

The plugin adds a widget to the order details page for:

  • ✅ Tracking number display
  • ✅ Pickup point info (if applicable)
  • 🖨️ "Print Label" button for PDF download

Supported Countries

CodeCountry
FRFrance
BEBelgium
LULuxembourg
NLNetherlands
ESSpain
PTPortugal
DEGermany
ITItaly
ATAustria

License

MIT © Théo Daguier

Links

  • � NPM Package
  • � GitHub Repository
  • 📧 Contact: theo.daguier@icloud.com

Еще в этой категории

Посмотреть все
Доставка
DHL eCommerce logo

DHL eCommerce

От Mitchellston

Выполняйте заказы с помощью DHL eCommerce

Загрузка данных
GitHubnpm
Доставка
ApiShip logo

ApiShip

От Gorgo

Подключите доставку несколькими перевозчиками

Загрузка данных
GitHubnpm
Доставка
FedEx logo

FedEx

От Igor Ludgero Miura

Автоматизируйте доставку через FedEx

Загрузка данных
GitHubnpm