Connecting Mailgun to PartnerStack
Mailgun is developer-facing email infrastructure, which means the sending logic lives in your application and the marketing team frequently does not know what is being sent or when. 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 Mailgun message 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
PartnerStack referral keys lost at Mailgun email verification
When signups need a Mailgun verification click, write the PartnerStack referral key to the pending signup server-side at form submission, so the account inherits it even if verification happens on another device. Report the customer from your backend with your stable customer ID, and send recurring revenue, churn and downgrades from billing, not from Mailgun dunning emails.
In a SaaS signup that requires email verification, the PartnerStack referral key is in the browser when the form is submitted, and the account is often only created when the person clicks the Mailgun verification email. If that click happens on a phone or a different browser, the cookie holding the key is not there, the account is created without it, and the partner loses the whole subscription.
Write the referral key to the pending signup record at form submission, server-side, before the verification email is sent. When the verification link is clicked, the account inherits the key from the pending record, not from whatever cookie the clicking browser has. Then report the customer to PartnerStack from your backend with that key and your stable customer ID.
Revenue comes from billing, not email. Mailgun likely sends your invoices and failed-payment dunning, but PartnerStack needs recurring revenue as it is recognized from your billing system, and churn or downgrades as they happen. A dunning email from Mailgun is not a cancellation; report the subscription ending only when billing actually ends it, or partners will see commission stop and restart on accounts that recovered.
Mailgun → PartnerStack · what breaks
Why this join usually fails — Mailgun → PartnerStack
- 01
The PartnerStack referral key never reaches Mailgun
No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool.
- 02
Nobody able to say why a message was sent
When send logic lives in application code, the marketing team cannot audit it and the engineering team is not thinking about attribution. Messages accumulate, nobody owns the list, and any analysis of email's contribution is unreliable.
- 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.
- 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.
Mailgun → PartnerStack · the fix
What working looks like — Mailgun → PartnerStack
The PartnerStack referral key on every message
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
Mailgun → PartnerStack · architecture
How Mailgun and PartnerStack actually connect
- 1
Mailgun holds the truth
Because sends are triggered in code, the only reliable description of why a message went out lives in your application, not in Mailgun's logs.
- 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
The identifier is the bridge
The PartnerStack referral key, captured at the visit and carried into the Mailgun message.
- 4
The event source decides reliability
Send orders. Use Mailgun events for deliverability monitoring only.
- 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.
Mailgun → PartnerStack · normal or broken
Working vs. broken, side by side — Mailgun → PartnerStack
Normal, not a fault
The PartnerStack referral key present on the message
Sent from your order system
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
No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool.
Sent from the browser
When send logic lives in application code, the marketing team cannot audit it and the engineering team is not thinking about attribution. Messages accumulate, nobody owns the list, and any analysis of email's contribution is unreliable.
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
Mailgun → PartnerStack · diagnose
Diagnostic order — Mailgun → PartnerStack
- 01
Count messages carrying the PartnerStack referral key
- 02
Follow one real conversion end to end
- 03
Inventory every code path that triggers a send
Usually the first time anyone has, and it frequently finds sends nobody remembers building.
- 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.
- 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.
Mailgun → PartnerStack · prove
How it gets proven — Mailgun → PartnerStack
Source of truth
Your application's own record of what triggered the send, joined to the order.
- The PartnerStack referral key confirmed present on a live message.
- Commissionable recurring revenue reconciled against active subscriptions in billing, with cancellations proven to reverse.
- Orders reconciled against imported conversions, with the send inventory documented.
Mailgun → PartnerStack · free audit
What we check in the free audit
- Count messages carrying the PartnerStack referral key
- Follow one real conversion end to end
- Inventory every code path that triggers a send
- Check whether churn events reach PartnerStack at all
- Read the match rate, not the success message
Checked against
Your application's own record of what triggered the send, joined to the order.
Free30 minutesNo obligation
Mailgun → PartnerStack · when not to buy
When you don't need this — Mailgun → PartnerStack
- Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the PartnerStack referral key.
- Deliverability monitoring is the right use of Mailgun's data. Attribution belongs at the order.
- 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.
Mailgun → PartnerStack · what we deliver
What gets built — Mailgun → PartnerStack
Identifier capture into Mailgun
Record the trigger reason on the message in your own system and attribute at the order.
Event source: your order system
Send orders. Use Mailgun events for deliverability monitoring only.
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 reverse at the order.
Written guarantee
95%+ tracking accuracy
Measured against Your application's own record of what triggered the send, joined to the order.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Mailgun → PartnerStack questions, answered
Because verification often happens on a different device, where the referral cookie is absent. Save the key to the pending signup server-side when the form is submitted.
No. Only report a subscription change when your billing system actually cancels or changes it.
Almost always because the PartnerStack referral key never reached the Mailgun message. No session, no click, and the trigger conditions are buried in application code rather than in a campaign tool. Measure coverage before debugging the dispatch.
PartnerStack attributes through a referral key carried on the link and stored against the customer. Because commissions are frequently paid on recurring revenue for the life of the subscription, losing the key does not cost a partner one commission — it costs them the whole relationship's worth, and produces a dispute you cannot resolve after the fact.
Your order system. Send orders. Use Mailgun events for deliverability monitoring only.
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.
More on Mailgun → PartnerStack
- Stripe → PartnerStackConnecting Stripe to PartnerStack
- PayPal → PartnerStackConnecting PayPal to PartnerStack
- Shopify → PartnerStackConnecting Shopify to PartnerStack
RELATED GUIDES
Where Mailgun → PartnerStack fits in the rest of your tracking
- Postmark → PartnerStackConnecting Postmark to PartnerStack
- Resend → PartnerStackConnecting Resend to PartnerStack
- SendGrid → PartnerStackConnecting SendGrid to PartnerStack
- Mailgun → ImpactConnecting Mailgun to Impact.com
- Mailgun → AwinConnecting Mailgun to Awin
- EcommerceConversion tracking for ecommerce brands, measured against your orders
Free · 30 min
Get Mailgun and PartnerStack joined properly
Free30 minutesNo obligation
