CalloutView

class CalloutView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : AbstractComposeView

The Callout widget shows consumers how much Catch credit they could earn or redeem based on the price of the item(s) they're considering (e.g. when viewing a product detail page or their cart).

The widget includes a trigger that, when clicked, opens a modal which displays more detailed informational content about paying with Catch and earning rewards on the merchant's site. The widget automatically recognizes consumers who are currently signed in to Catch, and tailors the messaging to them if they have rewards that are available to redeem with the merchant.

The Callout widget makes use of its price, items, and userCohorts properties to calculate rewards the user will earn on the current item (if implemented on product detail page) or on the current order (if implemented in the cart or during the checkout flow).

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Functions

Link copied to clipboard
open override fun Content()

Properties

Link copied to clipboard

The CalloutBorderStyle that the widget renders. Defaults to the CalloutBorderStyle.None style.

Link copied to clipboard

The Catch color CatchColorTheme. If no theme is set, the theme set globally on the Catch object will be used, which defaults to CatchColorTheme.Light.

Link copied to clipboard

If or-prefix is set, the word "or" is prepended into the displayed messaging (e.g. "or earn $23.00 credit" instead of "Earn $23.00 credit"). Intended to be used when the callout is found below other payment method callout widgets.

Link copied to clipboard
var items: List<Item>?

A list of items included in the order (i.e. on PDP, this would be the single item displayed on the page. On the cart/checkout pages, this would be a list of all items included in the order). This is used to calculate SKU-based rewards.

Link copied to clipboard
var price: Int?

The cost in cents that a consumer would pay for the item(s) without redeeming Catch credit. If not set, the widgets will display the rewards rate (e.g. “Earn 10% credit”) rather than a specific rewards value (e.g., "Earn $24.00 credit"). If provided, the price must be a positive number. A negative price will be treated as if the price is not set at all.

Link copied to clipboard

Style overrides which can be used to override the widget's default appearance (ex. font size, color, weight, etc.).

Link copied to clipboard

A list of user cohorts that the signed in user qualifies for. Used to calculate user cohort based rewards.