Skip to content

Offer Codes

Offer codes let you reward referred users with discounts by automatically distributing App Store or Play Store promo codes when attribution occurs.


Offer codes are promotional codes generated in App Store Connect (Apple) or Play Console (Google) that give users discounts on subscriptions or in-app purchases.

BitEasy lets you:

  1. Upload these codes to a referral link
  2. Automatically distribute a code when /claim succeeds
  3. Return the code in the API response for your app to redeem

flowchart TB
    A[Upload codes to referral link] --> B[User claims attribution]
    B --> C["/claim returns offer code"]
    C --> D[Your app user redeems the code]
    D --> E[User gets discount]
  1. Export codes from App Store Connect or Play Console (CSV format)
  2. Upload codes to a referral link in BitEasy
  3. When a user is attributed via /claim, BitEasy returns an offer code in the response
  4. Your app implements the logic to redeem or display the code to the user

  1. Navigate to your app → Referral Links
  2. Click on a referral link to edit it
  3. Go to the Offer Codes tab
  4. Click Upload Codes
  5. Select your CSV file exported from App Store Connect or Play Console
  6. Codes are imported and ready to distribute

If your referral link has a plan hint selected (e.g., monthly or yearly), your uploaded offer codes should match that plan:

Link Plan HintOffer Codes Should Be
MonthlyMonthly subscription promo codes
YearlyAnnual subscription promo codes
AnyAny codes (but consider organizing by link)

When attribution succeeds and an offer code is available, the /claim response includes it in the paywall object:

{
"status": "claimed",
"referrer": "alice-yearly-2026",
"path": null,
"paywall": {
"id": "default",
"source": "partner",
"partner": "alice",
"offerCode": {
"code": "PROMO-ABCD-1234-EFGH",
"platform": "ios",
"subscriptionDuration": "yearly",
"expiresAt": "2026-12-31"
}
}
}

Your app should:

  1. Check if paywall?.offerCode is present in the response
  2. Display the code to the user, or
  3. Automatically apply it using the platform’s redemption API

Redirect to the App Store offer code redemption URL:

if let offerCode = claimResponse.paywall?.offerCode {
// Open App Store redemption page
// Replace APP_ID with your App Store app ID (numeric)
let urlString = "itms-apps://apps.apple.com/redeem?ctx=offercodes&id=\(appId)&code=\(offerCode.code)"
if let url = URL(string: urlString) {
UIApplication.shared.open(url)
}
}

Deep link to the Play Store redemption page:

claimResponse.paywall?.offerCode?.let { offerCode ->
val intent = Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse("https://play.google.com/redeem?code=${offerCode.code}")
}
startActivity(intent)
}

Use an in-app browser to keep users in your app:

import { Platform, Linking } from 'react-native';
async function redeemOfferCode(claimResponse: ClaimResponse) {
const offerCode = claimResponse.paywall?.offerCode;
if (!offerCode) return;
const url = Platform.select({
// Replace APP_ID with your App Store app ID (numeric)
ios: `itms-apps://apps.apple.com/redeem?ctx=offercodes&id=${appId}&code=${offerCode.code}`,
android: `https://play.google.com/redeem?code=${offerCode.code}`,
});
if (!url) return;
Linking.openURL(url);
}

Keep an eye on your offer codes inventory:

MetricDescription
AvailableCodes ready to distribute
DistributedCodes already given out
Expiring SoonCodes expiring within 7 days
ExpiredCodes that can no longer be redeemed

  • Check the Offer Codes tab regularly
  • Upload new batches before running out
  • Set calendar reminders for expiring codes

Create separate referral links for different offers:

  • alice-yearly-50off → Upload yearly 50% off codes
  • alice-monthly-trial → Upload monthly free trial codes

Your app should handle the case where no offer code is returned:

const offerCode = claimResponse.paywall?.offerCode;
if (offerCode) {
showOfferRedemption(offerCode.code);
} else {
// Still attributed, just no offer code available
showWelcomeScreen();
}

Attribution still works — the user is still credited to the partner. The only difference is that /claim won’t include an offerCode in the response.

Section titled “Can I use the same codes for multiple links?”

No. Each code can only be uploaded to one referral link. If you need the same offer on multiple links, export enough codes for each.

Yes. App Store and Play Store codes have expiration dates. BitEasy tracks this and shows you which codes are expiring soon.