# stripe_it

> `npm i stripe_it`

Latest version **1.0.4** (published 2018-10-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install stripe_it
pnpm add stripe_it
yarn add stripe_it
bun add stripe_it
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-10-17 |
| First published | 2018-10-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | ilankumaran |

## Links

- npm: https://www.npmjs.com/package/stripe_it
- Repository: https://github.com/Ilankumaran-developer/stripe_node
- Homepage: https://github.com/Ilankumaran-developer/stripe_node#readme
- Issues: https://github.com/Ilankumaran-developer/stripe_node/issues
- npm.io page: https://npm.io/package/stripe_it

## Dependencies (7)

- [chai](https://npm.io/package/chai.md) ^4.2.0
- [mocha](https://npm.io/package/mocha.md) ^5.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [baseapp](https://npm.io/package/baseapp.md) file:./lib
- [request](https://npm.io/package/request.md) ^2.88.0
- [chai-http](https://npm.io/package/chai-http.md) ^4.2.0
- [querystring](https://npm.io/package/querystring.md) ^0.2.0

## Recent versions

- 1.0.4 (latest) — 2018-10-17
- 1.0.3 — 2018-10-17
- 1.0.2 — 2018-10-15
- 1.0.1 — 2018-10-15
- 1.0.0 — 2018-10-14

## README

## Installation

`npm i stripe_it`

## Getting Started
```
var func = async ()=>{ <br />
const nodestripe =  require('stripe_it') <br />
const stripe_it = new nodestripe({key:'sk_test_34erxxxxxxxxxxxxxxxx'}) </br >
 var token = await stripe_it._.createToken({ <br />
    card: { <br />
         "number": '4242424242424242', <br />
         "exp_month": 12, <br />
         "exp_year": 2019, <br />
         "cvc": '123' <br />
         }
 }) <br />

var charge = await stripe_it._.createCharge({ <br />
                  amount: 2000, <br />
                  currency: "usd",  <br />
                  source: token.id, // obtained from above step  <br />
                  description: "Charge for ilankumaran786@gmail.com" <br />
            }) <br />
} <br />
```

The above sample code is the basic implementation. Can be explained as follows <br />

```
const nodestripe =  require('stripe_it')
const stripe_it = new nodestripe({key:'sk_test_34erxxxxxxxxxxxxxxxx'})
```
Above lines deal with just requiring our node package and creating new instance..Kindly stick with the above syntax..It is mandatory to pass the key while creating the constructor.

<br />
Once the new instance is created., In our case, `stripe_it` variable is the one..Any stripe method can be called with the _ object.
<br />

We Used `stripe_it._.createToken()` to create token for the transaction, Here createToken is the function which takes your payload and speak with stripe to yield token. 

<br />
Similarly, For Creating charges, There is a dedicated function which also can be called with _ object. All the available stripe methods in this module can only be called with the _ object

<br />
List of available methods <br />

`createCharge - Used to create charges..`<br />
`createToken -  Token Creation` <br />
`chargeList - To view the list of charges made`<br />
`createCustomer - To create a customer` <br />
`customersList - To view list of customers`<br />

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