# 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](/docs/sdks/merchant-web-sdk/promotional-widgets/promotional-banner)             | [Guide](/docs/guides/merchant/optimise-checkout/promo-banners)                                                        |
| Card gateway banner            | [SDK reference](/docs/sdks/merchant-web-sdk/promotional-widgets/card-gateway-banner)            | [Guide](/docs/guides/merchant/accept-payments/online-payments/card-payments/web/card-field#5-add-promotional-banner-to-the-widget) |
| Enrollment confirmation banner | [SDK reference](/docs/sdks/merchant-web-sdk/promotional-widgets/enrollment-confirmation-banner) | -                                                                                                                         |

## Type signature

```typescript
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:

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

- **[`promotionalBanner`](/docs/sdks/merchant-web-sdk/promotional-widgets/promotional-banner)** - Display Revolut benefits and encourage customer sign-up
- **[`cardGatewayBanner`](/docs/sdks/merchant-web-sdk/promotional-widgets/card-gateway-banner)** - Show gateway banners for card transactions
- **[`enrollmentConfirmationBanner`](/docs/sdks/merchant-web-sdk/promotional-widgets/enrollment-confirmation-banner)** - Confirm customer enrollment in Revolut promotions
- **[`setDefaultLocale`](/docs/sdks/merchant-web-sdk/types/locale#with-upsell-module)** - Change widget language dynamically
- **`destroy`** - Manually destroy the instance

## Example

```typescript
import RevolutCheckout from '@revolut/checkout'

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