npm.io
1.1.0 • Published 6 years ago

indici-stripe-api

Licence
MIT
Version
1.1.0
Deps
0
Size
17 kB
Vulns
0
Weekly
0

indici-stripe-api (only to create token)

Little Stripe library for React-Native.

Installation

$ npm i indici-stripe-api --save

or

$ yarn add indici-stripe-api

Roadmap

  • include a payment form component
  • include react-native-awesome-card-io
  • a new server project to keep secret

Setup

Security issue (fixed since 0.1.0)

https://github.com/indici-apps/indici-stripe-api/issues

Stripe API

This lib need a Stripe API Key

import Stripe from 'react-native-stripe-api';

const apiKey = '<your Stripe API Key>';
const client = new Stripe(apiKey);

// Create a Stripe token with new card infos
const token = await client.createToken({
       number: '4242424242424242' ,
       exp_month: '09', 
       exp_year: '18', 
       cvc: '111',
       address_zip: '12345'
    });


Functions

Name Return Type Arguments Description
createToken Promise
  • cardNumber: string
  • expMonth: string
  • expYear: string
  • cvc: string
Create a new token (equivalent of a new card)

made with

Keywords