Coder Social home page Coder Social logo

venmo's Introduction

Venmo ๐Ÿ’ณ

npm npm

Venmo API for Typescript

The people making desisons at Venmo are a bunch of cowards because they do not provide a way for developers to easily automate payments and transations with Venmo ๐Ÿคฌ. This package exists because Venmo chose to be anti-developer. This package is intended to be used in Node.js backends, but will run in the browser if you want to it.

Implimentation โŒจ๏ธ

This project is a Typescript port of the implimentation in venmo-auto-transfer.

Warning: This package is working as of January 22, 2023. It may not work in the future.

Install ๐Ÿ“ฆ

# with npm
npm install @banksnussman/venmo
# with yarn
yarn add @banksnussman/venmo
# with pnpm
pnpm add @banksnussman/venmo
# with bun
bun add @banksnussman/venmo

Example Usage ๐Ÿ’ป

This exmaple below shows an end-to-end flow of how you to authenticate, view transactions, find a user, and pay that user.

import { Venmo } from "@banksnussman/venmo";

const v = new Venmo({
  username: "your-username",
  password: "your-password",
  bankAccountNumber: "you-bank-account-number"
});

const token = await v.login();

const identities = await v.getIdentities();

const me = identities.find(i => i.identityType === 'personal');

if (!me) {
  throw new Error("Unable to find my identity");
}

const stories = await v.getStories('me', me.externalId);

const ian = await v.getPerson("ian-murphy-35");

if (!ian) {
  throw new Error("Unable to find Ian");
}

const funding = await v.getFundingInstruments();

const debitCard = funding.profile.wallet.find(walletItem => walletItem.instrumentType === 'debitCard');

if (!debitCard) {
  throw new Error("Could not find debit card");
}

const balance = v.pay({
  username: "ian-murphy-35",
  amount: 0.01,
  note: "if venmo is going to be lame, we can just use playwright",
});

console.log("New Balance", balance);

/*
This does not work :(
Somone please help
const payment = await v.brokenPay({
  targetUserDetails: { userId: ian.id },
  amountInCents: 1,
  audience: 'private',
  note: "venmo sucks for making this so hard",
  type: "pay",
  fundingSourceID: debitCard.id,
});

console.log("Payment", payment)
*/

venmo's People

Contributors

bnussman avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

stevenbarash

venmo's Issues

Get `pay` Working

Problem

I can't get POST https://account.venmo.com/api/payments to work. If anyone has any ideas, please let me know or contribute. If you work at Venmo and you see this, tell me how.

Venmo Errors

Using https://api.venmo.com/v1/payments

{"error": {"title": "Payment Declined", "code": 1384, "message": "There was an issue with your payment. Try again later.", "links": []}}

Using https://account.venmo.com/api/payments

{"issue":"There was an issue with your payment. Try again later.","code":1384,"title":"Payment Declined"}

Now it is 404ing. Could be rate limited

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.