All help

Connecting an iOS app

To attribute App Store purchases to affiliates, you need to connect your app under iOS Apps. This lets Attribloom receive Apple's App Store Server Notifications and match purchases to the affiliate who drove them.

Fields when connecting an app

Display name. Your label for the app inside the Attribloom dashboard. For your reference only.

Bundle ID. The reverse-DNS identifier from Xcode or App Store Connect (for example, `com.example.myapp`). This must exactly match the bundle ID that Apple includes in purchase notifications. If it doesn't match, purchases will not attribute.

App Store app ID. The numeric Apple ID shown in the App Store URL for your app (for example, `1234567890`).

Environment. Choose Production for live App Store builds, or Sandbox for TestFlight and Xcode test purchases. Sandbox purchases are never billed and never pay commission. They are useful for testing your integration only.

After connecting

After saving, Attribloom gives you a Forwarding URL and a one-time forwarding secret. Keep App Store Connect pointed at your own App Store Server Notifications V2 server. After your server receives Apple's request, relay the unchanged `signedPayload` to the Forwarding URL and sign that relay with the forwarding secret. Attribloom verifies the merchant HMAC first, then verifies Apple's JWS inside the payload.

Do not set the Attribloom Forwarding URL in App Store Connect. Apple does not add the merchant HMAC headers, so a direct request would be rejected. If you do not have an ASSN server yet, deploy a small relay and use its URL in App Store Connect.

Verifying ownership

Attribloom flips your app to Active once it receives one valid Apple-signed test notification for your bundle ID. There is no "Send Test Notification" button in App Store Connect; the test notification is an App Store Server API call. Add your App Store Server API key in Attribloom and click Verify, and Attribloom asks Apple to send the test for you. If you would rather not add the key, request a test notification yourself with the App Store Server API and Attribloom auto-detects it when it arrives.

How purchases are attributed

There are two supported paths. Use the direct StoreKit 2 path below if your server receives Apple's notifications. If purchases already flow through RevenueCat, connect RevenueCat under Integrations instead. Set the affiliate referral code as the configured RevenueCat subscriber attribute after SDK setup and before the first purchase. Attribloom preserves the binding across RevenueCat anonymous IDs, aliases, and transfer events.

Attribution works via the appAccountToken, a UUID that Attribloom issues and ties to the referring affiliate. Your app does not generate this UUID itself. A self-made UUID will not attribute, because the token has to be the one Attribloom minted for that affiliate.

At first launch your app fetches the token from Attribloom's bind endpoint. It identifies the affiliate by, in order of preference, a signed click id handed off via the clipboard, a deferred match on the device's IP to a recent click, or a referral code the user enters. Your app then sets that token on every StoreKit 2 purchase. When Apple's notification arrives, Attribloom reads the token and credits the right affiliate. The token must be set at purchase time; it cannot be added retroactively.

What the affiliate link shows on iPhone

The affiliate's link records the click and shows an App Store interstitial. The user taps Continue to the App Store. That tap copies a signed click token to the clipboard, then opens the App Store. On first launch, the app reads that token and sends it to the bind endpoint. This clipboard tap path is the deterministic, preferred bridge from the browser to the installed app.

RevenueCat event rules

Only Production Apple App Store purchase, renewal, and refund events affect real money. The commission base is the purchased-currency price after RevenueCat's reported store commission and tax. Sandbox events are recorded as test deliveries but never create a conversion, commission, or live-sales signal. RevenueCat `REFUND` events use the existing ledger clawback. `CANCELLATION` means the subscription will not renew and does not reverse a paid period that RevenueCat has not refunded.

Try it

Published · Last reviewed

Written by Attribloom Engineering · Reviewed by Attribloom Product · Last reviewed

GlossaryLearnIntegration guides