Need private packages and team management tools?Check out npm Orgs. »


0.2.2 • Public • Published

Revolut Business Module

A Node.JS module by Pollex

Revolut introduced it's V1.0 API late last year for the business users. This allows users to read payments, transactions, counter-parties and perform similar actions as well.


This module provides an interface to the Revolut Business API, which can be used in a Node.JS application or even a client-side browser.


This module is available in the NPM repository, just execute the below command to install it!

    $ npm i @pollex/revolut


    $ yarn add @pollex/revolut


This ReadMe contains the basics, head over to the Github Wiki for more information!


Let's get you up and running quickly. Starting with the most important part of this library, the RevolutBroker. The broker handles the main communication between the API and this library. This is also where you put your API key and optionally enable debug/sandbox mode.

Identified vs Resolved
A.K.A. why doesn't my entity have information. Ideally every entity is synchronised with the API, this however is not the case. Instead, every time you need an entity you can resolve it with .get(), which returns a promise containing the entity with it's latest information from the API.

Instead of returning a promise every time you want to reference an entity, you get an identified entity. This means the entity only contains the entity' id and not it's properties. If you need it's properties, you will need to resolve it with .get().


The broker
Let's start with creating the broker, the most important piece:

    const { RevolutBroker } = require('@pollex/revolut');
    // Optional extra boolean parameter indicating sandbox mode.
    const broker = new RevolutBroker('YOU API KEY HERE');

Every entity needs a broker, however the broker is automagically passed to related entities. So you won't have to use it constantly!

Retrieving accounts
So I would like to know my business accounts:

    const { Account } = require('@pollex/revolut');
    // broker defined as previous example
    // GetAll returns a promise!
        .then( accounts => {
            // accounts is an Array of Account objects :)

Paying to a CounterParty
Paying requires you to have an Account to pay from and a CounterAccount, which is the account of the counterparty to pay to. However a CounterAccount can't be resolved directly. Instead you have to resolve a CounterParty and get the account from the .accounts property.

    // Assuming you have an Account and CounterAccount entity
    const payment =, 12.50, 'Optional reference text');
    // A payment is not executed on creation
        .then(transaction => {
            // executing returns a promise resolving in the created transaction
            // ...

For more information like transfering money and retrieving counterparties and -accounts, see the wiki on github!


This library is licensed under AGPL-3.0


npm i @pollex/revolut

Downloadsweekly downloads









last publish


  • avatar
  • avatar
Report a vulnerability