Integration Module 2.0 for Medusa is outRead the announcement
Packeta logo

Packeta

Packeta (Zásilkovna) fulfillment provider for Medusa v2 — pickup points, Z-BOX, home delivery, COD, labels, tracking, returns

npm install medusa-plugin-packeta
Category
Built by
Regions
Service
Version
0.1.2
Last updated
1 month ago
Monthly downloads
Loading downloads

Packeta

medusa-plugin-packeta

npm CI license

Packeta (Zásilkovna) fulfillment provider for Medusa v2 — pickup points (Z-Point, Z-BOX, external carrier PUDOs), home delivery through Packeta's carrier network across Europe, cash on delivery, labels (PDF/ZPL, Packeta or carrier), push tracking, returns via the claim assistant, plus an admin UI and a storefront widget helper.

Disclaimer: This is an unofficial, community-built integration. It is not affiliated with, endorsed by, or maintained by Packeta s.r.o. / Zásilkovna s.r.o. "Packeta", "Zásilkovna" and their logos are trademarks of their respective owners, used here only to identify the service this plugin integrates with.

npm | Packeta API docs | Medusa Fulfillment Module

Features

  • Fulfillment options: (any Packeta / partner pickup point chosen in the widget), (Packeta home-delivery carrier picked from the shipping country), , and — optionally — one option per carrier from Packeta's live carrier feed (), so you can price Z-BOX, PPL ParcelShop, InPost, DHL … separately.
  • Checkout validation: the selected pickup point is re-validated server-side against Packeta's widget validate endpoint (exists, allowed for your account, currently accepting packets).
  • Packets: on fulfillment with COD, insured value, weight from variant weights (product weight as fallback), note, earliest delivery date, adult content, dimensions, carrier services, customs declarations for non-EU carriers.
  • COD decided automatically from the order's payment provider ( by default), overridable per packet in the admin.
  • Labels: Packeta PDF (all formats), ZPL (203/300 dpi), external carrier PDF/ZPL, bulk PDF for many packets. Tracking number + label link attached to the Medusa fulfillment.
  • Tracking: signed push-tracking webhook () + a polling job fallback; statuses mark the Medusa fulfillment shipped / delivered automatically.
  • Cancel packets (and the fulfillment) before hand-over; returns create claim-assistant packets with a drop-off password.
  • Admin UI (EN/CS): order-page card with status, destination, COD, labels, refresh, cancel, "Create packet" (split orders into several packets); page listing all packets with filters, bulk label printing and integration health.
  • Storefront helper : dependency-free wrapper around Packeta widget v6 + HD widget that returns exactly the this provider expects.
  • Zero runtime dependencies (fetch + ).

Install

Configure

The same options object is passed to the fulfillment provider and to the plugin's module (routes/workflows use the module, the checkout uses the provider). The plugin entry loads the API routes, subscribers, job and admin UI.

Then run the plugin's migration (creates the table):

npx medusa db:migrate

The provider is registered as . In the admin: Settings → Locations & Shipping → your location → Fulfillment providers → add Packeta, then create shipping options for the service zone choosing the Packeta fulfillment options (pickup / home delivery / per-carrier). Prices are flat Medusa prices — Packeta has no price API.

Options

OptionRequiredDefaultDescription
yes—REST API password (client section → Support).
yes—API key used by the carrier feed, the widget and the widget validate endpoint.
yes—Sender indication. Use a dedicated test sender while integrating — Packeta has no sandbox.
noPayment provider ids that mean cash on delivery.
noPacket weight when no line has a variant or product weight.
noAdded to the summed line weights (grams).
no, , , , , .
noAdd one fulfillment option per carrier from the feed.
noCarrier ids to expose () or .
noCarrier feed cache TTL.
noValidate the chosen point through Packeta at checkout.
no—Push-tracking signing key. Without it the webhook answers 503.
noAccept unsigned webhooks (local development only; ignored in production).
noMax age of a webhook timestamp before it is treated as a replay.
no / placeholders.
noPacketa status ids that mark the fulfillment shipped.
noStatus ids that mark it delivered.
no— in mm, used when a carrier requires dimensions.
no— for non-EU carriers (see Customs).
noInsured value for return claims when none is passed.
/ / / no / / / Status polling job (fallback for push tracking).
, , noPacketa production URLsOverridable for tests.

Environment

Storefront

Packeta pickup points are chosen in Packeta's widget on your storefront. Pass the selection as the shipping method ; the provider validates and normalises it.

The contract (what produces) if you drive the widget yourself:

returns the public carrier list (, , , , , , ) and — handy for widget filters. See for a Next.js starter walkthrough.

Admin

  • Order page → Packeta card: packet barcode, status, destination, COD/value/weight, tracking link, label menu (PDF, ZPL, carrier PDF/ZPL), refresh, cancel, return password. Create packet opens a drawer to choose items (split into several packets), COD, weight, note, earliest delivery date, adult content and dimensions.
  • Packeta page (sidebar): all packets with search/filters, bulk Print labels, bulk Refresh, and health badges (API password, feed, webhook).
  • Fulfilling an order the native way (Fulfill items) also creates the packet — the plugin mirrors it into and attaches the tracking label.
  • The admin UI is in English and Czech (follows the browser language).

