Payment Method
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
The cost in cents that a consumer would pay for the item(s) without redeeming Catch credit.
A list of all items included in the order. Used to calculate item-based rewards.
A list of user cohorts that the signed in user qualifies for. Used to calculate cohort-based rewards.
Whether or not the widget is in a disabled state.
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 textCompact
- displays the filler text and reward textLogoCompact
- displays the logo and reward text
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
.
Style overrides which can be used to override the widget's default appearance (ex. font size, color, weight, etc.).