ShopperInsightsClientV2

Use ShopperInsightsClientV2 to optimize your checkout experience by prioritizing the customer’s preferred payment methods in your UI.

By customizing each customer’s checkout experience, you can improve conversion, increase sales/repeat buys and boost user retention/loyalty.

The use of this client is a completely separate integration path from the deprecated com.braintreepayments.api.shopperinsights.ShopperInsightsClient.

Note: This feature is in beta. It's public API may change in future releases.

Constructors

Link copied to clipboard
constructor(context: Context, authorization: String)

Functions

Link copied to clipboard
fun createCustomerSession(customerSessionRequest: CustomerSessionRequest, customerSessionCallback: (customerSessionResult: CustomerSessionResult) -> Unit)

Creates a new customer session.

Link copied to clipboard
fun generateCustomerRecommendations(customerSessionRequest: CustomerSessionRequest? = null, sessionId: String? = null, customerRecommendationsCallback: (customerRecommendationsResult: CustomerRecommendationsResult) -> Unit)

Generates customer payment option recommendations.

Link copied to clipboard

Indicates whether the PayPal App is installed.

Link copied to clipboard

Indicates whether the Venmo App is installed.

Link copied to clipboard
fun sendPresentedEvent(buttonType: ButtonType, presentmentDetails: PresentmentDetails, sessionId: String)

Call this method when the PayPal, Venmo or Other button has been successfully displayed to the buyer. This method sends analytics to help improve the Shopper Insights feature experience.

Link copied to clipboard
fun sendSelectedEvent(buttonType: ButtonType, sessionId: String)

Call this method when the PayPal, Venmo or Other button has been selected/tapped by the buyer. This method sends analytics to help improve the Shopper Insights feature experience.

Link copied to clipboard
fun updateCustomerSession(customerSessionRequest: CustomerSessionRequest, sessionId: String, customerSessionCallback: (customerSessionResult: CustomerSessionResult) -> Unit)

Updates an existing customer session.