Sandbox
Help

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 Pay SDK reference Guide
Apple Pay / Google Pay SDK reference Guide
Pay by Bank SDK reference Guide
SEPA Direct Debit SDK reference Guide

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

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
  sepaDirectDebit: PaymentsModuleSepaDirectDebit
  setDefaultLocale: (locale: Locale) => void
  destroy: () => void
}

Example

import RevolutCheckout from '@revolut/checkout'

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