Callout

fun Callout(price: Int = 0, items: List<Item>? = null, userCohorts: List<String>? = null, hasOrPrefix: Boolean = false, borderStyle: CalloutBorderStyle = CalloutBorderStyle.None, colorTheme: CatchColorTheme? = null, styleOverrides: InfoWidgetStyle? = null)

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 params 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).

Parameters

price

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.

items

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.

userCohorts

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

hasOrPrefix

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.

borderStyle

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

colorTheme

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.

styleOverrides

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