# faster-billing-sdk-js

> Faster Billing JavaScript SDK

Latest version **0.1.1** (published 2022-08-11) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install faster-billing-sdk-js
pnpm add faster-billing-sdk-js
yarn add faster-billing-sdk-js
bun add faster-billing-sdk-js
```

## 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.1.1 |
| Published | 2022-08-11 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 50.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | faster.team |

## Links

- npm: https://www.npmjs.com/package/faster-billing-sdk-js
- Repository: https://github.com/faster/faster-sdk-js
- Homepage: https://github.com/faster/faster-sdk-js#readme
- Issues: https://github.com/faster/faster-sdk-js/issues
- npm.io page: https://npm.io/package/faster-billing-sdk-js

## Dependencies (6)

- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [core-js](https://npm.io/package/core-js.md) 3
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.8
- [ua-parser-js](https://npm.io/package/ua-parser-js.md) ^0.7.31
- [fetch-ponyfill](https://npm.io/package/fetch-ponyfill.md) ^6.1.0

## Recent versions

- 0.1.1 (latest) — 2022-08-11
- 0.1.0 — 2022-04-14
- 0.0.21 — 2022-03-15
- 0.0.20 — 2022-03-11
- 0.0.19 — 2022-03-11
- 0.0.12 — 2021-12-17
- 0.0.11 — 2021-12-16
- 0.0.9 — 2021-08-18
- 0.0.8 — 2020-12-14
- 0.0.6 — 2020-12-11
- 0.0.5 — 2020-12-11
- 0.0.4 — 2020-04-22
- 0.0.3 — 2020-04-21
- 0.0.2 — 2020-04-01

## README

<p align="center">
  <img alt="Faster" src="https://faster-dropbox.s3.amazonaws.com/assets/faster-logo.png" width="150" />
</p>
<h1 align="center">
  Faster Billing SDK - JavaScript
</h1>

Faster is a framework which provides analytics, account, billing and remote-config features.

This project is related to SDK for Javascript development given a easy-to-use API to work with.

Currently released features:

* Analytics ([Check Package](https://www.npmjs.com/package/faster-sdk-js)):
    * Track Device Installation
    * Session Control
    * Track & Send Events

* Remote Config ([Check Package](https://www.npmjs.com/package/faster-remote-config-sdk-js)): 
    * Run AB Tests
    * Manage Feature Rollout

* Account (This package):
    * Manage Sessions
    * Create, Link and Manage Credentials

* Billing:
    * Stripe payment integration

  

## 1 - Getting Started

  

### Installing

  

Get the package from the public npm registry, with your favorite package manager:

```bash

yarn add faster-billing-sdk-js

```

or

```bash

npm install faster-billing-sdk-js

```

  

### Request credentials

  

Request a new _product_id_ and _authenticator_ with faster-team at Movile.

  

### Usage

  

Import the Faster Billing module and FasterConfiguration object using ES6 syntax.

  

```javascript

import  FasterBilling, { FasterConfiguration } from  'faster-billing-sdk-js';

```

  

### Configuring & Running

  

Now, configure and start Faster SDK:

  

Typescript and JavaScript:

```javascript
const  configuration = new  asterConfiguration('__product_id__', '__environment__', '__authenticator__', options);

FasterBilling.configure(configuration);

fasterBilling = FasterBilling.start();
```

### Payment Profile

Create a payment profile

```javascript
fasterBilling.integration.stripe.createPaymentProfile('__billing_platform_id__', {
    name: 'name',
    identityNumber: 11111,
    identityType: 'CPF',
    address: {
      street: 'street',
      city: 'city',
      number: 1,
      neighborhood: 'neigh',
      state: 'state',
      zipCode: '11111'
    }
  });
```

Purchase a sku
```javascript
fasterBilling.integration.stripe.purchase('__payment_profile_id__', '__sku_id__', quantity, '__payment_method_id__');
```

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