The RevolutCheckout.upsell
module lets you display Revolut's promotional widget during and after checkout. Customers who eventually join Revolut will receive reward and will be able to use their Revolut account to pay via Revolut Pay (if it's available on your checkout) in the future.
You have two options to display the promotional banner:
See an example with the cardGatewayBanner
instance of the module:
const { cardGatewayBanner } = await RevolutCheckout.upsell({
locale: 'auto', // optional, defaults to 'auto'
mode: 'sandbox', // optional, defaults to 'prod'
publicToken: '<yourPublicAPIKey>', // merchant public API key
})
Field | Description | Format | Required |
---|---|---|---|
locale | Controls the language of the text in the widget. Possible values are:
| String | No |
mode | Default value: prod . Controls which API environment handles requests. Possible values are:
| Enum | No |
publicToken | The merchant's public token used for authorization. | String | Yes |
After loading, the RevolutCheckout.upsell
module returns an upsellInstance
which is then used to mount the upsell widget, destroy the SDK or set the default locale
:
interface WidgetUpsellInstance {
cardGatewayBanner: UpsellModuleCardGatewayBannerInstance
promotionalBanner: UpsellModulePromotionalBannerInstance
enrollmentConfirmationBanner: UpsellModuleEnrollmentConfirmationBannerInstance
destroy: () => void
setDefaultLocale: (lang: Locale | 'auto') => void
}