MedusaJS v2 fulfillment provider plugin for Colissimo shipping (La Poste France)
Colissimo fulfillment provider for MedusaJS v2.
| Option ID | Product Code | Description |
|---|---|---|
| Home delivery | ||
| Home delivery with signature | ||
| Relay point delivery | ||
| Return shipment (optional) |
pnpm add medusa-colissimo
COLISSIMO_CONTRACT_NUMBER=your_contract_numberCOLISSIMO_PASSWORD=your_passwordBUSINESS_NAME="Your Company"BUSINESS_STREET="123 Rue Example"BUSINESS_CITY="Paris"BUSINESS_POSTCODE="75001"
Get your credentials from Colissimo Box.
// medusa-config.tsmodule.exports = defineConfig({// Register plugin for API routes and admin extensionsplugins: [{resolve: "medusa-colissimo",options: {},},],// Register fulfillment providermodules: [{resolve: "@medusajs/medusa/fulfillment",options: {providers: [{resolve: "medusa-colissimo/providers/colissimo",id: "colissimo",options: {contractNumber: process.env.COLISSIMO_CONTRACT_NUMBER,password: process.env.COLISSIMO_PASSWORD,businessAddress: {companyName: process.env.BUSINESS_NAME,line2: process.env.BUSINESS_STREET,city: process.env.BUSINESS_CITY,zipCode: process.env.BUSINESS_POSTCODE,countryCode: "FR",},// OptionalenableReturns: true,enableCalculatedPricing: true,pricingTable: {DOM: {FR: [{ maxWeight: 0.25, price: 495 },{ maxWeight: 0.5, price: 615 },{ maxWeight: 1, price: 715 },{ maxWeight: 2, price: 815 },{ maxWeight: 5, price: 1095 },{ maxWeight: 10, price: 1595 },{ maxWeight: 30, price: 2295 },],},// Add DOS, A2P pricing as needed},},},],},},],});
Two widgets are included for the order details page:
Fulfillment Form (sidebar) - Select items, set weight manually if needed, create fulfillment.
Fulfillment Display (after details) - Shows tracking number, delivery type, download/print label buttons.
Products should have weights defined on their variants (in grams). If not, or if you need to override after weighing the package, check "Saisir le poids manuellement" and enter the weight in grams.
Returns a token for the Colissimo frontend widget (valid 30 minutes).
For relay point delivery, store the selected point ID in the shipping address metadata:
await medusa.carts.update(cartId, {shipping_address: {// ... address fieldsmetadata: {relay_point_id: selectedPoint.id,},},});
You can use the official Colissimo widget for relay point selection:
// Get token from your backendconst { token } = await fetch('/store/colissimo/widget-token').then(r => r.json());// Initialize widget (requires jQuery and Mapbox GL)$('#widget-container').frameColissimoOpen({URLColissimo: 'https://ws.colissimo.fr',callBackFrame: 'onPointSelected',ceCountry: 'FR',ceZipCode: customerZipCode,ceTown: customerCity,token: token});function onPointSelected(point) {// point.identifiant is the relay point ID$('#widget-container').frameColissimoClose();}
pnpm installpnpm buildpnpm test
MIT