OP 18 July, 2023 - 01:19 AM
(This post was last modified: 18 July, 2023 - 01:20 AM by DarknessTom. Edited 1 time in total.)
I originally had the source code private. This project was actually really fun yet tedious to do, Revolut has some good obfuscation in play and finding then reversing their decrypt function was pretty painful.
Don't get confused, this isn't some 3rd party API. This is a NodeJS library that uses Revolut's internal API.
This was made to be used by personal Revolut accounts, no business or some API key bullshit needed!
Example how the library is used:
See Github below:
Don't get confused, this isn't some 3rd party API. This is a NodeJS library that uses Revolut's internal API.
This was made to be used by personal Revolut accounts, no business or some API key bullshit needed!
Example how the library is used:
Code:
require("dotenv").config()
import Revolut from '../../lib/index'
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)
})()
See Github below: