Direct initialisation
Initialise the SDK with your public API key to access the embedded checkout widget with all payment methods.
Direct initialisation creates an EmbeddedCheckoutInstance with unified payment methods. Use this method when you want all payment methods in one widget and create orders on-demand during checkout.
| Payment method | Reference | Integration guide |
|---|---|---|
| Embedded checkout | SDK reference | Guide |
Payment methods available:
- Card, Revolut Pay, Apple Pay, Google Pay, Pay by Bank (configured via Revolut Business)
Type signature
RevolutCheckout.embeddedCheckout(options: {
publicToken: string
mode?: 'prod' | 'sandbox'
locale?: Locale | 'auto'
}): Promise<EmbeddedCheckoutInstance>
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.
For additional configuration options including target, createOrder, callbacks, and customer details, see the Embedded checkout reference.
Returns
Returns a Promise<EmbeddedCheckoutInstance> with the following methods:
interface EmbeddedCheckoutInstance {
destroy: () => void
}
destroy- Manually destroy the instance and remove the widget from the page
Example
import RevolutCheckout from '@revolut/checkout'
const { destroy } = await RevolutCheckout.embeddedCheckout({
publicToken: 'pk_...',
mode: 'prod',
locale: 'auto'
})