Sandbox
Help

Upsell module initialisation

Initialise the SDK with your public API key to access promotional and upsell widgets.

Upsell module initialisation creates a RevolutUpsellModuleInstance with promotional widgets. Use this method when you want to display promotional banners, encourage Revolut sign-ups, or show post-purchase upsell content.

Promotional widgets available:

Promotional widgetReferenceIntegration guide
Promotional bannerSDK referenceGuide
Card gateway bannerSDK referenceGuide
Enrollment confirmation bannerSDK reference-

Type signature

RevolutCheckout.upsell(options: {
  publicToken: string
  mode?: 'prod' | 'sandbox'
  locale?: Locale | 'auto'
}): Promise<RevolutUpsellModuleInstance>

Parameters

ParameterDescriptionTypeRequired
publicTokenYour Merchant API public keystringYes
modeAPI environment. Default: 'prod''prod' | 'sandbox'No
localeWidget language. Default: 'auto'Locale | 'auto'No

The mode parameter must match the environment used for your public API key. Production keys work only in 'prod' mode, and sandbox keys only in 'sandbox' mode.

Returns

Returns a Promise<RevolutUpsellModuleInstance> with the following methods:

interface RevolutUpsellModuleInstance {
  promotionalBanner: UpsellModulePromotionalBannerInstance
  cardGatewayBanner: UpsellModuleCardGatewayBannerInstance
  enrollmentConfirmationBanner: UpsellModuleEnrollmentConfirmationBannerInstance
  setDefaultLocale: (locale: Locale) => void
  destroy: () => void
}

Example

import RevolutCheckout from '@revolut/checkout'

const upsellInstance = await RevolutCheckout.upsell({
  publicToken: 'pk_...',
  mode: 'prod',
  locale: 'auto',
})
Rate this page