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 widget | Reference | Integration guide |
|---|---|---|
| Promotional banner | SDK reference | Guide |
| Card gateway banner | SDK reference | Guide |
| Enrollment confirmation banner | SDK reference | - |
Type signature
RevolutCheckout.upsell(options: {
publicToken: string
mode?: 'prod' | 'sandbox'
locale?: Locale | 'auto'
}): Promise<RevolutUpsellModuleInstance>
Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
publicToken | Your Merchant API public key | string | Yes |
mode | API environment. Default: 'prod' | 'prod' | 'sandbox' | No |
locale | Widget language. Default: 'auto' | Locale | 'auto' | No |
Tip
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
}
promotionalBanner- Display Revolut benefits and encourage customer sign-upcardGatewayBanner- Show gateway banners for card transactionsenrollmentConfirmationBanner- Confirm customer enrollment in Revolut promotionssetDefaultLocale- Change widget language dynamicallydestroy- Manually destroy the instance
Example
import RevolutCheckout from '@revolut/checkout'
const upsellInstance = await RevolutCheckout.upsell({
publicToken: 'pk_...',
mode: 'prod',
locale: 'auto'
})