Payments module initialisation

Initialise the SDK with your public API key to access individual payment method buttons.

Payments module initialisation creates a RevolutPaymentsModuleInstance with separate payment methods. Use this method when you need individual payment method buttons with granular control over UI placement and create orders on-demand during checkout.

Payment methods available:

Payment methodReferenceIntegration guide
Revolut PaySDK referenceGuide
Apple Pay / Google PaySDK referenceGuide
Pay by BankSDK referenceGuide

Type signature

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

Parameters

ParameterDescriptionTypeRequired
publicTokenYour Merchant API public keystringYes
modeAPI environment. Default: 'prod''prod' | 'sandbox'No
localeWidget 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<RevolutPaymentsModuleInstance> with the following methods:

interface RevolutPaymentsModuleInstance {
revolutPay: PaymentsModuleRevolutPayInstance
paymentRequest: PaymentsModulePaymentRequest
payByBank: PaymentsModulePayByBank
setDefaultLocale: (locale: Locale) => void
destroy: () => void
}
  • revolutPay - Accept payments via Revolut Pay
  • paymentRequest - Accept payments via Apple Pay and Google Pay
  • payByBank - Accept payments via Pay by Bank
  • setDefaultLocale - Change widget language dynamically
  • destroy - Manually destroy the instance

Example

import RevolutCheckout from '@revolut/checkout'

const paymentsInstance = await RevolutCheckout.payments({
publicToken: 'pk_...',
mode: 'prod',
locale: 'auto'
})
Was this page helpful?