The production-ready Medusa DTC Starter is outRead the announcement
M

Medusa

Finbaze Medusa plugin: tax quoting, product sync, and sales invoice order sync.

npm install @finbaze/medusa
Category
Built by
Version
0.1.4
Last updated
3 months ago
Monthly downloads
Loading downloads

@finbaze/medusa

Medusa v2 plugin that connects a merchant store to Finbaze:

  • Tax Module Provider — checkout tax lines via Finbaze (profile obligations + imported products)
  • Product sync — Medusa variants → Finbaze products ( by , HS → )
  • Order sync — Shopify-parity invoices: draft on place/update, close+send when fulfilled, historical close without send, cancel/refund credits. Invoice is left empty (Finbaze assigns on close); Medusa goes in . Amounts are converted from Medusa major units to Finbaze minor units.

Install

In your Medusa application:

Then migrate:

Assign each tax region that should use Finbaze to provider id (Medusa stores providers as ).

Environment

See .

, , and default to production (, , ). Override only for local Finbaze or a custom client.

VariablePurpose
Public Medusa URL for OAuth callback
Logical store key for link tables
Optional. Only for client-credentials refresh on hosted installs

Public / open-source installs (no client secret)

OAuth uses PKCE ( + ). You do not need a published .

Minimum env:

When the access token expires without a secret configured, reconnect via Admin (no silent client_credentials refresh).

OAuth redirect URI (seeded on ):

(or )

Admin

Open Finbaze in Medusa Admin ():

  1. Connect Finbaze — PKCE OAuth against (public client: no secret)
  2. Sync products — one Finbaze product per Medusa variant + (prices via Query / Pricing Module)
  3. Import historical orders — draft/close with when fulfilled
  4. Imported invoices () — paginated list of synced orders (Shopify-parity)
  5. Settings () — after disconnect, Clear local DB links wipes Medusa-side / / credits / cursors / connection (debug only; does not delete Finbaze data)

Product / variant mapping

Finbaze has no variant entity: each Medusa variant becomes its own Finbaze product (SKU, EAN, prices). stores both (unique) and (tax fallback when Medusa only passes ).

Product HS metadata

On Medusa products (or variants), set metadata:

  • or

On first create of each variant, the plugin calls for the profile’s sell-to countries.

Tax quote contract

  • Auth: for quote; for product CRUD
  • Shipping lines are sent with
  • Item lines map Medusa → Finbaze via (tax provider falls back to when variant is unavailable)

Lifecycle (orders)

EventBehavior
/ Create/update draft sales invoice (+ on lines when linked)
Fulfillment / completed
Historical import + fulfilledClose with
Credit closed invoice / delete draft
RefundCredit invoice +

Package layout

Development (this repo)

In the Medusa app: .