Merchant Web SDKs
The upsell object
doc

The upsell object

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:

  • Displaying the banner with the Revolut Checkout Widget (card field, pop-up)
  • Displaying the banner after successful payment, when the payment was done through a non-Revolut gateway

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
})
FieldDescriptionFormatRequired
localeControls the language of the text in the widget.

Possible values are:
  • auto (default) - Detect using browser locale,
  • en (English)
  • en-US (English - US),
  • es (Spanish),
  • de (German),
  • fr (French),
  • it (Italian),
  • nl (Dutch),
  • pl (Polish),
  • pt (Portuguese),
  • cs (Czech),
  • hu (Hungarian),
  • sk (Slovak),
  • ja (Japanese),
  • sv (Swedish),
  • bg (Bulgarian),
  • el (Greek),
  • ro (Romanian),
  • lt (Lithuanian),
  • hr (Croatian)
StringNo
modeDefault value: prod. Controls which API environment handles requests.

Possible values are:
  • sandbox
  • prod
EnumNo
publicTokenThe merchant's public token used for authorization.StringYes

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
}
Was this page helpful?