2. App Integration
Once the user installs and opens your app, you need to finalize the attribution.
1. Installation Identifiers
Section titled “1. Installation Identifiers”Before calling /claim, ensure you have a consistent Installation Identifier. This is the key that links the attribution to future revenue.
2. Triggering /claim
Section titled “2. Triggering /claim”For Code-Based Attribution (Explicit)
Section titled “For Code-Based Attribution (Explicit)”If the user has a code (e.g., “ABCD”), your app needs a UI to accept it.
Best Practices:
- show a “Referral Code?” link on your onboarding or paywall screen.
- If the user enters a code, call
/claim:
POST /api/v1/claim{ "appId": "your-app-id", "installId": "user-123-revenuecat-id", "platform": "ios", "claimCode": "B1-ABCD1234"}For Window-Based Attribution (Implicit)
Section titled “For Window-Based Attribution (Implicit)”If you are supporting window-based fallback, you should call /claim automatically on first launch, without a code.
- When: As early as possible in the app lifecycle (after you valid installation ID is generated).
- Blocking? No. This should be a background call. Do not block the user’s onboarding flow.
POST /api/v1/claim{ "appId": "your-app-id", "installId": "user-123-revenuecat-id", "platform": "ios" // No claimCode}If the call succeeds, the response will contain the referrer. You can then show a “Welcome, fan of [Partner]!” message.
3. Handling the Response
Section titled “3. Handling the Response”{ "status": "claimed", "referrer": "alice", "paywall": { "offerCode": { ... } }}status: claimed: Attribution success.paywall.offerCode: If present, you should present this offer to the user (see Offer Codes).