Skip to main content

ActivePerks (Rewards & Cash Back)

ActivePerks is the member rewards program. Members shop a catalogue of merchants, buy digital gift cards, keep them in an in-app wallet and earn cash back on what they spend. Your app reaches the whole program through AFCore.activePerks().

Requires ActivePerks to be enabled for your client. Start every ActivePerks screen from the member's enrollment instead of assuming every client offers the program.


What you can do​

  • Enrollment -- check whether the member is enrolled, sign them up, or send a member whose account needs recovery on this device to a recovery flow.
  • Shop -- browse, search, filter and sort the merchant catalogue, open a merchant's gift card and shopping options, and keep favorite merchants.
  • Checkout -- price a gift card and complete the purchase with a saved payment method or with cash back.
  • Wallet -- list the member's active and archived gift cards and their order history.
  • Cash back -- show the balance and its history, and redeem it to a charity.

Key APIs​

CallWhat it is for
getEnrollment() / signUp(...)The entry point: enrollment status and sign-up
getMerchants() / getMerchantDetails(...)The merchant catalogue and one merchant's offers
addFavoriteMerchant(...) / removeFavoriteMerchant(...)Favorite merchants
checkout(...) / processOrder(...)Pricing and completing a gift card purchase
getActiveGiftCards() / getArchivedGiftCards() / getOrderHistory()The wallet
getCashbackBalance() / getCashbackHistory() / redeemCashback(...)Cash back
getMemberProfile()The member's ActivePerks profile and cash-back totals

Filtering, sorting and categories​

ActivePerksCatalog filters, sorts and lists the categories of a merchant list your app already loaded. It runs on the device and gives the same results on Android and iOS. MerchantFilterStore holds one filter that a list and a map can share.


Example: enrollment and the catalogue​

lifecycleScope.launch {
try {
val enrollment = AFCore.activePerks().getEnrollment()
when {
enrollment.needsRecovery -> startRecoveryFlow()
!enrollment.isEnrolled -> showSignUp()
else -> {
val merchants = AFCore.activePerks().getMerchants()
showCatalog(
ActivePerksCatalog.sort(merchants, listOf(MerchantSortCriterion.HIGHEST_CASHBACK))
)
}
}
} catch (t: Throwable) {
showError(t)
}
}

Learn more​

  • API Reference -- every ActivePerks call and model.
  • Complete integration guides for ActivePerks, including sign-up, checkout and the wallet, are in AIDE Docs.