# teller-io

> api wrapper for teller.io

Latest version **0.0.9** (published 2019-03-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install teller-io
pnpm add teller-io
yarn add teller-io
bun add teller-io
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2019-03-02 |
| First published | 2018-08-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Josh Balfour |
| Maintainers | joshbalfour |

## Links

- npm: https://www.npmjs.com/package/teller-io
- Repository: https://github.com/joshbalfour/node-teller-io
- Homepage: https://github.com/joshbalfour/node-teller-io#readme
- Issues: https://github.com/joshbalfour/node-teller-io/issues
- npm.io page: https://npm.io/package/teller-io

## Recent versions

- 0.0.9 (latest) — 2019-03-02
- 0.0.8 — 2018-08-11
- 0.0.7 — 2018-08-11
- 0.0.6 — 2018-08-11
- 0.0.5 — 2018-08-11
- 0.0.4 — 2018-08-11
- 0.0.3 — 2018-08-11
- 0.0.2 — 2018-08-10
- 0.0.1 — 2018-08-08

## README

# teller-io [![npm version](https://badge.fury.io/js/teller-io.svg)](https://badge.fury.io/js/teller-io)

API wrapper lib for [Teller](https://teller.io)

**note**: TAuth implementation is a WIP, external payments do not currently work, help on this would be appreciated!

## Installation

`npm install teller-io --save`

## Usage

`const teller = require('teller-io')`

### Generate Auth URL

Usage:

```
const appId = 'from application created here: https://teller.io/developer/applications'
const permissions = {
	full_account_number: true,
	balance: true,
	transaction_history: true,
	direct_debits: 'read',
	standing_orders: 'read',
	internal_transfers: false,
	payees: 'write',
	external_payments: true,
}

teller.generateAuthUrl({ appId, permissions })
```

Returns: String

### Extract data from Resulting Redirect URL

Usage:
```
const url = 'https://splitthis.app/?token=XXXXXXXXXXXXX&permissions=balance:true,direct_debits:read,external_payments:true,full_account_number:true,payees:write,standing_orders:read,transaction_history:true'

teller.parseRedirectUrl(url)
```
Returns: 
```
{
	token: 'XXXXXXXXXXXXX',
	permissions: {
		full_account_number: true,
		balance: true,
		transaction_history: true,
		direct_debits: 'read',
		standing_orders: 'read',
		internal_transfers: false,
		payees: 'write',
		external_payments: true,
	}
}
```

### Make Requests

Below all return a Promise which resolves to the result of the request, or rejects with an error.
You can pass in your developer personal access token, **or** a access token, private key, and cert.

`teller.getAccounts({ token, key, cert })`

`teller.getAccount({ token, key, cert, accountId })`


`teller.getTransactions({ accountId, token, key, cert })`

`teller.getTransaction ({ accountId, transactionId, token, key, cert })`


`teller.getDirectDebits({ accountId, token, key, cert })`

`teller.getDirectDebit({ accountId, directDebitId, token, key, cert })`


`teller.getStandingOrders({ accountId, token, key, cert })`

`teller.getStandingOrder({ accountId, standingOrderId, token, key, cert })`


`teller.getPayees({ accountId, token, key, cert })`

`teller.getPayee({ accountId, payeeId, token, key, cert })`

(wip)
`teller.externalPayment({ accountId, payeeId, bankCode, accountNumber, amount, token, key, cert })`

## License
[ISC](LICENSE)

---
_Source: https://npm.io/package/teller-io · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
