Two jobs, cleanly separated
RevenueCat answers one question well: is this customer entitled right now? It manages subscription state, receipts, and the entitlement your paywall checks. Affiliate attribution answers a different question: which partner drove this subscription, and what commission is owed after refunds. Those are separate concerns, and keeping them separate is what lets each stay simple.
Attribloom does not replace RevenueCat. It connects to RevenueCat's webhooks: RevenueCat keeps granting entitlements, and Attribloom credits the affiliate from the purchase, renewal and refund events RevenueCat already sends.
Why the appAccountToken alone does not work with RevenueCat
Without RevenueCat, the attribution key is the StoreKit 2 appAccountToken: your app sets an Attribloom-issued token on the purchase and Apple echoes it back in every signed notification. RevenueCat's SDK sets the appAccountToken for you from its own App User ID when that ID is a UUID. A token your app mints for attribution therefore does not reliably reach Apple on a RevenueCat purchase, and notifications arrive carrying RevenueCat's identifier instead.
The fix is to carry the referral next to the purchase rather than inside it. RevenueCat customer attributes are set from the SDK and delivered with every webhook event, so the attribution survives anonymous IDs, aliases and transfers.
The pattern
Connecting a RevenueCat app takes four steps. Once live, purchases and renewals are credited on developer proceeds after the store commission and tax RevenueCat reports, and refunds claw the commission back.
- Resolve the Attribloom token at first launch, from the affiliate's link or referral code.
- Before the first purchase, set token.uuidString as the attribloom_ref customer attribute with Purchases.shared.attribution.setAttributes.
- In Attribloom, connect RevenueCat under Integrations with the webhook signing secret and your RevenueCat app ID, then paste the webhook URL into RevenueCat.
- Make a sandbox purchase through an affiliate link. The RevenueCat page shows whether it would have credited the affiliate, and sandbox events never create commission.
When to use Apple notifications instead
If your app calls StoreKit 2 directly for purchases, set the Attribloom token as the appAccountToken and forward App Store Server Notifications v2 to Attribloom. Attribloom verifies Apple's signature chain independently. RevenueCat can still receive its own copy of the notifications, and the two consumers do not conflict.