Socket
Socket
Sign inDemoInstall

rn-stripe-api

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rn-stripe-api

A small React Native library for Stripe Rest API


Version published
Weekly downloads
0
Maintainers
1
Install size
13.8 kB
Created
Weekly downloads
 

Readme

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

    FAQs

    Last updated on 28 Sep 2016

    Did you know?

    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

    SocketSocket SOC 2 Logo

    Product

    • Package Alerts
    • Integrations
    • Docs
    • Pricing
    • FAQ
    • Roadmap

    Stay in touch

    Get open source security insights delivered straight into your inbox.


    • Terms
    • Privacy
    • Security

    Made with ⚡️ by Socket Inc