Skip to main content
Medusa → PartnerStackIntegration guide

Connecting Medusa to PartnerStack

Medusa is a Node commerce engine you extend in your own codebase, which makes the conversion event a piece of application code — and therefore something that can be tested rather than hoped for. PartnerStack commissions partners on recurring subscription revenue rather than on a single order, which makes it the one destination here where a conversion you send creates a payment obligation that repeats every month. The join between them succeeds or fails on one thing: whether the PartnerStack referral key reaches the Medusa order before the conversion happens, because PartnerStack can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Medusa to PartnerStack: a fit only if you sell subscriptions

A poor fit for one-off orders; use it for Medusa subscriptions or replenishment. Capture the referral key in cart metadata, then copy it to the customer's metadata on first capture so renewals inherit it, requiring accounts or keying on email for guests. Report each captured renewal, and send refunds and cancellations so commission stops.

PartnerStack is built around recurring revenue, and a standard Medusa store sells one-off orders. If that is your model, PartnerStack is a poor fit and a per-order affiliate network suits you better. It earns its place when Medusa is running a subscription or replenishment offer, where a partner should be paid on every renewal the referred customer makes.

In that case the referral key has to live on the customer, not just the cart. Capture it into cart metadata at first touch, then on the first captured payment copy it to the Medusa customer's metadata so later orders and renewals inherit it. Guest checkout breaks this, because there is no customer record to hold the key; either require an account for subscription products or key the stored referral on normalized email. Report each captured renewal payment with the customer identifier and the amount Medusa actually took.

The reversal path is where real money leaks. Medusa's refund event and your subscription cancellation logic both need to reach PartnerStack, otherwise partners keep accruing commission on customers who stopped paying. Test the cancellation path with a real test customer before launch; it is usually the half nobody builds.

Medusa → PartnerStack · what breaks

Why this join usually fails — Medusa → PartnerStack

  1. 01

    The PartnerStack referral key never reaches Medusa

    The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.

  2. 02

    Firing on order placed rather than payment captured

    They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.

  3. 03

    A commission that recurs on revenue that stopped

    The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.

  4. 04

    Nothing reconciles afterwards

    PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.

Medusa → PartnerStack · the fix

What working looks like — Medusa → PartnerStack

  • The PartnerStack referral key on every order

  • Conversions arriving in PartnerStack

    The customer is attributed to a partner, and commission accrues against the recognized revenue on the schedule you configured.

  • Reconciled against the source

Medusa → PartnerStack · architecture

How Medusa and PartnerStack actually connect

  1. 1

    Medusa holds the truth

    Because you own the event handlers, the conversion can fire from the payment-captured event specifically rather than from whatever the frontend happened to render.

  2. 2

    PartnerStack needs a click to match

    PartnerStack needs the referral key, the customer identifier and the subscription value. Recurring commission also needs the ongoing revenue reported, not just the first payment.

  3. 3

    The identifier is the bridge

    The PartnerStack referral key, captured at the visit and carried into the Medusa order.

  4. 4

    The event source decides reliability

    Send orders at payment capture, at the paid total.

  5. 5

    Deduplication at the destination

    Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.

Medusa → PartnerStack · normal or broken

Working vs. broken, side by side — Medusa → PartnerStack

Normal, not a fault

  • The PartnerStack referral key present on the order

  • Sent from a Medusa subscriber on order payment capture

  • Deduplicated correctly

    Deduplication is on your customer identifier. Reporting the same subscription twice creates two commissionable relationships against one paying customer, and the error compounds monthly rather than once.

  • Reconciles with the source

Actually broken

  • The PartnerStack referral key missing on most records

    The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.

  • Sent from the browser

    They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.

  • Counted twice, or not at all

    The mirror of the usual problem. If cancellations are not reported back, partners keep earning on subscriptions that churned months ago. Every conversion pipeline needs reversals; this one needs them because real money leaves the building otherwise.

  • Nobody has reconciled it

Medusa → PartnerStack · diagnose

Diagnostic order — Medusa → PartnerStack

  1. 01

    Count orders carrying the PartnerStack referral key

  2. 02

    Follow one real conversion end to end

  3. 03

    Check which event your subscriber listens to

    One line of code, and it decides whether you are counting orders or counting money.

  4. 04

    Check whether churn events reach PartnerStack at all

    In most implementations the new-subscription path was built and the cancellation path was not, because only one of them is exciting.

  5. 05

    Read the match rate, not the success message

    PartnerStack shows attributed customers and accruing commission per partner. Reconcile the commissionable revenue against your billing system's active subscriptions, not against its historical sales.

Medusa → PartnerStack · prove

How it gets proven — Medusa → PartnerStack

Source of truth

Medusa orders by payment status, emitted from your own subscriber code.

  • The PartnerStack referral key confirmed present on a live order.
  • Commissionable recurring revenue reconciled against active subscriptions in billing, with cancellations proven to reverse.
  • Payment-captured orders reconciled against imported conversions.

Medusa → PartnerStack · free audit

What we check in the free audit

  • Count orders carrying the PartnerStack referral key
  • Follow one real conversion end to end
  • Check which event your subscriber listens to
  • Check whether churn events reach PartnerStack at all
  • Read the match rate, not the success message

Checked against

Medusa orders by payment status, emitted from your own subscriber code.

Get my free conversion tracking audit

Free30 minutesNo obligation

Medusa → PartnerStack · when not to buy

When you don't need this — Medusa → PartnerStack

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the PartnerStack referral key.
  • If every payment method you accept is instant, the two events nearly coincide and the distinction costs more than it returns.
  • If you run no partner or affiliate programme, there is nothing to send here. If you run one on one-off sales rather than subscriptions, the recurring-commission complexity does not apply to you.

Medusa → PartnerStack · what we deliver

What gets built — Medusa → PartnerStack

  • Identifier capture into Medusa

    Write the identifier into cart metadata at first touch so it is carried onto the order automatically at completion.

  • Event source: a Medusa subscriber on order payment capture

    Send orders at payment capture, at the paid total.

  • Dispatch to PartnerStack

    Server-side reporting from your billing system, with the referral key, customer identifier and the recurring revenue as it is recognized.

  • Reversals where they exist

    Refunds emit their own event and should reverse.

Written guarantee

95%+ tracking accuracy

Measured against Medusa orders by payment status, emitted from your own subscriber code.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Medusa → PartnerStack questions, answered

You can, but it is built for recurring commission, so most of its value goes unused. A per-order affiliate network fits that model better.

Free · 30 min

Get Medusa and PartnerStack joined properly

Free30 minutesNo obligation