Admin API

Route
= packet id, barcode or record id
`?type=pdf
→ one PDF
pull status from Packeta
cancel at Packeta + Medusa fulfillment
carrier feed ()
credentials / feed / webhook status

How it works

  1. Checkout — receives the widget selection, checks it with Packeta's validate endpoint (pickup) or resolves the home-delivery carrier for the shipping country, and stores a normalised on the shipping method.
  2. — a subscriber looks at the payment provider; COD orders get (the fulfillment provider cannot see payments itself).
  3. Fulfillment — maps order + shipping data to Packeta (recipient, destination, value, weight, COD, note, size, customs). The packet id/barcode land in ; a subscriber mirrors them into and attaches the tracking label to the fulfillment.
  4. Tracking — Packeta pushes status events to (HMAC-SHA256 signed, deduplicated by event id). //… mark the fulfillment shipped, marks it delivered. The polling job does the same for stores without push tracking.
  5. Cancel — before hand-over, at Packeta and the fulfillment is cancelled in Medusa. Afterwards Packeta refuses () and so does the plugin.
  6. Returns — a return shipping option using creates a claim-assistant packet (); the customer drops it at any pickup point with the password shown in the admin (Packeta e-mails it too when the return has an e-mail).

Storefront contract (driving the widget yourself)

When you don't use , map the widget v6 object exactly like this, or the packet goes to the wrong destination:

Widget Shipping-method Notes
(Z-Point, Z-BOX)Required. Becomes in .
(partner PUDO), Both required; do not send as for these — it is not a Packeta point and the packet would be rejected or misrouted. Sent as + .
/, , , , , Display snapshot only (admin card, order e-mails). Validated server-side and filled from Packeta when is on.
— (optional)Packet note, max 128 chars, and stripped.

Also required on the cart: a shipping address with (picks the region and, for home delivery, the carrier), customer , and a on the shipping address — Packeta notifies the recipient by e-mail/SMS. For a pickup point, setting the cart shipping address to the point's address is fine; the packet destination comes from , never from the address. Home delivery needs nothing in : the cart's / (house number), , and are used and the carrier is resolved from the live feed for the country.

Push tracking (webhook)

Packeta enables webhooks per account: e-mail integrations@packeta.com with your HTTPS URL

https://<your-backend>/hooks/packeta

and they issue a signing key → . Requests are verified with in constant time and the timestamp must be within (5 min) of the server clock — unsigned, tampered or replayed requests get 401, unknown packets get 200 (so Packeta stops retrying), and a failure storing a known packet's status answers 500 so Packeta redelivers it. The status is stored before the fulfillment is marked shipped / delivered, so a rejected fulfillment update never loses it: a permanent rejection ( / / , e.g. a cancelled order) is logged with 200, a transient one answers 500 and the event is re-run on redelivery. The pull job and the admin Refresh button use the same split ( in ). Events are deduplicated by , and a late/replayed event can never move a delivered / returned / cancelled packet backwards. Until the key is configured, the polling job (every 30 min by default, ) keeps statuses fresh. is for local development only and is ignored when .

Cash on delivery

COD is applied when the order's payment provider is in (default: Medusa's manual ): is set to at . The admin "Create packet" drawer shows the detected state and lets you override amount/off. Carriers with reject COD packets with a clear error.

Split shipments (several packets per order, from the drawer or native partial fulfillments): the customer pays the order once — the first packet carries the full COD, after which the flag flips to (with ) and every later packet is created with COD 0 unless you pass explicitly. Each packet is insured for the value of the items it carries (plus shipping on the first one) and follow-up packets get a , reference.

Customs (non-EU)

For carriers flagged in the feed the plugin sends (ead, deliveryCost, invoiceNumber, invoiceIssueDate) and built from the order lines (variant/product , , title, value, units, weight). Configure ( default), fallbacks (, ) and pass per-packet extras (, , , ) via when creating the fulfillment programmatically. See Packeta's customs documentation.

Storefront-agnostic notes

  • Provider id: ; fulfillment option ids: , , , .
  • Weight: Medusa variant / product is treated as grams; the variant wins, the product weight is the fallback. The admin Create packet flow resolves both. Medusa's native Create fulfillment only loads , so set weights on variants (or use the Packeta drawer) if you rely on that flow.
  • Amounts: Medusa v2 major units map 1:1 to Packeta /. Currencies other than CZK/EUR/HUF/PLN/RON fall back to the destination country's currency.
  • Phone numbers must be in Packeta's accepted formats (E.164 recommended).

Development

Live smoke against your Packeta account (creates and cancels a real, free packet — use a test sender):

Try it inside a Medusa app without publishing: builds, packs and installs the tarball, then follow the config above.

License

MIT

This project is an independent, unofficial integration and is not affiliated with or endorsed by Packeta s.r.o. / Zásilkovna s.r.o. All Packeta and Zásilkovna trademarks and logos are the property of their respective owners.