rnative-stripe-api
Version:
This module is used to call stripe api directly without client library using form-urlencoded
31 lines (26 loc) • 817 B
Markdown
React Native Stripe API
* This Library is used create payment method by using Publishable key
```JavaScript
import stripe from 'rnative-stripe-api'
const rnStripe = stripe('your publishable key')
const requestData = {
"type": "card",
"billing_details": {
"email": "youruser@example.com",
"name": "nameoncard",
},
"card": {
"exp_month": "expireMonth",
"exp_year": "expireYear",
"number": "cardNumber"
}
}
let paymentMethod = rnStripe.createPaymentMethod(requestData)
submitPaymentMethodToserver(paymentMethod)
```