0.0.5 • Published 8 years ago

rn-stripe-api v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

react-native-stripe-api

Downloads Circle CI

The best Stripe library for React Native.

Installation

$ npm i react-native-stripe-api --save

Roadmap

  • include a payment form component
  • include react-native-awesome-card-io

Setup

Stripe API

This lib need a Stripe API Key

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

Functions

NameReturn TypeArgumentsDescription
createTokenPromisecardNumber: string expMonth: stringexpYear: stringcvc: stringCreate a new token (equivalent of a new card)
createCustomerPromisetoken: stringemail: stringCreate a new customer and add card (or token)
getCustomerPromisecustomerId: stringRetrieve customer by its id
createChargePromiseamount: numbercustomer: stringdescription: stringcurrency: string = 'eur'Create a new charge
refundChargePromisechargeId: stringRefund a previous charge
addCardToCustomerPromisetoken: string customerId: stringAdd a new card to a customer
destroyCardOfCustomerPromisecardId: stringcustomerId: stringDelete a card from a customer

Contribution

Questions

Feel free to contact me or create an issue

made with ♥