Recurring revenue
Attribute subscription renewals to the affiliate who drove the first sale.
For subscriptions, the affiliate who drove the signup should keep earning on
renewals. PartnerBee does this by tracking a customer at signup and then
attributing every later charge by that customer id, no fresh click needed.
1. Track the customer at signup
When the visitor subscribes, record the customer once. Attribute it by the click
(cookie_id / ref / click_id):
curl -X POST https://api.partnerbee.app/api/customers \
-H "Authorization: beeaff-<your-key>" \
-H "Content-Type: application/json" \
-d '{ "customer_id": "cus_123", "cookie_id": "joao-silva", "status": "trial" }'customer_id is your provider's customer id (e.g. Stripe cus_...). The call is
idempotent on customer_id, so it is safe to retry.
Customer status lifecycle:
| status | meaning |
|---|---|
trial | signed up, not paying yet |
active | paying |
capped | past the program's commission window (still paying) |
canceled | churned |
2. Report each charge by customer
On every charge (first and renewals), report the conversion by customer_id.
No click is required, and PartnerBee reuses the customer's original affiliate and
program:
curl -X POST https://api.partnerbee.app/api/conversions \
-H "Authorization: beeaff-<your-key>" \
-H "Content-Type: application/json" \
-d '{ "customer_id": "cus_123", "external_id": "invoice_88", "amount": 49.90 }'- Attributing by
customer_idmarks the conversionkind: recurringand skips
the click attribution window. - Once a customer passes the program's commission window, further recurring
charges stop generating commission and the customer is set tocapped. external_idkeeps each charge idempotent, so retries never double-count.
3. Update status when it changes
When a subscription cancels or reactivates, update the customer:
curl -X PATCH https://api.partnerbee.app/api/customers/cus_123 \
-H "Authorization: beeaff-<your-key>" \
-H "Content-Type: application/json" \
-d '{ "status": "canceled" }'The path id accepts either the PartnerBee customer id (UUID) or your provider
customer id (cus_...).
Updated about 2 hours ago

