RevolutCheckoutError

Error type thrown by the Revolut Checkout SDK when operations fail. All SDK errors implement this interface, allowing for consistent error handling across all payment methods and widgets.

Type signature

interface RevolutCheckoutError extends Error {
name: 'RevolutCheckout'
type: RevolutCheckoutErrorType
code?: number
message: string
}

type RevolutCheckoutErrorType =
| 'error.unknown'
| 'error.unauthenticated-access'
| 'error.order-not-found'
| 'error.transaction-invalid-state'
| 'error.declined'
| 'error.token-not-found'
| 'error.email-is-not-specified'
| 'error.order-already-completed'
| 'error.deactivated-merchant'
| 'error.invalid-postcode'
| 'error.invalid-email'
| 'error.invalid-name'
| 'error.invalid-address'
| 'error.do-not-honour'
| 'error.insufficient-funds'
| 'error.3ds-failed'
| 'error.expired-card'
| 'error.incorrect-cvv-code'
| 'error.order-is-cancelled'
| 'error.trusted-principal-not-specified'
| 'error.merchant-not-specified'
| 'error.invalid-order-type'
| 'error.transaction-step'
| 'error.payment-method-already-exists'
| 'error.payment-method-not-found'
| 'error.order-customer-id-is-not-set'
| 'error.payment-method-not-permitted-for-merchant'
| 'error.webhook-not-found'
| 'error.verification-not-permitted'
| 'error.customer-already-exists'
| 'error.unknown-authorisation'
| 'error.submerchant-not-found'
| 'error.submerchant-incorrect-notification'
| 'error.3ds-incorrect-notification'
| 'error.authentication-challenge-not-found'
| 'error.mpi-provider'
| 'error.payment-gateway'
| 'error.invalid-provider-response'
| 'error.unexpected-mpi-provider'
| 'error.terminal-not-found'
| 'error.submerchant-not-onboarded'

Properties

PropertyDescriptionTypeRequired
nameAlways set to 'RevolutCheckout' to identify SDK errors'RevolutCheckout'Yes
typeSpecific error type identifierRevolutCheckoutErrorTypeYes
codeHTTP status code when applicablenumberNo
messageHuman-readable error descriptionstringYes

Common errors

Error typeDescriptionCustomer actionMerchant action
error.declinedPayment declined by card issuerTry different card or payment methodDisplay error message, offer alternatives
error.insufficient-fundsInsufficient funds in accountTry different payment methodDisplay error message, suggest other options
error.3ds-failed3D Secure authentication failedContact bank or try different cardDisplay error message, log for analysis
error.expired-cardCard has expiredUse different cardDisplay clear expiry error
error.incorrect-cvv-codeCVV/CVC code is incorrectRe-enter CVVDisplay field-specific error
error.order-not-foundOrder token provided but order doesn't existRefresh page and try againRegenerate order token
error.order-already-completedOrder was already paid-Don't retry payment, check webhook
error.invalid-emailEmail format is invalidCorrect email addressValidate email format client-side
error.invalid-postcodePostcode format is invalidCorrect postcodeValidate postcode format
error.unknownUnexpected error occurredTry again laterLog error, contact support

Complete error type reference

Payment errors

Error typeDescription
error.declinedPayment declined by card issuer or payment provider
error.do-not-honourPayment declined by issuer with 'do not honour' response
error.insufficient-fundsInsufficient funds in customer's account
error.expired-cardCard has expired
error.incorrect-cvv-codeCVV/CVC security code is incorrect
error.3ds-failed3D Secure authentication failed or was not completed
error.3ds-incorrect-notificationReceived incorrect 3D Secure notification from provider

Validation errors

Error typeDescription
error.invalid-emailEmail address format is invalid
error.invalid-nameName format is invalid or incomplete
error.invalid-addressAddress details are invalid or incomplete
error.invalid-postcodePostcode/ZIP code format is invalid

Order errors

