Get started
Installation
To install the Revolut Checkout SDK, you can use one of the following methods:
Install the RevolutCheckout.js NPM package and import the ES module to your code:
npm install @revolut/checkout
This allows you to import the RevolutCheckout module:
import RevolutCheckout from '@revolut/checkout'
Initialisation methods
The SDK provides four initialisation methods depending on your use case:
| Method | Syntax | Use case | Returns |
|---|---|---|---|
| Token-based | RevolutCheckout(token) | Card payments with pre-created orders | RevolutCheckoutInstance |
| Direct initialisation | RevolutCheckout.embeddedCheckout({...}) | All payment methods in one widget | EmbeddedCheckoutInstance |
| Payments module | RevolutCheckout.payments({...}) | Individual payment method buttons | PaymentsModuleInstance |
| Upsell module | RevolutCheckout.upsell({...}) | Promotional widgets | UpsellModuleInstance |
Which method should I use?
Use token-based initialization when:
- You create orders on your server before showing checkout
- You need card field or card pop-up
- You're migrating from legacy integration patterns
Payment methods available: Card field, Card pop-up
Example:
const instance = await RevolutCheckout(orderToken, 'prod')
const cardField = instance.createCardField({ target: element })