PaymentMethod

fun PaymentMethod(price: Int = 0, items: List<Item>? = null, userCohorts: List<String>? = null, disabled: Boolean = false, variant: PaymentMethodVariant = PaymentMethodVariant.Standard, colorTheme: CatchColorTheme? = null, styleOverrides: InfoWidgetStyle? = null)

The PaymentMethod widget displays similar messaging and informational content as the Callout but is designed specifically to be displayed in checkout UI where a consumer may select Catch as their payment method.

The widget may be placed in a "disabled" state when the cart contains items that cannot be purchased with Catch (e.g. gift cards). The disable state grays out the contents of the widget and provides a small tooltip that explains why Catch cannot be selected.

The PaymentMethod widget makes use of its price, items, and userCohorts params to calculate rewards the user will earn on the current purchase.

Parameters

price

The cost in cents that a consumer would pay for the item(s) without redeeming Catch credit.

items

A list of all items included in the order. Used to calculate item-based rewards.

userCohorts

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

disabled

Whether or not the widget is in a disabled state.

variant

The PaymentMethod has several variants that allow you to customize what content is rendered in the widget. The PaymentMethodVariant options are:

  • Standard - displays the logo, filler text, and reward text

  • Compact - displays the filler text and reward text

  • LogoCompact - displays the logo and reward text

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