Error typeDescription
error.order-not-foundThe order token was provided but no corresponding order was found
error.order-already-completedOrder has already been successfully paid
error.order-is-cancelledOrder has been cancelled and cannot be paid
error.invalid-order-typeOrder type is not valid for the requested operation
error.order-customer-id-is-not-setCustomer ID is required to save payment method but not set on order. Set order.customer.id during order creation/update before accepting the payment
error.email-is-not-specifiedEmail is required but not provided on order or in widget

Authentication errors

Error typeDescription
error.unauthenticated-accessRequest requires authentication but credentials are invalid or missing
error.token-not-foundNo order token was provided to the SDK
error.verification-not-permittedPayment verification is not permitted for this transaction
error.unknown-authorisationAuthorisation attempt is not recognised
error.authentication-challenge-not-foundAuthentication challenge (e.g., 3DS) not found

Merchant configuration errors

Error typeDescription
error.deactivated-merchantMerchant account has been deactivated
error.merchant-not-specifiedMerchant identifier is missing from request
error.trusted-principal-not-specifiedTrusted principal (API key) is not specified
Sub-merchant errors

The following errors apply to PSP (Payment Service Provider) and marketplace integrations where a parent merchant (e.g., Adyen) delegates payment processing to end merchants (sub-merchants or Merchants of Record).

Error typeDescription
error.submerchant-not-foundSub-merchant configuration not found
error.submerchant-not-onboardedSub-merchant has not completed the onboarding process
error.submerchant-incorrect-notificationReceived incorrect notification for sub-merchant transaction

Payment method errors

Error typeDescription
error.payment-method-already-existsPayment method is already saved for this customer
error.payment-method-not-foundSaved payment method not found
error.payment-method-not-permitted-for-merchantPayment method is not enabled for this merchant

Technical errors

Error typeDescription
error.payment-gatewayPayment gateway error occurred during processing
error.mpi-providerError from MPI (3D Secure) provider
error.invalid-provider-responseReceived invalid response from payment provider
error.unexpected-mpi-providerUnexpected or unsupported MPI provider encountered

Transaction errors

Error typeDescription
error.transaction-invalid-stateTransaction is in an invalid state for the requested operation
error.transaction-stepError occurred during transaction processing step

Other errors

Error typeDescription
error.webhook-not-foundWebhook configuration not found
error.terminal-not-foundTerminal configuration not found
error.customer-already-existsCustomer with this identifier already exists
error.unknownUnknown or unexpected error occurred

Error handling

Examples of handling RevolutCheckoutError in different scenarios.

Basic error handling

import RevolutCheckout from '@revolut/checkout'

try {
const { destroy } = await RevolutCheckout.embeddedCheckout({
publicToken: 'pk_...',
environment: 'prod',
// ... configuration
})
} catch (error) {
if (error.name === 'RevolutCheckout') {
// Handle SDK-specific errors
console.error(`Checkout error [${error.type}]:`, error.message)

// Display user-friendly message
alert(`Payment initialisation failed: ${error.message}`)
} else {
// Handle network/system errors
console.error('Failed to initialize checkout:', error)
}
}

Error handling in callbacks

const { destroy } = await RevolutCheckout.embeddedCheckout({
publicToken: 'pk_...',
environment: 'prod',
target: document.getElementById('checkout'),

createOrder: async () => {
const response = await fetch('/api/create-order')
const order = await response.json()
return { publicId: order.token }
},

onError: ({ error, orderId }) => {
// error is RevolutCheckoutError
console.error('Payment failed:', {
type: error.type,
message: error.message,
code: error.code,
orderId
})

// Handle specific error types
switch (error.type) {
case 'error.declined':
showMessage('Your card was declined. Please try a different card.')
break
case 'error.insufficient-funds':
showMessage('Insufficient funds. Please use a different payment method.')
break
case 'error.3ds-failed':
showMessage('Authentication failed. Please contact your bank.')
break
default:
showMessage(`Payment failed: ${error.message}`)
}
}
})

Validation errors

For form field validation errors, see: ValidationError

Validation errors have a different interface and are specific to card field validation:

interface ValidationError extends Error {
name: 'Validation'
type: ValidationErrorType // e.g., 'validation.card.number.invalid'
}

See also

Was this page helpful?