1.1.0 • Published 4 years ago

indici-stripe-api v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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

NameReturn TypeArgumentsDescription
createTokenPromisecardNumber: string expMonth: stringexpYear: stringcvc: stringCreate a new token (equivalent of a new card)

|

made with ♥