GithubHelp home page GithubHelp logo

shuffleperson / revolutinternalapi Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 20 KB

API wrapper for Revolut's internal API, which their services use internally. This wrapper implements the functionality of managing (such as creating, viewing and editing) your Revolut Credit Card details.

TypeScript 100.00%
account api personal revolut

revolutinternalapi's Introduction

Revolut Credit Card API Wrapper

Unofficial

Overview

This module helps you to manage your credit cards, through phone number + pin authentication.

For specif information about the Revolut API see my UnOfficial Revolut's API documentation.

Usage

Simple example that utilizes all the current functions available.

require("dotenv").config()
import Revolut from 'revolutapi'

let sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

(async () => {
    //Make sure we have the environment variables
    if(!process.env.NUMBER || !process.env.PASSCODE) {
        throw new Error('Missing environment variables')
    }

    //Create a new instance of a revolut account
    let revolut = new Revolut(process.env.NUMBER, process.env.PASSCODE)

    //Signin with the credentials given in the constructor
    await revolut.signin()

    //Get all cards on the account
    console.log(await revolut.getCards())
    
    //Create a new virtual card with the label "hello!"
    let card = await revolut.newVirtualCard("hello!")

    //Get the expiry date, cvv and pan of the credit card
    let details = await revolut.getCardSecrets(card.id)
    console.log(details)

    //Revolut takes ~500ms to process the new card into their system
    await sleep(1000);
    
    //Delete the newly created card
    //await revolut.deleteCard(card.id)
})()

Build

To build the libary, run npm run build

Todo

  • Finish the UnOfficial Revolut's API documentation
  • Add support for Freezing / UnFreezing Cards
  • Add support for retrieving account's information
  • Add support for setting limits on cards
  • Add support for getting the current limit on a card

revolutinternalapi's People

Contributors

shuffleperson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

revolutinternalapi's Issues

One should obtain consent

[/tmp/RevolutInternalAPI/examples/SimpleApp kudahl]: NUMBER=00452XXXXXXXX PASSCODE=XXXX ts-node hello.ts
{
  message: 'One should obtain consent from the user before continuing',
  code: 9035
}

What would this mean?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.