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);
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 ♥