Skip to content

2. App Integration

Once the user installs and opens your app, you need to finalize the attribution.

Before calling /claim, ensure you have a consistent Installation Identifier. This is the key that links the attribution to future revenue.


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:
Terminal window
POST /api/v1/claim
{
"appId": "your-app-id",
"installId": "user-123-revenuecat-id",
"platform": "ios",
"claimCode": "B1-ABCD1234"
}

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.
Terminal window
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.


{
"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).