partner_key in the payment metadata to decide which partner should receive the commission. This means the same customer can generate commissions for different partners on different transactions.
When to use this
- A marketplace where the same buyer purchases from different sellers, each represented by a different partner
- A SaaS platform where customers can be upsold by different agencies, and each agency should earn commission on the deals they close
- A business where the referring partner is tracked at the payment level (e.g., stored in Stripe charge metadata) rather than at the customer level
Setting up
- In your affiliate program, go to Settings under Program
- In the Commission section, expand Commission options
- Under Commission attribution model, select Transaction-based
- Click Update
This setting only affects how new incoming transactions are attributed. Existing customers and commissions are not modified.
How it works
When a payment webhook arrives (or an API call is made), Partnero first finds the customer the usual way — by customer key, integration customer ID or email, or a promotion code. Then:- If the customer already existed in Partnero before this payment, Partnero reads
partner_keyfrom the payment metadata. - It finds the active partner matching that key.
- It finds or creates a customer record linked to that partner (see Customer records).
- It calculates the commission for that partner.
partner_key, the transaction goes to the partner the customer is already linked to, as in
customer-based attribution.
Customer records
To support the same real-world customer being linked to multiple partners, Partnero creates separate customer records with a composite identifier:cus_123 attributed to partner PARTNER_A becomes stripe_cus_123__pkey_PARTNER_A. This happens automatically — no action required on your part.
Examples
Imagine Stripe customercus_123, who is already in Partnero and linked to Partner A, making three separate
purchases over time.
Partner key is present
Each partner gets commission only for the transactions that carry their key. The same Stripe customer generated commissions for two different partners.
No partner key, invalid key or new customer
Integration guides
Stripe
Addpartner_key to the metadata of charges, subscriptions, invoices, or the Stripe customer object. Partnero checks all of these locations.
Checkout Session:
Paddle
Addpartner_key to the custom_data object on transactions or subscriptions.
WooCommerce
Addpartner_key to the order meta data. This can be done via a plugin, custom code, or the WooCommerce REST API.
Chargebee
Partnero reads the partner key from the Chargebee customer custom fieldscf_partnero_partner or cf_referral_code. Set these fields on the customer in Chargebee, and Partnero will use them for per-transaction attribution when transaction-based mode is enabled.
API
When using the Partnero API directly, include thepartner field in your transaction request. The customer is automatically created and linked to that partner.
If the customer already exists, the transaction goes to the partner in the request, and a separate customer record
is created for that partner if needed. If the customer doesn’t exist yet,
options.create_customer: true creates
them linked to that partner; without it, the request fails because the customer isn’t found. An unknown partner
key also makes the request fail.Where partner_key is read from
Next steps
Stripe integration
Full Stripe setup guide
Paddle integration
Full Paddle setup guide
API reference
Transaction API documentation
Affiliate API
Standard API integration guide
