You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rn-stripe-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-stripe-api

A small React Native library for Stripe Rest API

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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
createTokenPromise
  • cardNumber: string
  • expMonth: string
  • expYear: string
  • cvc: string
Create a new token (equivalent of a new card)
createCustomerPromise
  • token: string
  • email: string
Create a new customer and add card (or token)
getCustomerPromisecustomerId: stringRetrieve customer by its id
createChargePromise
  • amount: number
  • customer: string
  • description: string
  • currency: string = 'eur'
Create a new charge
refundChargePromisechargeId: stringRefund a previous charge
addCardToCustomerPromise
  • token: string
  • customerId: string
    Add a new card to a customer
    destroyCardOfCustomerPromise
    • cardId: string
    • customerId: string
    Delete a card from a customer

    Contribution

    Questions

    Feel free to contact me or create an issue

    made with ♥

    Keywords

    react-native

    FAQs

    Package last updated on 28 Sep 2016

    Did you know?

    Socket

    Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

    Install

    Related posts