Printful → Medusa v2 plugin: product sync, auto fulfillment, and admin tools
Printful → Medusa v2 plugin: sync Store Products, auto-create Printful orders on payment capture, and a Fulfillment Provider for admin shipping options.
MIT licensed.
npm install @legenki/print2medusaRegister the plugin and fulfillment provider in :
1plugins: [2 {3 resolve: "@legenki/print2medusa",4 options: {5 apiToken: process.env.PRINTFUL_API_TOKEN,6 storeId: process.env.PRINTFUL_STORE_ID, // required for account-level tokens7 // autoSubmitOrders: true,8 // createOnOrderPlaced: false,9 // allowPartialOrders: false,10 // markupPercent: 30,11 // defaultCurrency: "USD",12 },13 },14],15modules: [16 {17 resolve: "@medusajs/medusa/fulfillment",18 options: {19 providers: [20 {21 resolve: "@medusajs/medusa/fulfillment-manual",22 id: "manual",23 },24 {25 resolve: "@legenki/print2medusa/providers/printful-fulfillment",26 id: "printful",27 options: {28 apiToken: process.env.PRINTFUL_API_TOKEN,29 storeId: process.env.PRINTFUL_STORE_ID,30 },31 },32 ],33 },34 },35],Then migrate:
npx medusa db:migrateSee for a fuller snippet.
| Feature | How |
|---|---|
| Product sync | Admin Sync Now or → workflow pulls Printful Sync Products into Medusa |
| Links | / (+ metadata IDs) |
| Orders | On → creates Printful order with |
| Fulfillment provider | Select Printful shipping option in Admin locations |
| Status | + product list widget |
1npm install2npm run build3npm run dev # watch + yalc publish4npm test5npm run typecheckIn a host Medusa app:
npx medusa plugin:add @legenki/print2medusa| Option | Description |
|---|---|
| Printful private token (required) | |
| for account-level tokens | |
| Confirm orders for fulfillment (default true) | |
| Also create Printful order on | |
| Allow orders that mix Printful + non-Printful items | |
| Markup on retail prices during sync | |
| Fallback currency code |
MIT © Andy Legenki