• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    Java
  • License
    MIT License
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stripe Mobile SDK wrapper for Capacitor


Stripe

@capacitor-community/stripe

Capacitor community plugin for native Stripe.


Since 4.2.0, require compileSdkVersion "33" at Android

Since version 4.2.0, this plugin requires compileSdkVersion "33". (Capacitor 4's default compileSdkVersion is "32").

Plugin version compileSdkVersion
4.1.2 32
4.2.0 33
  • Updated Google Pay button to match new brand guidelines.
  • [CHANGED]5679 Fix oversized verification_frames payloads leading to failed scans.

See more info: https://github.com/stripe/stripe-android/releases

Most of the time it will be fine, but it may conflict with other plugins. If this, you should use released version. We can't support conflict with other plugins.

Maintainers

Maintainer GitHub Social Sponsoring Company
Hidetaka Okamoto hideokamoto @hide__dev
Ibby Hadeed ihadeed
Masahiko Sakakibara rdlabo @rdlabo RELATION DESIGN LABO, GENERAL INC. ASSOCIATION

Contributors

Made with contributors-img.

How to use

Learn at the official @capacitor-community/stripe documentation.

日本語版をご利用の際は ja.stripe.capacitorjs.jp をご確認ください。

Demo

Screenshots

Android iOS Web
PaymentSheet
PaymentFlow
ApplePay Not supported beta.
GooglePay Not supported
Identity Not supported

API

This is for @capacitor/docgen only. Not use in product.

isApplePayAvailable()

isApplePayAvailable() => Promise<void>

createApplePay(...)

createApplePay(options: CreateApplePayOption) => Promise<void>
Param Type
options CreateApplePayOption

presentApplePay()

presentApplePay() => Promise<{ paymentResult: ApplePayResultInterface; }>

Returns: Promise<{ paymentResult: ApplePayResultInterface; }>


addListener(ApplePayEventsEnum.Loaded, ...)

addListener(eventName: ApplePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.FailedToLoad
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Completed, ...)

addListener(eventName: ApplePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Canceled, ...)

addListener(eventName: ApplePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Failed, ...)

addListener(eventName: ApplePayEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Failed
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.DidSelectShippingContact, ...)

addListener(eventName: ApplePayEventsEnum.DidSelectShippingContact, listenerFunc: (data: DidSelectShippingContact) => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.DidSelectShippingContact
listenerFunc (data: DidSelectShippingContact) => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.DidCreatePaymentMethod, ...)

addListener(eventName: ApplePayEventsEnum.DidCreatePaymentMethod, listenerFunc: (data: DidSelectShippingContact) => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.DidCreatePaymentMethod
listenerFunc (data: DidSelectShippingContact) => void

Returns: PluginListenerHandle


isGooglePayAvailable()

isGooglePayAvailable() => Promise<void>

createGooglePay(...)

createGooglePay(options: CreateGooglePayOption) => Promise<void>
Param Type
options CreateGooglePayOption

presentGooglePay()

presentGooglePay() => Promise<{ paymentResult: GooglePayResultInterface; }>

Returns: Promise<{ paymentResult: GooglePayResultInterface; }>


addListener(GooglePayEventsEnum.Loaded, ...)

addListener(eventName: GooglePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.FailedToLoad
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Completed, ...)

addListener(eventName: GooglePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Canceled, ...)

addListener(eventName: GooglePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Failed, ...)

addListener(eventName: GooglePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Failed
listenerFunc () => void

Returns: PluginListenerHandle


createIdentityVerificationSheet(...)

createIdentityVerificationSheet(options: CreateIdentityVerificationSheetOption) => Promise<void>
Param Type
options CreateIdentityVerificationSheetOption

presentIdentityVerificationSheet()

presentIdentityVerificationSheet() => Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>

Returns: Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>


addListener(IdentityVerificationSheetEventsEnum.Loaded, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName IdentityVerificationSheetEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(IdentityVerificationSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName IdentityVerificationSheetEventsEnum.FailedToLoad
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(IdentityVerificationSheetEventsEnum.Completed, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName IdentityVerificationSheetEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(IdentityVerificationSheetEventsEnum.Canceled, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName IdentityVerificationSheetEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(IdentityVerificationSheetEventsEnum.Failed, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName IdentityVerificationSheetEventsEnum.Failed
listenerFunc (error: string) => void

Returns: PluginListenerHandle


createPaymentFlow(...)

createPaymentFlow(options: CreatePaymentFlowOption) => Promise<void>
Param Type
options CreatePaymentFlowOption

presentPaymentFlow()

presentPaymentFlow() => Promise<{ cardNumber: string; }>

Returns: Promise<{ cardNumber: string; }>


confirmPaymentFlow()

confirmPaymentFlow() => Promise<{ paymentResult: PaymentFlowResultInterface; }>

Returns: Promise<{ paymentResult: PaymentFlowResultInterface; }>


addListener(PaymentFlowEventsEnum.Loaded, ...)

addListener(eventName: PaymentFlowEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.FailedToLoad
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Opened, ...)

addListener(eventName: PaymentFlowEventsEnum.Opened, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Opened
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Completed, ...)

addListener(eventName: PaymentFlowEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Canceled, ...)

addListener(eventName: PaymentFlowEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Failed, ...)

addListener(eventName: PaymentFlowEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Failed
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Created, ...)

addListener(eventName: PaymentFlowEventsEnum.Created, listenerFunc: (info: { cardNumber: string; }) => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Created
listenerFunc (info: { cardNumber: string; }) => void

Returns: PluginListenerHandle


createPaymentSheet(...)

createPaymentSheet(options: CreatePaymentSheetOption) => Promise<void>
Param Type
options CreatePaymentSheetOption

presentPaymentSheet()

presentPaymentSheet() => Promise<{ paymentResult: PaymentSheetResultInterface; }>

Returns: Promise<{ paymentResult: PaymentSheetResultInterface; }>


addListener(PaymentSheetEventsEnum.Loaded, ...)

addListener(eventName: PaymentSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentSheetEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.FailedToLoad
listenerFunc (error: string) => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Completed, ...)

addListener(eventName: PaymentSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Canceled, ...)

addListener(eventName: PaymentSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Failed, ...)

addListener(eventName: PaymentSheetEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Failed
listenerFunc (error: string) => void

Returns: PluginListenerHandle


initialize(...)

initialize(opts: StripeInitializationOptions) => Promise<void>
Param Type
opts StripeInitializationOptions

handleURLCallback(...)

handleURLCallback(opts: StripeURLHandlingOptions) => Promise<void>

iOS Only

Param Type
opts StripeURLHandlingOptions

Interfaces

CreateApplePayOption

Prop Type
paymentIntentClientSecret string
paymentSummaryItems { label: string; amount: number; }[]
merchantIdentifier string
countryCode string
currency string
requiredShippingContactFields ('postalAddress' | 'phoneNumber' | 'emailAddress' | 'name')[]

PluginListenerHandle

Prop Type
remove () => Promise<void>

DidSelectShippingContact

Prop Type
contact ShippingContact

ShippingContact

Prop Type Description
givenName string Apple Pay only
familyName string Apple Pay only
middleName string Apple Pay only
namePrefix string Apple Pay only
nameSuffix string Apple Pay only
nameFormatted string Apple Pay only
phoneNumber string Apple Pay only
nickname string Apple Pay only
street string Apple Pay only
city string Apple Pay only
state string Apple Pay only
postalCode string Apple Pay only
country string Apple Pay only
isoCountryCode string Apple Pay only
subAdministrativeArea string Apple Pay only
subLocality string Apple Pay only

CreateGooglePayOption

Prop Type Description
paymentIntentClientSecret string
paymentSummaryItems { label: string; amount: number; }[] Web only need @stripe-elements/stripe-elements > 1.1.0
merchantIdentifier string Web only need @stripe-elements/stripe-elements > 1.1.0
countryCode string Web only need @stripe-elements/stripe-elements > 1.1.0
currency string Web only need @stripe-elements/stripe-elements > 1.1.0

CreateIdentityVerificationSheetOption

Prop Type
verificationId string
ephemeralKeySecret string

CreatePaymentFlowOption

Prop Type Description Default
paymentIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
customerEphemeralKeySecret string Any documentation call 'ephemeralKey'
customerId string Any documentation call 'customer'
enableApplePay boolean If you set payment method ApplePay, this set true false
applePayMerchantId string If set enableApplePay false, Plugin ignore here.
enableGooglePay boolean If you set payment method GooglePay, this set true false
GooglePayIsTesting boolean false,
countryCode string use ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here. "US"
merchantDisplayName string "App Name"
returnURL string ""
style 'alwaysLight' | 'alwaysDark' iOS Only undefined
withZipCode boolean Platform: Web only Show ZIP code field. true

CreatePaymentSheetOption

Prop Type Description Default
paymentIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
customerEphemeralKeySecret string Any documentation call 'ephemeralKey'
customerId string Any documentation call 'customer'
enableApplePay boolean If you set payment method ApplePay, this set true false
applePayMerchantId string If set enableApplePay false, Plugin ignore here.
enableGooglePay boolean If you set payment method GooglePay, this set true false
GooglePayIsTesting boolean false,
countryCode string use ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here. "US"
merchantDisplayName string "App Name"
returnURL string ""
style 'alwaysLight' | 'alwaysDark' iOS Only undefined
withZipCode boolean Platform: Web only Show ZIP code field. true

StripeInitializationOptions

Prop Type Description
publishableKey string
stripeAccount string Optional. Making API calls for connected accounts

StripeURLHandlingOptions

Prop Type
url string

StripePlugin

Method Signature Description
initialize (opts: StripeInitializationOptions) => Promise<void>
handleURLCallback (opts: StripeURLHandlingOptions) => Promise<void> iOS Only

CapacitorStripeContext

Prop Type
stripe StripePlugin
isApplePayAvailable boolean
isGooglePayAvailable boolean

Type Aliases

ApplePayResultInterface

ApplePayEventsEnum.Completed | ApplePayEventsEnum.Canceled | ApplePayEventsEnum.Failed | ApplePayEventsEnum.DidSelectShippingContact | ApplePayEventsEnum.DidCreatePaymentMethod

GooglePayResultInterface

GooglePayEventsEnum.Completed | GooglePayEventsEnum.Canceled | GooglePayEventsEnum.Failed

IdentityVerificationSheetResultInterface

IdentityVerificationSheetEventsEnum.Completed | IdentityVerificationSheetEventsEnum.Canceled | IdentityVerificationSheetEventsEnum.Failed

PaymentFlowResultInterface

PaymentFlowEventsEnum.Completed | PaymentFlowEventsEnum.Canceled | PaymentFlowEventsEnum.Failed

PaymentSheetResultInterface

PaymentSheetEventsEnum.Completed | PaymentSheetEventsEnum.Canceled | PaymentSheetEventsEnum.Failed

Enums

ApplePayEventsEnum

Members Value
Loaded "applePayLoaded"
FailedToLoad "applePayFailedToLoad"
Completed "applePayCompleted"
Canceled "applePayCanceled"
Failed "applePayFailed"
DidSelectShippingContact "applePayDidSelectShippingContact"
DidCreatePaymentMethod "applePayDidCreatePaymentMethod"

GooglePayEventsEnum

Members Value
Loaded "googlePayLoaded"
FailedToLoad "googlePayFailedToLoad"
Completed "googlePayCompleted"
Canceled "googlePayCanceled"
Failed "googlePayFailed"

IdentityVerificationSheetEventsEnum

Members Value
Loaded "identityVerificationSheetLoaded"
FailedToLoad "identityVerificationSheetFailedToLoad"
Completed "identityVerificationSheetCompleted"
Canceled "identityVerificationSheetCanceled"
Failed "identityVerificationSheetFailed"

PaymentFlowEventsEnum

Members Value
Loaded "paymentFlowLoaded"
FailedToLoad "paymentFlowFailedToLoad"
Opened "paymentFlowOpened"
Created "paymentFlowCreated"
Completed "paymentFlowCompleted"
Canceled "paymentFlowCanceled"
Failed "paymentFlowFailed"

PaymentSheetEventsEnum

Members Value
Loaded "paymentSheetLoaded"
FailedToLoad "paymentSheetFailedToLoad"
Completed "paymentSheetCompleted"
Canceled "paymentSheetCanceled"
Failed "paymentSheetFailed"

License

@capacitor-community/stripe is MIT licensed.

More Repositories

1

sqlite

Community plugin for native & electron SQLite databases
Swift
463
star
2

barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
Java
435
star
3

electron

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️
TypeScript
327
star
4

bluetooth-le

Capacitor plugin for Bluetooth Low Energy
TypeScript
277
star
5

react-hooks

⚡️ React hooks for Capacitor ⚡️
TypeScript
244
star
6

fcm

Enable Firebase Cloud Messaging for Capacitor apps
TypeScript
240
star
7

generic-oauth2

Generic Capacitor OAuth 2 client plugin. Stop the war in Ukraine!
Java
232
star
8

admob

Community plugin for using Google AdMob
Java
209
star
9

http

Community plugin for native HTTP
Java
209
star
10

camera-preview

Capacitor plugin that allows camera interaction from HTML code
Java
188
star
11

background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
Java
187
star
12

google-maps

Capacitor Plugin using native Google Maps SDK for Android and iOS.
Java
152
star
13

in-app-review

Let users rate your app using native review app dialog for both Android and iOS.
TypeScript
144
star
14

apple-sign-in

Sign in with Apple Support
Swift
137
star
15

vue-cli-plugin-capacitor

A Vue CLI 3/4 Plugin for Capacitor
JavaScript
131
star
16

keep-awake

⚡️ Capacitor plugin to prevent devices from dimming or locking the screen.
Java
125
star
17

firebase-analytics

Enable Firebase Analytics for Capacitor Apps
Java
122
star
18

contacts

Contacts Plugin for Capacitor
Java
114
star
19

tauri

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Tauri platform! 🖥️
TypeScript
108
star
20

native-audio

Java
104
star
21

facebook-login

Facebook Login support
Java
101
star
22

media

Capacitor plugin for saving and retrieving photos and videos, and managing photo albums.
TypeScript
100
star
23

text-to-speech

⚡️ Capacitor plugin for synthesizing speech from text.
Java
93
star
24

speech-recognition

Java
84
star
25

date-picker

Native DateTime Picker Plugin for Capacitor Apps
Swift
84
star
26

privacy-screen

⚡️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
Swift
77
star
27

proposals

Plugin and platform requests ✋
74
star
28

app-icon

Capacitor plugin to programmatically change the app icon.
Java
74
star
29

firebase-crashlytics

⚡️ Capacitor plugin for Firebase Crashlytics.
Java
70
star
30

file-opener

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri. This plugin is similar to cordova-plugin-file-opener2 without installation support.
Swift
64
star
31

intercom

Enable Intercom for Capacitor apps
TypeScript
57
star
32

photoviewer

PhotoViewer table images with fullscreen and sharing capabilities
Swift
49
star
33

examples

Examples of using Capacitor with popular web frameworks and libraries
JavaScript
46
star
34

safe-area

Capacitor Plugin that exposes the safe area insets from the native iOS/Android device to your web project.
Kotlin
46
star
35

welcome

Introduction to the Capacitor Community org 👋
37
star
36

appcenter-sdk-capacitor

Capacitor Plugin for Microsoft's Visual Studio App Center SDK.
TypeScript
35
star
37

in-app-purchases

WIP: In App Purchases plugin for Capacitor
Java
27
star
38

native-market

Java
26
star
39

realm

Java
25
star
40

firebase-remote-config

TypeScript
23
star
41

screen-brightness

Java
23
star
42

.github

Template repo for new community plugins
17
star
43

twitter

Capacitor plugin to enable TwitterKit
TypeScript
11
star
44

card-scanner

Simple card scanner for Capacitor Applications.
Swift
11
star
45

flipper

Java
10
star
46

auth0

TypeScript
9
star
47

volume-buttons

Capacitor Volume Buttons. The plugin enables to listen to hardware volume button presses. This plugin is based on https://github.com/thiagobrez/capacitor-volume-buttons
Swift
7
star
48

google-maps-examples

Vue
5
star
49

uxcam

UXCam and FullStory app analytics
Java
5
star
50

advertising-id

Allows access to the IDFA (iOS) and AAID (Android)
Swift
5
star
51

android-security-provider

Capacitor plugin with method to check and update the Android Security Provider.
Java
3
star
52

tap-jacking

Capacitor plugin to prevent tap jacking on Android devices
Java
2
star
53

mdm-appconfig

Capacitor community plugin for reading app configurations written by a MDM (see appconfig.org) such as VMWare Workspace One.
Java
2
star
54

exif

This plugin offers utility functions for interacting with image exif metadata
Swift
2
star
55

play-integrity

A Capacitor plugin to use the Play Integrity API
Java
1
star
56

device-check

A Capacitor plugin to use Apple's DeviceCheck API
Java
1
star