Shopper Insights (Beta)

Availability
Shopper Insights is currently only available for merchants using iOS v6+ and Android v4+ of the SDK. It is not currently available for merchants using the Javascript or Drop-in SDK.
Important
The SSL certificates for Braintree Mobile (iOS and Android) SDKs are set to expire on March 30, 2026. This will impact existing versions of the SDK in published versions of your app. To reduce the impact, upgrade the Android SDK to version 4.45.0+ or version 5.0.0+ for the new SSL certifications.

If you do not decommission your app versions that include the older SDK versions or force upgrade your app with the updated certificates by the expiration date, 100% of your customer traffic will fail.

OverviewAnchorIcon

Use Shopper Insights to optimize your checkout experience by prioritizing the customer’s preferred payment methods in your UI. Customizing the checkout experience can improve conversion, increase repeat buys and boost user retention.

IntegrationAnchorIcon

The getRecommendedPaymentMethods method returns PayPal or Venmo as recommended payment using their email.

Before using this method, obtain consent from the customer to share this information with PayPal services.

Important
Presentment of PayPal Checkout You agree to confirm your customer’s PayPal network payment eligibility before any other payment method. When PayPal network eligibility is confirmed, preferential placement should be given to the recommended payment method(s) on any page offering payment options. Also, if available, the recommended payment method(s) should be preselected. If PayPal network payment eligibility cannot be confirmed, PayPal should be positioned at least at parity with other payment methods.
Note
You must use a Client Token to initialize the SDK. This feature is not supported with Tokenization Keys.

Use the following code snippet to get the recommended payment methods and adjust your UI/UX accordingly.

Add the following in your app-level build.gradle:

  1. Kotlin
  2. Groovy
dependencies {
    implementation("com.braintreepayments.api:shopper-insights:5.8.0")
}
  1. Kotlin
val shopperInsightsClient = ShopperInsightsClient(this, "[CLIENT_TOKEN]")
val shopperInsightsRequest = ShopperInsightsRequest(
   email = "fake-email@email.com",
   phone = ShopperInsightsBuyerPhone(
         countryCode = "1",
         nationalNumber = "1234567890"
   )
)

shopperInsightsClient.getRecommendedPaymentMethods(shopperInsightsRequest) { result ->
   when (result) {
      is ShopperInsightsResult.Success -> {
         if (result.response.isPayPalRecommended) {
            // PayPal was recommended
         } else if (result.response.isVenmoRecommended) {
            // Venmo was recommended
         }
      }

      is ShopperInsightsResult.Failure -> {
         // handle error
      }
   }
}

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more